cpu and its working principle

11
Central Processing Unit (CPU) Information Technology

Upload: keshavpoudel

Post on 18-Nov-2014

135 views

Category:

Documents


0 download

DESCRIPTION

IT Notes

TRANSCRIPT

Page 1: CPU and Its Working Principle

Central Processing Unit (CPU)

Information Technology

Page 2: CPU and Its Working Principle

CPU

• A computer does mainly four functions:– Receive input: through various input device– Process Information: Perform arithmetic or logical

operations on the information– Produce output: thru output device– Store Information: storage device

• Computer hardware falls into two categories– Processing hardware: Central Processing Unit, where

data processing is done– Peripheral devices: interact with the CPU

Page 3: CPU and Its Working Principle

Central Processing Unit (CPU)

• The part of the computer that executes program instructions is known as the processor or central processing unit(CPU).

• The central processing unit consists of three main components, the control unit, the arithmetic unit(ALU), and the registers. The CPU has two parts- the control unit and the arithmetic logic unit.

Page 4: CPU and Its Working Principle

Control Unit

• It directs the movement of electronic signals between memory(which temporarily holds data, instructions and processed information) and the ALU. It also directs these control signals between the CPU and input/output devices.

• Each instruction in the instruction set is expressed in microcode – a series of basic directions that tells the CPU how to execute more complex operations. Microcode is the lowest-level instructions that directly control a microprocessor.

Page 5: CPU and Its Working Principle

Arithmetic Logic Unit

• Performs two types of operations- arithmetic and logical. Arithmetic operations are the fundamental mathematical operations consisting of addition, subtraction, multiplication and division. Logical operation consist of comparisons.

• Many instructions carried out in the control unit involve moving data from one place to another- from memory to storage device, from memory to the printer or monitor and so on.

Page 6: CPU and Its Working Principle

Arithmetic Logic Unit

• The ALU includes a group of high speed memory locations(Register) built directly into the CPU, which are used to hold data that is currently being processed.

Operations Performed by the ALU

Arithmetic Logical Operations

Addition Equal to

Subtraction Not equal to

Multiplication Greater than; not greater than

Division Less than; not less than

Exponentiation Greater than or equal to; not greater than or equal to Less than or equal or equal to; not less than or equal to

Page 7: CPU and Its Working Principle

Registers

ALUDoes all the computing

Control UnitControls &

checks Regi

ster

Wor

kspa

ce

RAM

ROM

CPU and Memory

Page 8: CPU and Its Working Principle

Register

• Register are a number of small, high-speed memory units.

• They hold the material that the CPU is currently working with and they can be thought of as being the CPU’s workspace.

• The ALU works on the data held in the registers acting on the instructions which are also held there.

Page 9: CPU and Its Working Principle

Machine Cycle

• Every time the CPU executes an instruction, it takes a series of steps called the machine cycle. The machine cycle consists of two sub-cycles- the instruction cycle and the execution cycle. The machine four steps -- fetching, decoding, executing and storing. The first two forms the instruction cycle and the last two forms the execution cycle.

Page 10: CPU and Its Working Principle

Machine Cycle

1. Fetching: fetches the instruction from the memory

2. Decoding: breakdown or decode the command

3. Executing: execute the command, CPU carries out the instruction in order by converting them into microcode.

4. Storing: The CPU may be required to store the results in the memory.

Page 11: CPU and Its Working Principle

Working of CPU and Memory

• Page 90 and 91 (write 15 steps and draw the diagram)