Consider the following 12-bit numbers below. Assuming they are unsigned, add them to produce a 12-bit sum the same way a computer would. Also, state whether or not an error results using the same method a computer would.
110010001001
011010001101
110010001001
011010001101
--------------------------
Carry in each bit |
1 |
1 |
1 |
1 |
1 |
||||||||
addend1 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
|
addend2 |
0 |
1 |
1 |
0 |
1 |
0 |
0 |
0 |
1 |
1 |
0 |
1 |
|
sum |
1 |
0 |
0 |
1 |
1 |
0 |
0 |
0 |
1 |
0 |
1 |
1 |
0 |
Since there is carry from most significant bits, it results in overflow. The sum having 13 bits, cannot be represented with 12 bits as that of addends. So results in overflow error.
Get Answers For Free
Most questions answered within 1 hours.