This commit is contained in:
2025-08-18 07:18:32 +03:00
commit 12dcc9d232
27 changed files with 1910 additions and 0 deletions

19
chapter2/fullAdder.v Normal file
View File

@@ -0,0 +1,19 @@
module fulladder (
input in1,
input in2,
input carryIn,
output sum,
output carryO
);
wire xor1, and1, and2;
xor x1 (xor1, in1, in2);
xor x2 (sum, xor1, carryIn);
and a1 (and1, xor1, carryIn);
and a2 (and2, in1, in2);
or o1 (carryO, and1, and2);
endmodule