Building a Full Adder, Combining Logic to Add Three Bits

Building a Full Adder, Combining Logic to Add Three Bits

When you add two binary digits, a half adder is enough.

But what if there’s already a carry bit from a previous addition?
That’s where the full adder comes in.

It’s the next logical step in building real digital circuits, from binary adders to full ALUs in CPUs.

What a Full Adder Does

A full adder adds three input bits:

  • A

  • B

  • Carry In (Cin)

and gives two outputs:

  • Sum (S) – the result of the bit addition

  • Carry Out (Cout) – the overflow bit for the next stage


Logic Design

You can think of a full adder as two half adders plus an OR gate.

  1. First half adder adds A and B which produces an intermediate Sum₁ and Carry₁

  2. Second half adder adds Sum₁ and Cin which produces final Sum and Carry₂

  3. OR gate combines Carry₁ and Carry₂ which gives Carry Out

Equations:

    Sum = A ⊕ B ⊕ Cin     Carry_out = (A · B) + (Cin · (A ⊕ B))

Components You’ll Need

  • 1 × 74LS86 (XOR gates)

  • 1 × 74LS08 (AND gates)

  • 1 × 74LS32 (OR gates)

  • 2 × LEDs + 330 Ω resistors

  • 3 × pushbuttons (for A, B, and Cin)

  • Breadboard + jump wires

  • 5 V power supply

Circuit Diagram

How to wire

Power & basics (all three ICs)

  • VCC (pin 14) → +5 V

  • GND (pin 7) → 0 V

Whilst not in the circuit diagram, you can Decouple each IC: 0.1 µF ceramic from pin 14 to pin 7, as close as possible. This is to ensure a clean voltage supply to the circuit.

74LS86 (XOR) — U1

First half-adder XOR (A ⊕ B → Sum₁)

  • Connect +5V to one side of the push button 1, then other side to pin 1 of the 74LS86 IC
  • Connect +5V to one side of the push button 2, then other side to pin 2 of the 74LS86 IC
  • Connect pin 3 to to Pin 4 of the 74LS86 IC

Second half-adder XOR (Sum₁ ⊕ Cin → Sum)

  • Connect +5V to one side of the push button 3, then other side to pin 5 of the 74LS86 IC
  • Connect pin 6 of the 74LS86 IC to one side of 330Ω resistor 1, the other side of the resistor 1 to the cathode of the LED 1, then the anode to ground.

74LS08 (AND) — U2

First half-adder AND (A · B → Carry₁)

  • Connect +5V to one side of the push button 1, then other side to pin 2 of the 74LS08 IC
  • Connect +5V to one side of the push button 2, then other side to pin 1 of the 74LS08 IC

Second half-adder AND (Sum₁ · Cin → Carry₂)

  • Connect pin 3 of U1 (74LS86 IC) to pin 5 of U2 (74LS08)
  • Connect +5V to one side of the push button 3, then other side to pin 4 of the 74LS08 IC

74LS32 (OR) — U3

Carry combine ((Carry₁ + Carry₂) → CarryOut)

  • Connect 6 of U2 (74LS08 IC) to pin 1 of U3 (74LS32 IC)
  • Connect 3 of U2 (74LS08 IC) to pin 2 of U3 (74LS32 IC)
  • Connect pin 3 of the 74LS08 IC to one side of 330Ω resistor 2, the other side of the resistor 2 to the cathode of the LED 2, then the anode to ground.

Testing It Visually

Perfect—here are the four cases written out so you can drop a photo under each one.

  1. A=0, B=0, Cin=0
    Set all three inputs LOW. The adder outputs Sum=0 and Carry=0.
    What you’ll see: both LEDs are OFF.

  2. A=1, B=0, Cin=0
    Press only A (B and Cin stay LOW). The outputs are Sum=1 and Carry=0.
    What you’ll see: the Sum LED is ON, the Carry LED is OFF.

  3. A=1, B=1, Cin=0
    Press A and B together (Cin LOW). The outputs are Sum=0 and Carry=1.
    What you’ll see: the Carry LED is ON, the Sum LED is OFF.

  4. A=1, B=1, Cin=1
    Press A, B, and Cin. The outputs are Sum=1 and Carry=1.
    What you’ll see: both LEDs are ON.

What You’ve Learned

  • How binary addition works with three inputs.

  • How XOR, AND, and OR gates combine to form more complex logic.

  • You’ve just built the same logic that’s inside every CPU’s Arithmetic Logic Unit (ALU).

Going Further

  • Chain two full adders to make a 2-bit adder by feed Cout of the first into Cin of the next.

Comments

Popular posts from this blog

Math Behind Logic Gates

6502 - Part 2 Reset and Clock Circuit

Building a 6502 NOP Test