1-bit comparator

Design a circuit that compares two bits and indicates whether the first is greater than, equal to or smaller than the second.

Specification

module cmp(a, b, eq, gt, lt);
    input a, b;
    output eq, gt, lt;

Input

Output

Problem information

Author: Jordi Cortadella

Generation: 2026-02-03T12:12:16.448Z

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