Computer Science: An Overview: Global Edition (12th Edition)

Published by Pearson Higher Education
ISBN 10: 1292061162
ISBN 13: 978-1-29206-116-0

Chapter 1 - Data Storage - Chapter Review Problems - Page 87: 32

Answer

The incorrect results due to overflow are in options c and f.

Work Step by Step

Let's go through each addition: a. 00101 + 01000 Decimal: 00101 = 5, 01000 = 8 Sum: 5 + 8 = 13 Binary: 01101 13 is in range (-16 to 15) No overflow b. 11111 + 00001 Decimal: 11111 = -1, 00001 = 1 Sum: -1 + 1 = 0 Binary: 00000 No overflow c. 01111 + 00001 Decimal: 01111 = 15, 00001 = 1 Sum: 15 + 1 = 16 Binary (6-bit needed) = 10000 → but in 5-bit two’s complement, 10000 = -16 Result is incorrect due to overflow d. 10111 + 11010 Decimal: 10111 = -9, 11010 = -6 Sum: -9 + (-6) = -15 Binary: 10001 -15 is in range (-16 to 15) No overflow e. 11111 + 11111 Decimal: 11111 = -1, 11111 = -1 Sum: -1 + (-1) = -2 Binary: 11110 -2 is in range (-16 to 15) No overflow f. 00111 + 01100 Decimal: 00111 = 7, 01100 = 12 Sum: 7 + 12 = 19 Binary (needs more than 5 bits): 10011 → in 5-bit two’s complement = -13 Result is incorrect due to overflow
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.