Number Systems: Question 5

Syllabus 1.1

Multiple choice 1 mark

Two 8-bit unsigned binary numbers, 11101001 and 00100110, are added together in a computer's register using binary addition.

Which statement correctly gives the 8-bit result stored in the register and states whether an overflow error occurs?

Choose an answer to check it, then compare with the worked solution below.

Show worked solution Hide worked solution

Worked solution

Step 1: Add the two binary numbers column by column

    11101001
+   00100110
  • bit 0: 1 + 0 = 1, carry 0
  • bit 1: 0 + 1 = 1, carry 0
  • bit 2: 0 + 1 = 1, carry 0
  • bit 3: 1 + 0 = 1, carry 0
  • bit 4: 0 + 0 = 0, carry 0
  • bit 5: 1 + 1 = 0, carry 1
  • bit 6: 1 + 0 + carry 1 = 0, carry 1
  • bit 7: 1 + 0 + carry 1 = 0, carry 1 (a 1 is carried out beyond the register)

Result stored in the register: 00001111, with a 1 carried out beyond bit 7.

Step 2: Check with denary values

11101001 = 128 + 64 + 32 + 8 + 1 = 233 00100110 = 32 + 4 + 2 = 38 233 + 38 = 271

271 is greater than 255, the largest value an 8-bit register can hold, so the true sum needs 9 bits. Only the lowest 8 bits are kept: 271 - 256 = 15, and 15 = 00001111, matching Step 1. The bit worth 256 is carried out of the register and lost.

Step 3: Decide whether this is an overflow

Because a 1 was carried out beyond bit 7 (equivalently, because the true sum, 271, could not fit inside the 8-bit register), this is an overflow error, even though the stored pattern 00001111 looks like an ordinary valid binary number.

Why the other options are wrong

  • B: correctly gives 00001111, but wrongly claims no overflow occurred; the stored pattern being a valid 8-bit number does not mean no bit was lost. The carry out of bit 7 shows that one was.
  • C: 100001111 is the untruncated 9-bit sum, but an 8-bit register cannot store 9 bits. Only 00001111 is actually stored, with the extra bit lost.
  • D: 00011111 is not the correct result of this particular addition, so this option is incorrect regardless of its overflow claim.

Final answer

A. The register stores 00001111, and an overflow error occurs because a 1 is carried out beyond bit 7.