Design a circuit that computes the residue mod 7 of a 4-bit number represented in binary code.
module mod7(n, residue); input [3:0] n; output [2:0] residue;
n is a 4-bit number represented in binary code.
n
residue represents n𝑚𝑜𝑑7n~\textit{mod}~7 in binary code.
residue
The official statement of a problem is always the one in the PDF document. The HTML version of the statement is also given to help you, but may contain some content that is not well displayed. In case of doubt, always use the PDF.