Jutge.org
The Virtual Learning Environment for Computer Programming
4-bit adder
X64833 en
Design a circuit that performs the addition of two 4-bit numbers. The result (mod 16) must
be represented in 4 bits also.
The top module must be called adder4.
module
adder4(a, b, sum);
input
[3:0] a , b;
output
[3:0] sum;
Hint
You may want to use several instances of a 1-bit full adder.
Input
• a and b are the two 4-bit number.
Output
• sum is the 4-bit output representing
(
a
+
b
)
mod 16.
Problem information
Author : Jordi Cortadella
Generation : 2013-07-17 16:31:19
© Jutge.org, 2006–2013.
http://www.jutge.org