LogicGates.org Open the simulatorSimulator

Full adder

A full adder is a combinational circuit that adds three bits, two operand bits and a carry in, and produces a sum bit and a carry out, so that copies of it can be chained one per column to add whole numbers.

Adds two bits and a carry in.

Circuit diagram

Toggle the inputs and follow the signals: green wires are high, red are low. The highlighted row of the truth table below is the one you have set.

sum 0 cout 0

Truth table

ABCin sumcout
000 00
001 10
010 10
011 01
100 10
101 01
110 01
111 11

Boolean expressions

sum
a ⊻ b ⊻ c two XOR gates in a chain
cout
a ∧ b ∨ c ∧ (a ⊻ b) carry out when both inputs are high, or when the carry in meets exactly one

How it works

A third input lets the carry from the previous column join in, which is what makes the adder chainable. The sum is the XOR of all three inputs, and the carry out is high whenever at least two of the three are, so it is really a majority function wearing a different hat.

Where it is used

  • Every column but the first of a ripple carry adder.
  • Subtraction, by inverting one operand and setting the first carry in to 1.
  • Counters and accumulators, which are adders with a register on the output.

Build it

Two half adders and an OR: the first adds a and b, the second adds that sum to the carry in, and the OR combines the two carries.

Open the simulator

Or draw it from the expressions above with the circuit diagram generator, in either symbol standard, and export it as SVG, PNG, Verilog or VHDL.

Reference card

The diagram above as an image, black on white, for notes or a slide.

Full adder logic circuit diagram with inputs a = A, b = B, c = Cin: sum from a ⊻ b ⊻ c, cout from a ∧ b ∨ c ∧ (a ⊻ b) Click to download: Full adder circuit diagram

Questions about the full adder

What is the truth table of a full adder?

Eight rows, one per combination of A, B and the carry in. The sum is 1 whenever an odd number of the three inputs are 1, which is their XOR, and the carry out is 1 whenever at least two of them are, which is the majority function.

How do you build a full adder from two half adders?

The first half adder adds A and B. The second adds that sum to the carry in and produces the final sum. The two carries can never both be 1 at once, so an OR gate combining them gives the carry out. That is the usual textbook construction: two half adders and one OR.

How is a full adder used to add whole numbers?

Chain one per bit with each carry out feeding the next carry in, which is a ripple carry adder. The first column can be a half adder, since there is no carry coming in. Four full adders add two four bit numbers, and the four bit calculator in the simulator is built exactly that way.

The other circuits