Skip to content
digiwleeaTools
LearnGlossaryAboutCheat sheetHow a CPU worksBuild a CPUToolsOpen the lab →

4-bit incrementer: add 1 with half adders, live

A 4-bit incrementer adds 1 to a 4-bit number: S = A + 1, with a carry out when A is 1111. It needs no B input, so instead of full adders it is a chain of four half adders, the first adding the constant 1 to A0 and each passing its carry to the next.

Adding 1 is the most common arithmetic in a computer: the program counter does it after every instruction, and every synchronous counter computes it as its next state. Because the second operand is the constant 0001, each column adds only two bits, Ai and the carry from below, which is exactly a half adder. The pattern is easy to read off: the incrementer flips every bit up to and including the lowest 0, so 0111 becomes 1000. The half adders here are the verified half adder, saved as a part. All 16 inputs are checked before the page is built; the live circuit starts at 0000, so S shows 0001.

Live circuit: click the inputs to toggle them and watch the outputs update. It runs the real simulator, right here on the page.

Open this circuit in the lab →

Embed or cite this circuit

Free to embed on a course page, blog or worksheet: paste this code. The circuit stays live, and the small digiwleea badge links back here.

To cite it: digiwleea, “4-bit incrementer”, https://digiwleea.wleeaf.dev/tools/build/incrementer-4bit/

What you need

Step by step

  1. Place inputs A3 to A0 and probes S3 to S0 and Cout.
  2. Feed A0 and a constant 1 into the first half adder; its sum is S0 (NOT A0).
  3. Feed each next bit Ai and the carry from the half adder below into the next half adder; its sum is Si.
  4. The last half adder's carry is Cout, which is 1 only for 1111 + 1.
  5. Count A from 0000 to 1111: S is always one more, wrapping to 0000 with Cout = 1.

4-bit incrementer truth table

A3 A2 A1 A0S3 S2 S1 S0CoutDecimal
0000000100 + 1 = 1
0001001001 + 1 = 2
0010001102 + 1 = 3
0011010003 + 1 = 4
0100010104 + 1 = 5
0101011005 + 1 = 6
0110011106 + 1 = 7
0111100007 + 1 = 8
1000100108 + 1 = 9
1001101009 + 1 = 10
10101011010 + 1 = 11
10111100011 + 1 = 12
11001101012 + 1 = 13
11011110013 + 1 = 14
11101111014 + 1 = 15
11110000115 + 1 = 16

All 16 rows, with all five outputs each, are checked on the live circuit. A 4-bit decrementer is the same idea with a borrow chain: A - 1 flips every bit up to and including the lowest 1.

You can also read the full theory in the lesson on the half adder. Prefer to build it yourself from scratch? Open the digiwleea lab and place the gates on the canvas, or start from the logic gate simulator.

More builds: Arithmetic

All 246 build guides, by topic

Each of these is one step from a transistor to a working CPU. Build every gate from CMOS transistors and work all the way up in the free digiwleea lab, with the free theory reference alongside.

Open the 4-bit incrementer in the lab →

Frequently asked

What is a 4-bit incrementer?

A combinational circuit that outputs its 4-bit input plus 1, with a carry out when the input is 1111. It is used in program counters and counters.

Why does an incrementer use half adders instead of full adders?

Each bit only adds two things: its own input bit and the carry from the bit below. Adding a constant 1 needs no second operand, so a half adder per bit is enough, with the constant 1 as the first half adder's other input.

How many gates does a 4-bit incrementer need?

Four half adders, each one XOR and one AND, so eight gates. The first half adder adds a constant 1, so it reduces to S0 = NOT A0 and carry = A0, which a simplified design can use to save two gates.

What is the difference between an incrementer and a counter?

An incrementer is combinational: it computes A + 1 and forgets. A counter adds a register that stores the value and loads A + 1 on every clock edge.