Digital Circuits
Binary Math
11 questions By Tony R. Kuphaldt
-
Question 7 of 11
In an eight-bit digital system, where all numbers are represented in two’s complement form, what is the largest (most positive) quantity that may be represented with those eight bits? What is the smallest (most negative) quantity that may be represented? Express your answers in both binary (two’s complement) and decimal form.
Reveal answerLargest (most positive): 011111112 = 12710
Smallest (most negative): 100000002 = −12810
Notes:The most important concept in this question is that of range: what are the limits of the representable quantities, given a certain number of bits. Two’s complement just makes the concept a bit more interesting.
-
Question 8 of 11
Two’s complement notation really shows its value in binary addition, where positive and negative quantities may be handled with equal ease. Add the following byte-long (8 bit) two’s complement numbers together, and then convert all binary quantities into decimal form to verify the accuracy of the addition:

Reveal answer
Notes:Have your students do some of these problems on the board, in front of class for all to see. Ask students what happens to the left-most “carry” bit, if it exists in any of these problems. Ask them why we do what we do with that bit, when we would usually place it in our answer.
-
Question 9 of 11
Add the following eight-bit two’s complement numbers together, and then convert all binary quantities into decimal form to verify the accuracy of the addition:

Reveal answer
Follow-up question: Why are some of these answers incorrect? Hint: perform the additions in decimal form rather than binary form, and then explain why those answers are not represented in the binary answers.
Notes:This question introduces students to the phenomenon of overflow. This is a very important principle to understand, because real computer systems must deal with this condition properly, so as not to output incorrect answers!



