Digital Logic
Adder
A combinational circuit that performs arithmetic addition of binary numbers.
Detailed Explanation
An adder is one of the most fundamental building blocks in digital design. The simplest form is a half adder, which adds two single bits and produces a sum and carry output. A full adder extends this by accepting a carry-in, enabling the chaining of multiple adders to create multi-bit addition circuits.
Ripple carry adders connect full adders in series but suffer from propagation delay as carries ripple through each stage. Advanced designs like carry-lookahead adders and carry-select adders trade area for speed by computing carries in parallel.
Code Example
systemverilog
// Full adder
module full_adder (
input logic a, b, cin,
output logic sum, cout
);
assign sum = a ^ b ^ cin;
assign cout = (a & b) | (cin & (a ^ b));
endmodule