4-bit adder

Design a circuit that performs the addition of two 4-bit numbers. The
result (mod 16) must be represented in 4 bits also.

Specification

    module adder4(a, b, sum);
        input [3:0] a, b;
        output [3:0] sum;

Hint

You may want to use several instances of a 1-bit full adder.

Input

- a and b are the two 4-bit number.

Output

- sum is the 4-bit output representing (a + b) mod 16.

Problem information

Author: Jordi Cortadella

Generation: 2026-02-03T12:11:17.390Z

© Jutge.org, 2006–2026.
https://jutge.org
