Jutge.org
The Virtual Learning Environment for Computer Programming
Residue mod 7
X08834 en
Design a circuit that computes the residue mod 7 of a 4-bit number represented in binary
code.
The top module must be called mod7.
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 mod 7 in binary code.
Problem information
Author : Jordi Cortadella
Generation : 2013-07-17 16:31:56
© Jutge.org, 2006–2013.
http://www.jutge.org