Residue mod 7

Design a circuit that computes the residue mod 7 of a 4-bit number represented in binary code.

Specification

module mod7(n, residue);
    input [3:0] n;
    output [2:0] residue;

Input

Output

Problem information

Author:ย Jordi Cortadella

Generation: 2026-02-03T12:16:57.448Z

ยฉย Jutge.org, 2006โ€“2026.
https://jutge.org