Half adder

Design a half adder that is a circuit that performs the addition of two
binary digits, a and b. It outputs the sum and the output carry.

Specification

    module halfadder(a, b, sum, carry);
        input a, b;
        output sum, carry;

Input

- a and b are the two input values.

Output

- sum is the least significant digit of a + b.

- carry is the output carry, i.e., the most significant digit of a + b.

Problem information

Author: Javier de San Pedro Martín

Generation: 2026-02-03T12:13:01.814Z

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