Professional Documents
Culture Documents
Perform the following arithmetic operations using binary signed 2’s complement notation
for integers.
You may assume that the maximum size of integers is of 8 bits including the sign bit. (Please
6
note that the numbers given here are in decimal notation)
0
i) Add – 128 and 120
i a 0
iii) Add 64 and 61
o n
l p o
Please indicate the overflow if it is occurs. Also write how you have identified the overflow.
ni
ii) Subtract 124 from –99
First, we have to represent the number in binary notation
s u
The sign of a binary number is represented by 0 as plus and 1 as minus
Sign bit 7 -bits
0/1
99 – 1100011
124 – 1111100
-99 :-
Sign bit 7 -bits
NA 1 0 0 1 1 1 0 1
+124 :-
Sign bit 7 -bits