Registers In Computer Architecture
A register is a fast temporary memory of a computer used to store and transfer data and instructions used by the CPU. Registers are also known as CPU registers. A CPU register may contain a storage address, an instruction, or data. Let me explain the most common registers in computer Architecture.
Registers in Computer Architecture || When the Memory size is 4096 x 16 Words.
Here, the 4096 is the total number of words/locations in the main memory, and 16 represents the size of each word/location. To represent 4096 memory locations, 12 bits are required. And there are 16 bits in each Word. So, 16 bits are needed to represent the actual Word in memory. We can calculate the necessary bits through the following formula,
- No. of bits required for address = Bits as are necessary for total memory locations
- No. of bits required for Word = Size of each Word in Bits
Therefore, in 4096 x 16 Words memory, 12 bits will be needed for the address, and 16 bits will be needed for any word. Word is a block of data.
Conclusion: The size of all data registers will be the same because all data registers will contain the exact data size, i.e., DR, AC, IR, and TR. In the same case for address registers, all address registers will carry the same address. Address registers include PC and AR.
If the size of memory is 4096 x 16 Words, then a list of the most common registers with their specifications is given below in the image
A table from the above diagram shows the following
Register | Symbol | Number of bits | Function |
Data register | DR | 16 | Holds data as a memory operand |
Accumulator | AC | 16 | Processor register to store data |
Instruction register | IR | 16 | Holds instruction code |
Temporary register | TR | 16 | Holds temporary data |
Address register | AR | 12 | Holds address for the memory |
Program counter | PC | 12 | Holds the address of the next instruction |
Input register | INPR | 8 | holds input character |
Output register | OUTR | 8 | holds output character |
The input and output register is not concerned with the main memory’s size. The input register receives data from input devices, i.e., keyboard and mouse, and the output register sends data to output devices, i.e., monitors, printers, etc. This incoming data from input devices or outgoing data to output devices may be 8-bits, 16-bits, or more at a time.
When to Calculate the Memory size (Register and WORD size is given)
If the size of an address register is given, i.e., 24-bits, then the number of memory locations will be 224. And if the size of Word is 8 bytes (64bits), then the size of the memory can be calculated as
Size of memory = Total no. of locations x word size
= 224 x 26 bits = 230 bits = 1GB