Codiode

Carry-Out of a 1-bit Full Adder (Gate-Level)

MediumLogic CircuitBuildFree7 solved

In any multi-bit adder, the carry-out signal determines whether the addition overflows into the next bit position. In a CPU's arithmetic logic unit, the carry chain is the critical timing path — carry-lookahead and prefix-tree adder architectures exist solely to speed up carry propagation. Understanding how carry-out is computed at the gate level is fundamental to arithmetic hardware design.

Your task is to implement only the carry-out of a 1-bit full adder. Given three 1-bit inputs A, B, and Cin, produce the carry-out Cout. The carry-out is 1 whenever two or more of the three inputs are 1 — this is the majority-of-three function. The complete truth table:

A B Cin Cout
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1

The algebraic expression is Cout = AB + BCin + ACin. However, there is a smarter decomposition: using one half-adder to first add A and B gives you a sum bit (A XOR B) and a partial carry (AB). The full carry-out is then AB OR (Cin AND (A XOR B)), which requires only 3 components total — one HA, one AND, and one OR. This is the optimal implementation.

Signal Direction Width Description
A input 1 First addend bit
B input 1 Second addend bit
Cin input 1 Carry-in
Cout output 1 Carry-out: 1 when at least two inputs are 1

Constraints

  • The circuit is purely combinational — no clock or state.
  • Any gate types are allowed. The optimal solution uses 1 HA, 1 AND, and 1 OR (3 components total).
  • Only Cout is required as an output. Do not produce a Sum output.
  • All 8 input combinations must produce the correct Cout.

Topics

arithmeticmajorityfull-addercarrygate-level

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

Free to solve. A Codiode account keeps your progress.

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Part of Combinational Building Blocks

Problem 3 of 42 in the Combinational Building Blocks track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.