CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Combinational Logic

4-Bit Carry Lookahead Adder

HardLogic CircuitBuild

High-performance ALUs rely on parallel carry computation to break the linear delay dependency of ripple architectures. The carry lookahead adder computes all intermediate carry signals simultaneously using propagate and generate terms, drastically reducing the critical path depth in wide datapaths.

Implement a 4-bit carry lookahead adder. The circuit must add two 4-bit inputs A and B alongside a carry-in Cin to produce a 4-bit sum S and a carry-out Cout. To achieve the required gate-level performance, you must compute the generate G and propagate P signals for each bit, and use them to evaluate all internal carry bits in parallel.

| A | B | Cin | S | Cout | |-----|-----|-------|-----|--------| | 0 | 0 | 0 | 0 | 0 | | 5 | 3 | 0 | 8 | 0 | | 15 | 1 | 0 | 0 | 1 | | 10 | 5 | 1 | 0 | 1 | | 15 | 15 | 1 | 15 | 1 |

Constraints

  • Implement combinational logic only.
  • Do not use high-level adder macros or built-in arithmetic blocks.
  • Limit the critical path to a maximum of 5 gate levels from any input to Cout or S.
  • Compute intermediate carries directly from Cin, P, and G without chaining them sequentially.

Topics

arithmeticcritical-pathgate-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.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

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.

Related problems

  • Binary to HexEasy
  • 1-to-4 Demultiplexer from AND and NOT GatesEasy
  • 2-to-4 Line Decoder with Active-High EnableEasy
  • Hex Nibble to BinaryEasy
  • Odd Parity Bit Generator for 3-bit DataEasy
  • Full Adder from Half AddersEasy
  • Modulo ArithmeticMedium
  • Two's Complement: Encode a Negative DecimalEasy

Browse all problems · Learning tracks