Design a circuit that performs the addition of two -bit numbers. The result must be represented in bits also. The number of bits must be a parameter of the module.
module adder (a, b, cin, sum, cout);
parameter N=16;
input [N-1:0] a, b;
input cin;
output [N-1:0] sum;
output cout;You may want to use several instances of a 1-bit full adder.
a and b are the two
-bit
numbers.
cin is the input carry.
sum is the
-bit
output representing
.
cout is the output carry.