Computer Registers



A register is a very small amount of very fast memory that is built into the CPU (central processing unit) in order to speed up its operations by providing quick access to commonly used values. Registers refers to semiconductor devices whose contents can be accessed (i.e., read and written to) at extremely high speeds.

Registers are normally measured by the number of bits they can hold, for example, an 8-bit register means it can store 8 bits of data or a 32-bit register means it can store 32 bit of data.

Registers are used for performing various operations. While we are working on the system then these registers are used by the CPU for performing the operations. When we give some inputs to the system then the input is stored into the registers and when the system gives us the results after processing, then the result again comes from registers. Thus registers work like a memory that are used by the CPU for processing the data which is given by the user.

Among of the Mostly used Registers some names are Accumulator or AC, Data Register or DR, Address Register or AR, Program counter or PC, Memory Data Register or MDR etc. Some of the common registers are:






Consider the following Table:



A 16-bit common bus showing work-out of all 8 registers:

Too often we need lots of wiring for data transfer among several registers. For a basic computer, it is more convenient to use a common bus that will be able to carry the data of different registers alongside.

Here in this chapter, we are using a 16-bit common bus system to specify these transfers. The reason behind using 16-bit bus is nothing but the largest available register in our configuration. The outputs of 6 registers and a memory unit are connected to the common bus. The specific output that is selected for the bus lines at any given time is specified by the binary value of the selection variables S2, S1 and S0.





Consider the following Table:





The simplest way to organize a computer is to have:



Stored Program execution:

A stored program simply reffers to a program that is stored somewhere in the memory. A program of this kind puts much of it's instructions inside of the memory. A single instruction (related to that program) is fetched out from the memory with the help of PC and AR registers. The instruction is taken to IR register where it is decoded with the help of a decoder and a one single flip-flop. After the instruction is decoded, control unit is now aware of what to do exactly. Execution of instruction starts hereafter.





Basic Computer Instruction:

A basic computer uses an instruction format with three essential parts. These are:



The proposed instruction format and its parts are based on a 16-bit register size.

Address:It is a significant part of the instruction a computer processes. For a 16-bit instruction register (IR) size, address part is of 12-bit.

Op-code:Op-code specifies the different operations that can be performed over the data found on the memory address. Here in 16-bit IR, it takes 3 bits. Note that using 3-bit pattern, a total of 8 different operations can be specified.

Mode bit:The single MSB bit of IR is known as Mode Bit and it works just to specify whether the address provided in the address part of IR is DIRECT or INDIRECT.





Computer Instruction Types and Formats:





Addressing modes in Computer Instructions:

Addressing modes are a key part in different instruction formats. Different modes specify different ways, the operand will be accessed from the memory. Typically a processor uses following addressing modes.

NOTE:Here we are to discuss only two addressing modes that are- Direct and Indirect addressing modes.





Direct addressing mode:





Indirect addressing mode: