Unit 1 Components Of A Computer Flashcards
Processor
The processor is the brain of a computer. It executes instructions which allows programs to run.
The Arithmetic and Logic Unit
The ALU (Arithmetic and Logic Unit) completes all of the arithmetical and logical operations. Arithmetical operations include all mathematical operations such as addition and subtraction on fixed or floating point numbers. Logical operations include boolean logic operations such as AND, OR, NOT, and XOR.
The Control Unit
The Control Unit is the component of the processor which directs the operations of the CPU. It has the following jobs:
- Controlling and coordinating the activities of the CPU
- Managing the flow of data between the CPU and other devices
- Accepting the next instruction
- Decoding instructions
- Storing the resulting data back in memory
Registers
Registers are small memory cells that operate at a very high speed. They are used to temporarily store data and all arithmetic, logical and shift operations occur in these registers.
Program Counter (PC)
Is a register that manages the memory address of the next instruction to be fetched and executed.
Accumulator (ACC)
These hold the data being worked on and the results of arithmetic and logical operations.
Memory Address Register (MAR)
This holds the RAM address you want to read to or write from.
Memory Data Register (MDR)
This temporarily stores the data you have read from RAM or want to write to RAM.
Current Instruction Register (CIR)
Holds the current instruction being executed, divided up into operand and opcode.
Buses
Buses are a set of parallel wires which connect two or more components inside the CPU. There are three buses in the CPU: data bus, control bus, and address bus. These buses collectively are called the system bus.
Data Bus
This is a bi-directional bus (meaning bits can be carried in both directions) used for transporting data and instructions between components.
Address Bus
This is the bus used to transmit the memory addresses specifying where data is to be sent to or retrieved from. The width of the address bus is proportional to the number of addressable memory locations.
Control Bus
This is a bi-directional bus used to transmit control signals between internal and external components.
The control signals include:
- Bus request: shows that a device is requesting the use of the data bus
- Bus grant: shows that the CPU has granted access to the data bus
- Memory write: data is written into the addressed location using this bus
- Memory read: data is read from a specific location to be placed onto the data bus,
- Interrupt request: shows that a device is requesting access to the CPU
- Clock: used to synchronise operations
Assembly language
Assembly code uses mnemonics to represent instructions, for example ADD represents addition. This is a simplified way of representing machine code.
Fetch phase:
- Address from the PC is copied to the MAR
- Instruction held at that address is copied to MDR by the data bus
- Simultaneously, the contents of the PC are increased by 1
- The value held in the MDR is copied to the CIR
Decode phase:
The instruction held in the CIR is decoded. The instruction is split into oppose and operand and the opcode is used to determine the type of instruction and what hardware to use to execute it. The operand holds either:
. The address of the data to be used with the operation, which is the copied to the MAR, or
. The actual data to be operated on, which will be copied to the MDR
. The data to be operated on may be passed to the ALU/accumulator
Execute phase:
- The appropriate instruction/opcode is carried out on the operand