Digital Logic

2-bit Ripple-Carry Adder

One full adder handles one bit position. Connect two and pass the carry from the lower position to the higher one to add two 2-bit numbers.

A 2-bit adder with two full adders connected by a carry

2-bit Ripple-Carry Adder FA0 adds A0, B0, and Cin, passing carry C1 to FA1. FA1 adds A1, B1, and C1 to produce S1 and Cout. A1=0 B1=0 A0=0 B0=0 FA1 Twos place FA0 Ones place Cin=0 C1=0 Cout=0 S1=0 S0=0

Toggle the input bits using the buttons. Wires carrying 1 turn orange. The result below the circuit is shown in binary and decimal.

A and B are operands; Cin is the carry-in

A and B are each 2-bit numbers. A1 is the twos place and A0 the ones place, so A1=1 and A0=0 represent 10₂, or decimal 2. A0 and B0 feed FA0 for the ones place; A1 and B1 feed FA1 for the twos place.

Cin is a carry supplied from outside this circuit. It is normally 0 when this circuit alone adds two numbers. It can accept a carry from another adder or supply the +1 required for two's-complement subtraction.

A=11(3), B=01(1), Cin=0; Ones: 1 + 1 + 0 = 10₂ → S0=0, C1=1; Twos: 1 + 0 + 1 = 10₂ → S1=0, Cout=1; Result: Cout S1 S0 = 100₂ = 4

Connect more full adders for wider numbers

Each full adder adds A, B, and the carry at its bit position, passing any carry to the next position. A chain of n full adders adds two n-bit numbers. For example, three bits plus carry-in can produce at most 7 + 7 + 1 = 15, requiring four output bits.

The higher-position adder must wait for the lower-position carry. Increasing the bit width therefore increases the delay. Carry-lookahead (CLA) circuits reduce this delay by computing carries in advance.