Lec11 Register Transfer and Micro Operations Part2
Lec11 Register Transfer and Micro Operations Part2
Lec11 Register Transfer and Micro Operations Part2
Logic Microoperations
Clear
Logic operation can…
1) clear a group of bit values (Anding the
00000000 10101011 R1
Set
2) set a group of bit values (Oring the bits
to be set to ones with ones)
10101101 10101011 R1 (data)
11111111 00000000 R2 (mask)
11111111 10101011 R1
Complement
Complement a group of bit values
(Exclusively Or (XOR) the bits to be
complemented with ones)
10101101 10101011 R1 (data)
11111111 00000000 R2 (mask)
01010010 10101011 R1
LOGIC CIRCUIT
S2 S1 S0 Output Operation
0 0 0 XY AND
0 0 1 XY OR
0 1 0 XY XOR
0 1 1 A Complement A
1 0 0 (X Y) NAND
1 0 1 (X Y) NOR
1 1 0 (X Y) XNOR
1 1 1 B Complement B
More Logic Microoperation
X Y F 0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
TABLE 4-5. Truth Table for 16 Functions of Two Variables
1) Mask 2) OR
0110 1010 A before 0000 1010 A before
0000 1111 B mask 1001 0000 B insert
0000 1010 A after mask A B 1001 1010 A after insert AVB
4-6 Shift Microoperations
Shift example: 11000
Shift Microoperations :
Shift microoperations are used for serial
transfer of data
Three types of shift microoperation : Logical,
Circular, and Arithmetic
Shift Microoperations
Symbolic designation Description
R ← shl R Shift-left register R
R ← shr R Shift-right register R
R ← cil R Circular shift-left register R
R ← cir R Circular shift-right register R
R ← ashl R Arithmetic shift-left R
R ← ashr R Arithmetic shift-right R
R1 shl R1 0 0
R 2 shr R 2
Logical Shift Example
Carry out
Sign bit
R 2 ashl R 2
LSB
Rn-1 Rn-2
0 insert
Vs=1 : Overflow
Vs=0 : use sign bit
Arithmetic Shift Left
Arithmetic Shift Left :
Example 1
0010 (2)
0100 (4)
Example 2
1110 (-2)
1100 (-4)
Arithmetic Shift Left
Arithmetic Shift Left :
Example 3
0100 (4)
1000 (overflow)
Example 4
1010 (-6)
0100 (overflow)