Skip to main content

half_adder

Function half_adder 

Source
pub fn half_adder() -> Result<HalfAdderArrow, Error>
Expand description

Construct a single-bit half-adder.

Two inputs (a, b) drive both an XOR gate (the sum) and an AND gate (the carry), wired directly at the IR level.

ยงErrors

Infallible in practice; Error is returned only if the IR builder rejects an instruction.