Skip to main content

full_adder

Function full_adder 

Source
pub fn full_adder() -> Result<FullAdderArrow, Error>
Expand description

Construct a single-bit full-adder.

Three inputs (a, b, cin) produce sum = a ^ b ^ cin and cout = (a & b) | (cin & (a ^ b)).

ยงErrors

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