See how multiple gates combine to perform calculations, like the Half-Adder circuit.
Every time you use a calculator, millions of tiny switches are flipping inside your phone. But how do you turn a simple 'on/off' switch into a machine that can actually do math?
In isolation, a single logic gate is simple: an AND gate only outputs if both inputs are . But when we chain gates together, we create combinational logic. This is the foundation of a CPU. By connecting the output of one gate to the input of another, we can process complex instructions. In binary math, we only have two digits: and . When we add , the result is (which is in decimal). To represent this, we need two separate output wires: one for the Sum and one for the Carry bit.
Quick Check
If we add in binary, what is the 'Carry' bit value?
Answer
1
Let's trace the signals when and : 1. The inputs reach the XOR gate. Since both are (the same), the XOR output (Sum) is . 2. The inputs also reach the AND gate. Since both are , the AND output (Carry) is . 3. The final result is , which reads as .
Quick Check
Which logic gate is used to calculate the 'Sum' in a Half-Adder?
Answer
The XOR gate
Logic circuits aren't just for math; they control the world. Imagine a heavy industrial paper cutter. For safety, the blade should only drop if the operator has both hands on two separate buttons (to keep hands away from the blade) AND the safety plastic guard is down. This requires a multi-gate circuit. We can use an AND gate for the two buttons, and then take that result and feed it into another AND gate with the guard sensor.
Design a circuit for an automated greenhouse. The water should turn on if: 1. The soil is Dry () 2. AND (It is Morning () OR the Manual Override () is pressed).
This circuit requires an OR gate for and , and the output of that must be fed into an AND gate with .
A Half-Adder is limited because it cannot accept a 'Carry' input from a previous calculation. To add larger numbers, we use a Full-Adder. 1. A Full-Adder uses two Half-Adders and an OR gate. 2. It handles three inputs: , , and . 3. This allows computers to chain 64 of these together to process 64-bit numbers instantly!
In a Half-Adder, if Input and Input , what are the Sum and Carry?
Why can't a Half-Adder be used to add large multi-digit binary numbers alone?
An AND gate is used for the Carry bit because it only outputs 1 when both inputs are 1.
Review Tomorrow
In 24 hours, try to sketch the Half-Adder circuit from memory and write out its truth table for all four input combinations.
Practice Activity
Try to design a logic circuit for a home alarm: The alarm sounds if the 'System is Armed' AND ('Window is Open' OR 'Door is Open').