(a) What is a register?
(b) List two types of register.
(c) State three functions of registers.
(d) Outline three differences between a register and main memory.
Explanation
(a) A register is a small holding area on the processor chip that works much like random access memory, register holds program counters, data, instructions, and addresses that the arithmetic logic unit is currently processing.
OR
A processor register (CPU register) is one of small set of data holding places that are part of the computer processor
OR
OR
A register may hold an instruction, a storage address or any kind of data (such as a bit sequence or individual characters).
OR
Register is a special high speed storage area within the CPU. AIl data must be represented in the register before it can be processed.
(b) Types of registers:
Memory Address Register
Memory Buffer Register.
Input/Output Register.
Input/Output Buffer Register.
Program Counter. Instruction
Register/Current Instruction Register
Accumulator Register.
Flag Register. Data Register.
Memory data register. Index register.
Stack pointer register (SPR).
Condition code register.
Interrupt control register.
Temporary register.
Permanent register.
(c) Functions of registers:
Holds the address of memory where CPU wants to read or writ data.
Hold the contents of data/instruction read from or written in memory.
Used to specify the address of a particular I / O device.
Used for exchanging data between the l/O module and the processor. Used to store the address of the next instruction to fetch for execution. It stores current instruction being executed or coded. It allows the bits of its content to be moved to left or right (shift register).
It holds the memory addresses of data and instruction during execution phase.
It is used to store the result produced by the system.
It acts as a hardware element which holds a number that can be added to/subtracted from address portion of computer instruction.
It is used to temporarily store data being transmitted to/from peripheral devices.
(d) Differences between Register and Main Memory
Register |
Main Memory |
Loads/holds the instructions that the CPU needs. |
Holds the instructions and data that the currently executing program in the CPU requires. |
Holds the small amounts of data Memory of the computer around 32 bits to 64 bits |
Memory ranges from gigabytes to terabytes |
CPU operates on the register at a faster rate Examples are accumulator, program counter, instruction register, etc. |
CPU operates on the memory at a slower rate e.g Random Access Memory |
Some registers are located internally to the CPU. There are usually few registers on a processor |
Located externally to the CPU
There are lot more registers in RAM |
Registers in the CPU hold the data is Currently working on the processor |
RAM holds program instruction and data that program requires. |