LogicLab

Half adder

A half adder is a combinational circuit that adds two single bits and produces a sum bit and a carry bit.

Circuit diagram of the Half adder

Open this circuit in LogicLab →

Boolean expressions

Truth table

ABSumCarry
0000
0110
1010
1101

How it works

The sum is 1 when exactly one input is 1, which is an XOR. The carry is 1 only when both inputs are 1, which is an AND. It cannot accept a carry from a previous stage, so it is used for the least significant bit; chains of bits need full adders.

Try it yourself

Adds two bits: XOR gives the sum and AND gives the carry. Open the circuit, click the switches to change the inputs, and watch the LEDs and the waveform panel respond. You can edit the circuit, convert it to NAND-only or NOR-only gates, and save or export your version.

Related circuits

Reference: en.wikipedia.org/wiki/Adder_(electronics)#Half_adder