1-bit comparator X60848


Statement
 

pdf   zip

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

  • a and b are the input bits

Output

  • eq indicates that a=b.

  • gt indicates that a>>b.

  • lt indicates that a<<b.

Information
Author
Jordi Cortadella
Language
English
Official solutions
Verilog
User solutions
Verilog