Half Adder | Verilog Code | VLSI

Circuit of Half Adder:


Verilog Code:

module half_adder( A, B, S, C);
input A,B;
output S, C;

assign S = A^B;                                // Sum is the X-OR of input A and B
assign C = A*B;                               // Carry is the AND of input A and B
endmodule


See Also: Full Adder, 8 bit Adder, Half Subtractor, Full Subtractor, 8 bit subtractor

Post a Comment

0 Comments