1. Perform the following addition on unsigned integers assuming a nine-bit cell.
ID: 3544484 • Letter: 1
Question
1. Perform the following addition on unsigned integers assuming a nine-bit cell. Show the effect on the carry bit:
111111111
add 111111111
c= ___________
2.Perform the following addition, assuming nine-bit two's complement binary representation. Show the effect on the status bits:
100011011
add 101010100
NZVC= _________
3.Perform the following logical operation, assuming a nine-bit cell:
XOR 010010011
101110101
NZ=_____________
4. Assuming nine-bit two's complement representation, convert the following number to binary, show the effect of the ASL operation on it, and the convert the result back to decimal:
-62 (dec) = ______ (bin)
After applying the ASL operation: ________ , NZVC = __________
Converting back to decimal gives: ________ (dec)
The effect of the ASL is to__________ the number
5.Assuming a nine-bit cell, show the effect of the rotate operation on each of the following values with the given initial value of C:
C = 1, ROL 0 0110 1101 = __ _ _ _ _ _ _ _ _ c=_
C = 1, ROR 0 0110 1101 =_ _ _ _ _ _ _ _ _ c=_
(use 1s or 0s)
6. Assuming nine-bit two's complement binary representation, convert the following number from hexadecimal to binary to decimal:
0F5 (hex) = ____ (bin)
= ___ (dec)
7. Assuming nine-bit two's complement binary representation, write the bit pattern for the following decimal number in binary and hexadecimal:
-73 (dec) = _______ (bin)
= _____ (hex)
Explanation / Answer
(1)
Carry = 1 1 1 1 1 1 1 1 1
A = 1 0 0 0 1 1 0 1 1
B = 1 1 1 1 1 1 1 1 1
______________________
A+B = 1 1 1 1 1 1 1 1 1 0
______________________
But it is of 9 bits. So, the leftmost bit is not considered.
That is c = 1 1 1 1 1 1 1 1 0 where each of A and B are equal to
1 1 1 1 1 1 1 1 1 and 1 1 1 1 1 1 1 1 1 respectively.
(2)
Carry= 1 1 1 1 1 1 1 0 0
A = 1 1 1 1 1 1 1 1 1
B = 1 0 1 0 1 0 1 0 0
______________________
A+B = 1 1 0 1 0 1 0 0 1 1
______________________
As it is of 9 bits again then write in the form of
So NZVC = 101010011.
(3)
XOR of
A = 0 1 0 0 1 0 0 1 1
B = 1 0 1 1 1 0 1 0 1
______________________
A^B = 1 1 1 1 0 0 1 1 0
______________________
NZ = 111100110.
(4)
(-62) dec = 1's complement (62-1) = (1 1 1 0 0 0 0 1 0) bin
(5)
In the first case, C = 1 and the operand is 0 0110 1101 .
changes to 0.
In the second case, C = 0 and the operand is 0 0110 1101.
· When ROR is executed on the same operand, the operand shifts to right by one bit and the carry will equal to the newly formed MSB.
· From the above case, the operand becomes 1 0011 0110 and the carry changes to 1.
(6)
0F5 (hex) hexadecimal into decimal format 245 (dec)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.