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
006
ii) Subtract 124 from –99
i a 00
iii) Add 64 and 61
o n
n i a
l p o
o o
Please indicate the overflow if it is occurs. Also write how you have identified the overflow.
n iilp
First, we have to represent the number in binary notation
u
ssun
The sign of a binary number is represented by 0 as plus and 1 as minus
Sign bit 7 -bits
0/1
128 – 10000000
120 – 01111000
This number value is of more than 8-bits (i.e.8-bits) in signed 2’s complement notation also the
value remains the same. Hence this number cannot fit inside it.
To add this numbers we will need one more bit, hence Addition not possible.