Skip to main content

Module adder

Module adder 

Source
Expand description

Half- and full-adder circuits.

Functions§

full_adder
Construct a single-bit full-adder.
half_adder
Construct a single-bit half-adder.

Type Aliases§

FullAdderArrow
A full-adder arrow: ((bool ⊗ bool) ⊗ bool) -> (bool ⊗ bool). Inputs: ((a, b), carry_in). Outputs: (sum, carry_out).
HalfAdderArrow
A half-adder arrow: (bool ⊗ bool) -> (bool ⊗ bool). Output is (sum, carry) packed as a tensor.