Skip to main content

Module binary

Module binary 

Source
Expand description

Circuits for operating over binary values.

Structs§

AndMany
Returns true if all inputs are true.
BinaryAbs
For BinaryBundle x, output the absolute value of x.
BinaryAdder
Binary adder.
BinaryAddition
Binary addition.
BinaryAdditionNoCarry
Binary addition without a carry.
BinaryArithmeticRightShift
Arithmetic right shift.
BinaryConstant
Binary constant.
BinaryConstantMultiplication
For BinaryBundle x, constant c, and bitlength n, output x * c, where the output is of bitlength n.
BinaryDivision
For BinaryBundles x and y, output x / y.
BinaryEquality
Binary equality.
BinaryGreaterThanOrEqual
Binary greater than or equal.
BinaryLeftShift
For a BinaryBundle x and an integer n, shift x left by n, retaining the size of x.
BinaryLeftShiftExtend
For a BinaryBundle x and an integer n, shift x left by n 0s, extending the BinaryBundle.
BinaryLessThan
Binary less than.
BinaryLessThanSigned
Binary signed less than.
BinaryLogicalRightShift
Logical right shift.
BinaryMax
Binary max.
BinaryMultiplex
For bit b and BinaryBundles x and y, output x if b == 0, and y otherwise.
BinaryMultiplexConstantBits
For bit b and constants c1 and c2 of bitlength n, output c1 if b == 0 and c2 otherwise.
BinaryMultiplication
For BinaryBundle inputs x and y, output x * y.
BinaryMultiplicationLowerHalf
For BinaryBundles x and y, return the the lower-order half of x * y.
BinaryRightShift
For a BinaryBundle x, integer n, and pad c, shift x right by n, retaining the size of x and filling space on the left by c.
BinarySubtraction
Binary subtract.
BinaryToUnary
Convert a BinaryBundle x into its unary vector equivalent.
BinaryTwosComplement
Binary two’s complement.
Mux
For input (b, x, y) return x if b == 0, otherwise return y.
MuxConstants
For input (b, c1, c2), return c1 if b == 0, otherwise return c2.
OrMany
Returns true if any input is true.
PairwiseAnd
Pairwise AND of two bitvectors.
PairwiseOr
Pairwise OR of two bitvectors.
PairwiseXor
Pairwise XOR of two bitvectors.
TestBinaryAddition
Circuit for testing BinaryAddition.
TestBinaryConstant
Circuit for testing BinaryConstant.
TestBinaryEquality
Circuit for testing BinaryEquality.
TestBinaryGreaterThanOrEqual
Circuit for testing BinaryGreaterThanOrEqual.
TestBinaryLessThan
Circuit for testing BinaryLessThan.
TestBinaryLessThanSigned
Circuit for testing BinaryLessThanSigned.
TestBinaryMultiplication
Circuit for testing BinaryMultiplication.
TestBinarySubtraction
Circuit for testing BinarySubtraction.
TestBinaryTwosComplement
Circuit for testing BinaryTwosComplement.
XorMany
Returns the XOR of a vector of items.