Assume that you have a machine, as shown in section 3.2.2 of Block 3 having the microoperations given in Figure 10 on page 62 of Block 3. Consider that R1 and R2 both are 8-bit registers and contain 11110000 and 00110110 respectively. What will be the values of select inputs, carry-in input, and result of the operation (including carry out bit) if the following microoperations are performed? (For each micro-operation you may assume the initial value of R1
and R2 as given above)
(i) Decrement R1
(ii) Add R1 and R2 with carry
(iii)AND R1 and R2
(iv) Shift right R1
(i) Decrement R1
R1=1111 0000
DEC R1 ; R1 =1110 1111
(ii) Add R1 and R2 with carry
R1=1111 0000
R2=0011 0110
R1 ADD R2 : 0010 0110
Carry: 1
(iii)AND R1 and R2
R1=1111 0000
R2=0011 0110
R1 AND R2 : 0011 0000
(iv) Shift right R1
R1=1111 0000
R1 Shift right on one ; R1=1111 1000
Comments
Leave a comment