Expand description
Circuits for operating over binary values.
Structs§
- AndMany
- Returns
trueif all inputs aretrue. - Binary
Abs - For
BinaryBundlex, output the absolute value ofx. - Binary
Adder - Binary adder.
- Binary
Addition - Binary addition.
- Binary
Addition NoCarry - Binary addition without a carry.
- Binary
Arithmetic Right Shift - Arithmetic right shift.
- Binary
Constant - Binary constant.
- Binary
Constant Multiplication - For
BinaryBundlex, constantc, and bitlengthn, outputx * c, where the output is of bitlengthn. - Binary
Division - For
BinaryBundlesxandy, outputx / y. - Binary
Equality - Binary equality.
- Binary
Greater Than OrEqual - Binary greater than or equal.
- Binary
Left Shift - For a
BinaryBundlexand an integern, shiftxleft byn, retaining the size ofx. - Binary
Left Shift Extend - For a
BinaryBundlexand an integern, shiftxleft byn0s, extending theBinaryBundle. - Binary
Less Than - Binary less than.
- Binary
Less Than Signed - Binary signed less than.
- Binary
Logical Right Shift - Logical right shift.
- Binary
Max - Binary max.
- Binary
Multiplex - For bit
bandBinaryBundlesxandy, outputxifb == 0, andyotherwise. - Binary
Multiplex Constant Bits - For bit
band constantsc1andc2of bitlengthn, outputc1ifb == 0andc2otherwise. - Binary
Multiplication - For
BinaryBundleinputsxandy, outputx * y. - Binary
Multiplication Lower Half - For
BinaryBundlesxandy, return the the lower-order half ofx * y. - Binary
Right Shift - For a
BinaryBundlex, integern, and padc, shiftxright byn, retaining the size ofxand filling space on the left byc. - Binary
Subtraction - Binary subtract.
- Binary
ToUnary - Convert a
BinaryBundlexinto its unary vector equivalent. - Binary
Twos Complement - Binary two’s complement.
- Mux
- For input
(b, x, y)returnxifb == 0, otherwise returny. - MuxConstants
- For input
(b, c1, c2), returnc1ifb == 0, otherwise returnc2. - OrMany
- Returns
trueif any input istrue. - Pairwise
And - Pairwise AND of two bitvectors.
- Pairwise
Or - Pairwise OR of two bitvectors.
- Pairwise
Xor - Pairwise XOR of two bitvectors.
- Test
Binary Addition - Circuit for testing
BinaryAddition. - Test
Binary Constant - Circuit for testing
BinaryConstant. - Test
Binary Equality - Circuit for testing
BinaryEquality. - Test
Binary Greater Than OrEqual - Circuit for testing
BinaryGreaterThanOrEqual. - Test
Binary Less Than - Circuit for testing
BinaryLessThan. - Test
Binary Less Than Signed - Circuit for testing
BinaryLessThanSigned. - Test
Binary Multiplication - Circuit for testing
BinaryMultiplication. - Test
Binary Subtraction - Circuit for testing
BinarySubtraction. - Test
Binary Twos Complement - Circuit for testing
BinaryTwosComplement. - XorMany
- Returns the XOR of a vector of items.