Addition of Binary Numbers
Addition of Binary Numbers
5 1 Sum value
Overflow Error
The generation of a 9th bit is a clear
NOTE: indication that the sum has exceeded this
value. This is known as an overflow error.
Adding in binary follows the same rules This may lead to the computer ignoring
except that we carry whenever the sum is the extra bit, that leads to error.
greater than 1.
It is always adviceable to use larger bits to
store values to avoid overflow.
• The maximum denary value of an 8-
bit binary number is 255 (which is 28
–1
• An overflow error is an indication
that a number is too big to be stored
in the computer using 8 bits.
will be our new value = 180 / 22 =180/4 Logical shift: three places to the right.
Each shift is 2 so in three places= 23= 2*2*2=8
We are dividing the binary be 8 because we are moving three places to the right
128 64 32 16 8 4 2 1
128 64 32 16 8 4 2 1 Move to the right is division
80/23 = 80/8 = 10
0 0 1 0 1 1 0 1
0 1 0 1 0 0 0 0
• Carry out the following 16-bit and 8-bit c. Write down the denary value of the
binary additions and comment on your following binary number.
answers(show carry and sum value):
• 00001111
a. 0111 1111 1111 0001 +
0101 1111 0011 1001 d. Shift the binary number four places to
the left and comment on your result
b. 1 0 1 0 0 0 1 0 +
00111011