Gates that compute: adding two bits, a carry that is AND and a sum that is XOR, how the NOT blocks the sum at 1 + 1, and why it is only half an adder.
Step 1 of 5 · Adding two bits
Step 1 of 5
Adding two bits
Adding two bits is a small truth table: , , , and . But base 2 has no digit 2, so is written : two digits. Every sum of two bits gives two bits, a sum digit and a carry digit, just as in base ten gives 0 and carries 1 into the next column.
The board has rewired the same gates, plus one more AND, into a half adder. The two lights are the carry and the sum, and together they read in base 2. Predict, and then both inputs will go up.
Step 2 of 5
A sum with no carry
The sum column and the carry column differ. Find a setting where only the sum is on.
Step 3 of 5
The carry
Write out the carry column for the four rows, and compare it with the columns you know.
Step 4 of 5
The sum
The sum column is 0, 1, 1, 0: XOR. The board has no XOR gate, so the sum digit is built from the others, just as in the last Lesson:
Follow the traces: the AND’s output goes to the carry light and also to the NOT, and the NOT and the OR go together into the second AND, which lights the sum. Predict what will block the sum when B goes up.
Step 5 of 5
Half an adder
A half adder adds any two bits correctly. But to add long numbers, column by column, every column except the first also receives a carry from the column to its right. That needs something more.
Loading the interactive version…
Loading the interactive version…
Each step sets up the Scene for you, and a control marked “fixed” stays put for that step.
Practice · Predict, then look
The gates are rewired into a half adder, and both inputs are 0. What will the Carry and Sum lights show when we add ?
Practice · Predict, then look
The gates are rewired into a half adder, and both inputs are 0. What will the Carry and Sum lights show when we add ?
Practice · Reach the target
The carry is on and the sum is dark. Find inputs at which the Sum light is on and the Carry light is dark, and press Check.
Practice · Reach the target
The carry is on and the sum is dark. Find inputs at which the Sum light is on and the Carry light is dark, and press Check.
Practice · Choose
The carry light is on only for . Which gate on its own computes the carry?
Practice · Choose
The carry light is on only for . Which gate on its own computes the carry?
Practice · Predict, then look
The sum is built as . Now A = 1 and B = 0, and the sum is on. When B goes up too, the sum will go dark. What will the NOT’s output, , be then?
Practice · Predict, then look
The sum is built as . Now A = 1 and B = 0, and the sum is on. When B goes up too, the sum will go dark. What will the NOT’s output, , be then?
Practice · Choose
Why is this circuit called a half adder?
Practice · Choose
Why is this circuit called a half adder?
Lesson complete. Every practice question here is done.