UNIT-2: Central processing unit

General register organisation

Generally CPU has seven general registers.   Register organization show how registers are selected and how data flow between register and ALU.   A decoder is used to select a particular register.The output of each register is connected to two multiplexers to form the two buses A and B. The selection lines in each multiplexer select the input data for the particular bus. The A and B buses form the two inputs of an ALU.The operation select lines decide the micro operation to be performed by ALU. The result of the micro operation is available at the output bus. The output bus connected to the inputs of all registers, thus by selecting a destination register it is possible to store the result in it.

A bus organization for seven CPU register

EXAMPLE:         To perform the operation R3 = R1+R2  We have to provide following binary selection variable to the select inputs.
1.      SEL A :  001 -To place the contents of R1 into bus A.

2.      SEL B :  010 – to place the contents of R2 into bus B 3.      SEL OPR :  10010  – to perform the arithmetic addition A+B 4.      SEL REG or SEL D:  011  – to place the result available on output bus in R3.


Register and multiplexer input selection code

Binary codeSELASELBSELD or SELREG
000InputInput
001R1R1R1
010R2R2R2
011R3R3R3
100R4R4R4
101R5R5R5
110R6R6R6
111R7R7R7




Operation with symbol
Operation selection codeOperationsymbol
0000Transfer ATSFA
0001Increment AINC A
0010A+BADD
0011A-BSUB
0100Decrement ADEC
0101A AND BAND
0110A OR BOR
0111A XOR BXOR
1000Complement ACOMA
1001Shift right ASHR
1010Shift left ASHL