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

Output

Problem information

Author: Javier de San Pedro Martín

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

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