Half Adder (1-Bit)
The foundation of computational arithmetic. Toggle the inputs A and B below to observe how the XOR gate generates the Sum and the AND gate computes the Carry-Out.
๐ฌ INTERACTIVE SILICON SIMULATOR
Input A
Input B
๐ TRUTH TABLE
| A | B | SUM | CARRY |
|---|
๐ VERILOG RTL
// 1-Bit Half Adder Module
module half_adder (
input wire a,
input wire b,
output wire sum,
output wire carry
);
// Sum is the XOR of A and B
assign sum = a ^ b;
// Carry is the AND of A and B
assign carry = a & b;
endmodule