Full Adder Using NAND Gate (Structural Modeling):
module fa_nand( input
a, input b, input cin,
output sum, output carry);
wire w1,w2,w3,w4,w5,w6,w7;
nand n1(w1,a,b);
nand n2(w3,a,w1);
nand n3(w2,w1,b);
nand n4(w4,w3,w2);
nand n5(w5,w4,cin);
nand n6(w6,w4,w5);
nand n7(w7,w5,cin);
nand n8(carry,w5,w1);
nand n9(sum,w6,w7);
endmodule
No comments:
Post a Comment