Residue mod 7 X91814


Statement
 

pdf   zip

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

  • n is a 4-bit number represented in binary code.

Output

  • residue represents n𝑚𝑜𝑑7n~\textit{mod}~7 in binary code.

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