module full_adder_4b(sum,cout,a,b,cin);
output [3:0] sum;
output cout;
input [3:0] a,b;
input cin;
full_adder f1 (sum[0], cout0, a[0], b[0], cin);
full_adder f2 (sum[1], cout1, a[1], b[1], cout0);
full_adder f3 (sum[2], cout2, a[2], b[2], cout1);
full_adder f4 (sum[3], cout, a[3], b[3], cout2);
endmodule
0 comments:
Post a Comment