You are on page 1of 9

Register Transfer and Micro-operations

Lecture 9

Overview
Register Transfer Language
Register Transfer

Bus and Memory Transfers


Arithmetic Micro-operations

Logic Micro-operations
Shift Micro-operations

Arithmetic Logic Shift Unit


CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

Register Transfer and Micro-operations

Lecture 9

Arithmetic Circuits
S1 S0 A0 S1 S0 B0 0 1 2 3 X0 C0 D0

4x1 MUX

Y0

FAC1
C1

A1
S1 S0 B1 0 1 2 3

X1

4x1 MUX

Y1

FA

D1

C2

A2 S1 S0 B2 0 1 2 3

X2

C2

4x1 MUX

Y2

FA

D2

C3

S1 S0Cin Y 0 00 B 0 01 B 0 1 0 B 0 1 1 B 1 00 0 1 01 0 1 10 1 1 11 1

O/P D=A+B D=A+B+1 D = A + B D = A + B+ 1 D=A D=A+1 D=A1 D=A

A3 S1 S0 B3 0 1 2 3 0 1

X3

C3

4x1 MUX

Y3

FA

D3

C4 Cout

CSE 211, Computer Organization and Architecture

Harjeet Kaur, CSE/IT

Register Transfer and Micro-operations

Lecture 9

Logic Micro operations


- 16 different logic operations with 2 binary vars.

- n binary vars

22

functions

Truth tables for 16 functions of 2 variables and the corresponding 16 logic micro-operations
X y 0011 0101 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Boolean Function F0 = 0 F1 = xy F2 = xy' F3 = x F4 = x'y F5 = y F6 = x y F7 = x + y F8 = (x + y)' F9 = (x y)' F10 = y' F11 = x + y' F12 = x' F13 = x' + y F14 = (xy)' F15 = 1 MicroOperations F0 FAB F A B FA F A B FB FAB FAB F A B) F (A B) F B FAB F A F A B F (A B) F all 1's Name Clear AND Transfer A Transfer B Exclusive-OR OR NOR Exclusive-NOR Complement B

Complement A
NAND Set to all 1's

CSE 211, Computer Organization and Architecture

Harjeet Kaur, CSE/IT

Register Transfer and Micro-operations

Lecture 9

Hardware Implementation
Ai Bi 0 1 2 3 Select S1 S0

4X1 MUX

Fi

Function table
S1 0 0 1 1 S0 0 1 0 1 Output F=AB F = AB F=AB F = A

-operation AND OR XOR Complement


Harjeet Kaur, CSE/IT

CSE 211, Computer Organization and Architecture

Register Transfer and Micro-operations

Lecture 9

Applications of Logic Microoperations


Logic microoperations can be used to manipulate individual bits or a portions of a word in a register Consider the data in a register A. In another register, B, is bit data that will be used to modify the contents of A
Selective-set Selective-complement Selective-clear Mask (Delete) Clear Insert Compare AA+B AAB A A B AAB AAB A (A B) + C AAB

CSE 211, Computer Organization and Architecture

Harjeet Kaur, CSE/IT

Register Transfer and Micro-operations

Lecture 9

Applications of Logic Microoperations


1. In a selective set operation, the bit pattern in B is used to set certain bits in A 1 1 0 0 At 1010 B 1 1 1 0 At+1

(A A + B)

If a bit in B is set to 1, that same position in A gets set to 1, otherwise that bit in A keeps its previous value 2. In a selective complement operation, the bit pattern in B is used to complement certain bits in A 1 1 0 0 At 1010 B

0 1 1 0 At+1

(A A B)

If a bit in B is set to 1, that same position in A gets complemented from its original value, otherwise it is unchanged
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

Register Transfer and Micro-operations

Lecture 9

Applications of Logic Microoperations


3. In a selective clear operation, the bit pattern in B is used to clear certain bits in A 1 1 0 0 At 1010 B 0 1 0 0 At+1 (A A B)

If a bit in B is set to 1, that same position in A gets set to 0, otherwise it is unchanged 4. In a mask operation, the bit pattern in B is used to clear certain bits in A 1 1 0 0 At 1010 B 1 0 0 0 At+1 (A A B)

If a bit in B is set to 0, that same position in A gets set to 0, otherwise it is unchanged


CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

Register Transfer and Micro-operations

Lecture 9

Applications of Logic Microoperations


5. In a clear operation, if the bits in the same position in A and B are the same, they are cleared in A, otherwise they are set in A 1 1 0 0 At 1010 B 0 1 1 0 At+1 (A A B)

CSE 211, Computer Organization and Architecture

Harjeet Kaur, CSE/IT

Register Transfer and Micro-operations

Lecture 9

Applications of Logic Microoperations


6. An insert operation is used to introduce a specific bit pattern into A register, leaving the other bit positions unchanged This is done as
A mask operation to clear the desired bit positions, followed by An OR operation to introduce the new bits into the desired positions Example Suppose you wanted to introduce 1010 into the low order four bits of A: 1101 1000 1011 0001 A (Original) 1101 1000 1011 1010 A (Desired) 1101 1111 1101 0000 1101 1000 1111 1000 0000 1000 1011 1111 1011 0000 1011 0001 0000 0000 1010 1010 A (Original) Mask A (Intermediate) Added bits A (Desired)

CSE 211, Computer Organization and Architecture

Harjeet Kaur, CSE/IT

You might also like