Ch 9 · Gates That Do Arithmetic · Theory
Topic 9 of 10 in Boolean Logic & Logic Gates — How Machines Decide — 3 lessons.
The Half Adder
Here's where logic gates and binary numbers meet. Adding two single bits, A and B, gives a sum and possibly a carry:
The Full Adder
A half adder can't accept a carry *coming in* from a previous column — but real addition needs that. A full adder takes three inputs (A, B, and carry-in) and produces a sum and carry-out. Chain one full adder per bit and you can add whole binary numbers — this is literally how a CPU's ALU adds.
Why This Matters
You've just seen the bridge between the last two tutorials: numbers are stored in binary, and gates perform arithmetic on them. Stack adders, and add a few control gates, and you have an ALU — the part of the CPU that does the maths. Everything a computer calculates traces back to gates like these.