Documentation

CslibFrontier.Computability.Circuit.Boolean.Modular.PartialProduct

Shifted partial products of unsigned words #

One circuit layer selects the shifted first word by one bit of the second word. Bits shifted past the output width are discarded; this computes a modular partial product on every input.

Main definitions #

Main results #

References #

The carry-save multiplication construction is standard binary partial-product arithmetic; see Vollmer, Chapter 1.

Each retained product digit is one AND gate; lower shifted-out positions are false.

Multiply the first word by the ith bit of the second word, shifted by i.

Unsigned value of one shifted partial product, including overflow truncation.

@[simp]

Exactly one gate per output bit, including the false low positions.

All product digits are produced in parallel at depth one.