Expand description
§Multi-bit logic
This module defines jets that operate on strings of bits.
Functions§
- all_8
- Check if the value is
u8::MAX
. - all_16
- Check if the value is
u16::MAX
. - all_32
- Check if the value is
u32::MAX
. - all_64
- Check if the value is
u64::MAX
. - and_1
- Bitwise AND of two 1-bit values.
- and_8
- Bitwise AND of two 8-bit values.
- and_16
- Bitwise AND of two 16-bit values.
- and_32
- Bitwise AND of two 32-bit values
- and_64
- Bitwise AND of two 64-bit values
- ch_1
- Bitwise CHOICE of a bit and two 1-bit values. If the bit is true, then take the first value, else take the second value.
- ch_8
- Bitwise CHOICE of a bit and two 8-bit values. If the bit is true, then take the first value, else take the second value.
- ch_16
- Bitwise CHOICE of a bit and two 16-bit values. If the bit is true, then take the first value, else take the second value.
- ch_32
- Bitwise CHOICE of a bit and two 32-bit values. If the bit is true, then take the first value, else take the second value.
- ch_64
- Bitwise CHOICE of a bit and two 64-bit values. If the bit is true, then take the first value, else take the second value.
- complement_
1 - Bitwise NOT of a 1-bit value.
- complement_
8 - Bitwise NOT of an 8-bit value.
- complement_
16 - Bitwise NOT of a 16-bit value.
- complement_
32 - Bitwise NOT of a 32-bit value.
- complement_
64 - Bitwise NOT of a 64-bit value.
- eq_1
- Check if two 1-bit values are equal.
- eq_8
- Check if two 8-bit values are equal.
- eq_16
- Check if two 16-bit values are equal.
- eq_32
- Check if two 32-bit values are equal.
- eq_64
- Check if two 64-bit values are equal.
- eq_256
- Check if two 256-bit values are equal.
- full_
left_ shift_ 8_ 1 - Helper for left-shifting bits. The bits are shifted from a 1-bit value into a 8-bit value. Return the shifted value and the 1 bit that was shifted out.
- full_
left_ shift_ 8_ 2 - Helper for left-shifting bits. The bits are shifted from a 2-bit value into a 8-bit value. Return the shifted value and the 2 bits that were shifted out.
- full_
left_ shift_ 8_ 4 - Helper for left-shifting bits. The bits are shifted from a 4-bit value into a 8-bit value. Return the shifted value and the 4 bits that were shifted out.
- full_
left_ shift_ 16_ 1 - Helper for left-shifting bits. The bits are shifted from a 1-bit value into a 16-bit value. Return the shifted value and the 1 bit that was shifted out.
- full_
left_ shift_ 16_ 2 - Helper for left-shifting bits. The bits are shifted from a 2-bit value into a 16-bit value. Return the shifted value and the 2 bits that were shifted out.
- full_
left_ shift_ 16_ 4 - Helper for left-shifting bits. The bits are shifted from a 4-bit value into a 16-bit value. Return the shifted value and the 4 bits that were shifted out.
- full_
left_ shift_ 16_ 8 - Helper for left-shifting bits. The bits are shifted from a 8-bit value into a 16-bit value. Return the shifted value and the 8 bits that were shifted out.
- full_
left_ shift_ 32_ 1 - Helper for left-shifting bits. The bits are shifted from a 1-bit value into a 32-bit value. Return the shifted value and the 1 bit that was shifted out.
- full_
left_ shift_ 32_ 2 - Helper for left-shifting bits. The bits are shifted from a 2-bit value into a 32-bit value. Return the shifted value and the 2 bits that were shifted out.
- full_
left_ shift_ 32_ 4 - Helper for left-shifting bits. The bits are shifted from a 4-bit value into a 32-bit value. Return the shifted value and the 4 bits that were shifted out.
- full_
left_ shift_ 32_ 8 - Helper for left-shifting bits. The bits are shifted from a 8-bit value into a 32-bit value. Return the shifted value and the 8 bits that were shifted out.
- full_
left_ shift_ 32_ 16 - Helper for left-shifting bits. The bits are shifted from a 16-bit value into a 32-bit value. Return the shifted value and the 16 bits that were shifted out.
- full_
left_ shift_ 64_ 1 - Helper for left-shifting bits. The bits are shifted from a 1-bit value into a 64-bit value. Return the shifted value and the 1 bit that was shifted out.
- full_
left_ shift_ 64_ 2 - Helper for left-shifting bits. The bits are shifted from a 2-bit value into a 64-bit value. Return the shifted value and the 2 bits that were shifted out.
- full_
left_ shift_ 64_ 4 - Helper for left-shifting bits. The bits are shifted from a 4-bit value into a 64-bit value. Return the shifted value and the 4 bits that were shifted out.
- full_
left_ shift_ 64_ 8 - Helper for left-shifting bits. The bits are shifted from a 8-bit value into a 64-bit value. Return the shifted value and the 8 bits that were shifted out.
- full_
left_ shift_ 64_ 16 - Helper for left-shifting bits. The bits are shifted from a 16-bit value into a 64-bit value. Return the shifted value and the 16 bits that were shifted out.
- full_
left_ shift_ 64_ 32 - Helper for left-shifting bits. The bits are shifted from a 32-bit value into a 64-bit value. Return the shifted value and the 32 bits that were shifted out.
- full_
right_ shift_ 8_ 1 - Helper for right-shifting bits. The bits are shifted from a 1-bit value into a 8-bit value. Return the shifted value and the 1 bit that was shifted out.
- full_
right_ shift_ 8_ 2 - Helper for right-shifting bits. The bits are shifted from a 2-bit value into a 8-bit value. Return the shifted value and the 2 bits that were shifted out.
- full_
right_ shift_ 8_ 4 - Helper for right-shifting bits. The bits are shifted from a 4-bit value into a 8-bit value. Return the shifted value and the 4 bits that were shifted out.
- full_
right_ shift_ 16_ 1 - Helper for right-shifting bits. The bits are shifted from a 1-bit value into a 16-bit value. Return the shifted value and the 1 bit that was shifted out.
- full_
right_ shift_ 16_ 2 - Helper for right-shifting bits. The bits are shifted from a 2-bit value into a 16-bit value. Return the shifted value and the 2 bits that were shifted out.
- full_
right_ shift_ 16_ 4 - Helper for right-shifting bits. The bits are shifted from a 4-bit value into a 16-bit value. Return the shifted value and the 4 bits that were shifted out.
- full_
right_ shift_ 16_ 8 - Helper for right-shifting bits. The bits are shifted from a 8-bit value into a 16-bit value. Return the shifted value and the 8 bits that were shifted out.
- full_
right_ shift_ 32_ 1 - Helper for right-shifting bits. The bits are shifted from a 1-bit value into a 32-bit value. Return the shifted value and the 1 bit that was shifted out.
- full_
right_ shift_ 32_ 2 - Helper for right-shifting bits. The bits are shifted from a 2-bit value into a 32-bit value. Return the shifted value and the 2 bits that were shifted out.
- full_
right_ shift_ 32_ 4 - Helper for right-shifting bits. The bits are shifted from a 4-bit value into a 32-bit value. Return the shifted value and the 4 bits that were shifted out.
- full_
right_ shift_ 32_ 8 - Helper for right-shifting bits. The bits are shifted from a 8-bit value into a 32-bit value. Return the shifted value and the 8 bits that were shifted out.
- full_
right_ shift_ 32_ 16 - Helper for right-shifting bits. The bits are shifted from a 16-bit value into a 32-bit value. Return the shifted value and the 16 bits that were shifted out.
- full_
right_ shift_ 64_ 1 - Helper for right-shifting bits. The bits are shifted from a 1-bit value into a 64-bit value. Return the shifted value and the 1 bit that was shifted out.
- full_
right_ shift_ 64_ 2 - Helper for right-shifting bits. The bits are shifted from a 2-bit value into a 64-bit value. Return the shifted value and the 2 bits that were shifted out.
- full_
right_ shift_ 64_ 4 - Helper for right-shifting bits. The bits are shifted from a 4-bit value into a 64-bit value. Return the shifted value and the 4 bits that were shifted out.
- full_
right_ shift_ 64_ 8 - Helper for right-shifting bits. The bits are shifted from a 8-bit value into a 64-bit value. Return the shifted value and the 8 bits that were shifted out.
- full_
right_ shift_ 64_ 16 - Helper for right-shifting bits. The bits are shifted from a 16-bit value into a 64-bit value. Return the shifted value and the 16 bits that were shifted out.
- full_
right_ shift_ 64_ 32 - Helper for right-shifting bits. The bits are shifted from a 32-bit value into a 64-bit value. Return the shifted value and the 32 bits that were shifted out.
- high_1
- Return
u1::MAX
= 1. - high_8
- Return
u8::MAX
. - high_16
- Return
u16::MAX
. - high_32
- Return
u32::MAX
. - high_64
- Return
u64::MAX
. - left_
extend_ 1_ 8 - Extend a 1-bit value to an 8-bit value by padding its left with the MSB.
- left_
extend_ 1_ 16 - Extend a 1-bit value to a 16-bit value by padding its left with the MSB.
- left_
extend_ 1_ 32 - Extend a 1-bit value to a 32-bit value by padding its left with the MSB.
- left_
extend_ 1_ 64 - Extend a 1-bit value to a 64-bit value by padding its left with the MSB.
- left_
extend_ 8_ 16 - Extend an 8-bit value to a 16-bit value by padding its left with the MSB.
- left_
extend_ 8_ 32 - Extend an 8-bit value to a 32-bit value by padding its left with the MSB.
- left_
extend_ 8_ 64 - Extend an 8-bit value to a 64-bit value by padding its left with the MSB.
- left_
extend_ 16_ 32 - Extend a 16-bit value to a 32-bit value by padding its left with the MSB.
- left_
extend_ 16_ 64 - Extend a 16-bit value to a 64-bit value by padding its left with the MSB.
- left_
extend_ 32_ 64 - Extend a 16-bit value to a 64-bit value by padding its left with the MSB.
- left_
pad_ high_ 1_ 8 - Extend a 1-bit value to an 8-bit value by padding its left with ones.
- left_
pad_ high_ 1_ 16 - Extend a 1-bit value to a 16-bit value by padding its left with ones.
- left_
pad_ high_ 1_ 32 - Extend a 1-bit value to a 32-bit value by padding its left with ones.
- left_
pad_ high_ 1_ 64 - Extend a 1-bit value to a 64-bit value by padding its left with ones.
- left_
pad_ high_ 8_ 16 - Extend an 8-bit value to a 16-bit value by padding its left with ones.
- left_
pad_ high_ 8_ 32 - Extend an 8-bit value to a 32-bit value by padding its left with ones.
- left_
pad_ high_ 8_ 64 - Extend a 1-bit value to a 64-bit value by padding its left with ones.
- left_
pad_ high_ 16_ 32 - Extend a 16-bit value to a 32-bit value by padding its left with ones.
- left_
pad_ high_ 16_ 64 - Extend a 16-bit value to a 64-bit value by padding its left with ones.
- left_
pad_ high_ 32_ 64 - Extend a 32-bit value to a 64-bit value by padding its left with ones.
- left_
pad_ low_ 1_ 8 - Extend a 1-bit value to an 8-bit value by padding its left with zeroes.
- left_
pad_ low_ 1_ 16 - Extend a 1-bit value to a 16-bit value by padding its left with zeroes.
- left_
pad_ low_ 1_ 32 - Extend a 1-bit value to a 32-bit value by padding its left with zeroes.
- left_
pad_ low_ 1_ 64 - Extend a 1-bit value to a 64-bit value by padding its left with zeroes.
- left_
pad_ low_ 8_ 16 - Extend an 8-bit value to a 16-bit value by padding its left with zeroes.
- left_
pad_ low_ 8_ 32 - Extend an 8-bit value to a 32-bit value by padding its left with zeroes.
- left_
pad_ low_ 8_ 64 - Extend an 8-bit value to a 64-bit value by padding its left with zeroes.
- left_
pad_ low_ 16_ 32 - Extend a 16-bit value to a 32-bit value by padding its left with zeroes.
- left_
pad_ low_ 16_ 64 - Extend a 16-bit value to a 64-bit value by padding its left with zeroes.
- left_
pad_ low_ 32_ 64 - Extend a 32-bit value to a 64-bit value by padding its left with zeroes.
- left_
rotate_ 8 - Left-rotate an 8-bit value by the given amount.
- left_
rotate_ 16 - Left-rotate a 16-bit value by the given amount.
- left_
rotate_ 32 - Left-rotate a 32-bit value by the given amount.
- left_
rotate_ 64 - Left-rotate a 64-bit value by the given amount.
- left_
shift_ 8 - Left-shift an 8-bit value by the given amount. Bits are filled with zeroes.
- left_
shift_ 16 - Left-shift a 16-bit value by the given amount. Bits are filled with zeroes.
- left_
shift_ 32 - Left-shift a 32-bit value by the given amount. Bits are filled with zeroes.
- left_
shift_ 64 - Left-shift a 64-bit value by the given amount. Bits are filled with zeroes.
- left_
shift_ with_ 8 - Left-shift an 8-bit value by the given amount. Bits are filled with the given bit.
- left_
shift_ with_ 16 - Left-shift a 16-bit value by the given amount. Bits are filled with the given bit.
- left_
shift_ with_ 32 - Left-shift a 32-bit value by the given amount. Bits are filled with the given bit.
- left_
shift_ with_ 64 - Left-shift a 64-bit value by the given amount. Bits are filled with the given bit.
- leftmost_
8_ 1 - Return the most significant 1 bits of an 8-bit value.
- leftmost_
8_ 2 - Return the most significant 1 bits of an 8-bit value.
- leftmost_
8_ 4 - Return the most significant 1 bits of an 8-bit value.
- leftmost_
16_ 1 - Return the most significant 1 bit of a 16-bit value.
- leftmost_
16_ 2 - Return the most significant 2 bits of a 16-bit value.
- leftmost_
16_ 4 - Return the most significant 4 bits of a 16-bit value.
- leftmost_
16_ 8 - Return the most significant 8 bits of a 16-bit value.
- leftmost_
32_ 1 - Return the most significant 1 bit of a 32-bit value.
- leftmost_
32_ 2 - Return the most significant 2 bits of a 32-bit value.
- leftmost_
32_ 4 - Return the most significant 4 bits of a 32-bit value.
- leftmost_
32_ 8 - Return the most significant 8 bits of a 32-bit value.
- leftmost_
32_ 16 - Return the most significant 16 bits of a 32-bit value.
- leftmost_
64_ 1 - Return the most significant 1 bits of a 64-bit value.
- leftmost_
64_ 2 - Return the most significant 2 bits of a 64-bit value.
- leftmost_
64_ 4 - Return the most significant 4 bits of a 64-bit value.
- leftmost_
64_ 8 - Return the most significant 8 bits of a 64-bit value.
- leftmost_
64_ 16 - Return the most significant 16 bits of a 64-bit value.
- leftmost_
64_ 32 - Return the most significant 32 bits of a 64-bit value.
- low_1
- Return
u1::MIN
= 1. - low_8
- Return
u8::MIN
. - low_16
- Return
u16::MIN
. - low_32
- Return
u32::MIN
. - low_64
- Return
u64::MIN
. - maj_1
- Bitwise MAJORITY of three 1-bit values. The output bit is false if two or more input bits are false, and true otherwise.
- maj_8
- Bitwise MAJORITY of three 1-bit values. The output bit is false if two or more input bits are false, and true otherwise.
- maj_16
- Bitwise MAJORITY of three 1-bit values. The output bit is false if two or more input bits are false, and true otherwise.
- maj_32
- Bitwise MAJORITY of three 1-bit values. The output bit is false if two or more input bits are false, and true otherwise.
- maj_64
- Bitwise MAJORITY of three 1-bit values. The output bit is false if two or more input bits are false, and true otherwise.
- or_1
- Bitwise OR of two 1-bit values.
- or_8
- Bitwise OR of two 8-bit values.
- or_16
- Bitwise OR of two 16-bit values.
- or_32
- Bitwise OR of two 32-bit values.
- or_64
- Bitwise OR of two 64-bit values.
- right_
extend_ 8_ 16 - Extend an 8-bit value to a 16-bit value by padding its right with the MSB.
- right_
extend_ 8_ 32 - Extend an 8-bit value to a 32-bit value by padding its right with the MSB.
- right_
extend_ 8_ 64 - Extend an 8-bit value to a 64-bit value by padding its right with the MSB.
- right_
extend_ 16_ 32 - Extend a 16-bit value to a 32-bit value by padding its right with the MSB.
- right_
extend_ 16_ 64 - Extend a 16-bit value to a 64-bit value by padding its right with the MSB.
- right_
extend_ 32_ 64 - Extend a 16-bit value to a 64-bit value by padding its right with the MSB.
- right_
pad_ high_ 1_ 8 - Extend a 1-bit value to an 8-bit value by padding its right with ones.
- right_
pad_ high_ 1_ 16 - Extend a 1-bit value to a 16-bit value by padding its right with ones.
- right_
pad_ high_ 1_ 32 - Extend a 1-bit value to a 32-bit value by padding its right with ones.
- right_
pad_ high_ 1_ 64 - Extend a 1-bit value to a 64-bit value by padding its right with ones.
- right_
pad_ high_ 8_ 16 - Extend an 8-bit value to a 16-bit value by padding its right with ones.
- right_
pad_ high_ 8_ 32 - Extend an 8-bit value to a 32-bit value by padding its right with ones.
- right_
pad_ high_ 8_ 64 - Extend a 1-bit value to a 64-bit value by padding its right with ones.
- right_
pad_ high_ 16_ 32 - Extend a 16-bit value to a 32-bit value by padding its right with ones.
- right_
pad_ high_ 16_ 64 - Extend a 16-bit value to a 64-bit value by padding its right with ones.
- right_
pad_ high_ 32_ 64 - Extend a 32-bit value to a 64-bit value by padding its right with ones.
- right_
pad_ low_ 1_ 8 - Extend a 1-bit value to an 8-bit value by padding its right with zeroes.
- right_
pad_ low_ 1_ 16 - Extend a 1-bit value to a 16-bit value by padding its right with zeroes.
- right_
pad_ low_ 1_ 32 - Extend a 1-bit value to a 32-bit value by padding its right with zeroes.
- right_
pad_ low_ 1_ 64 - Extend a 1-bit value to a 64-bit value by padding its right with zeroes.
- right_
pad_ low_ 8_ 16 - Extend an 8-bit value to a 16-bit value by padding its right with zeroes.
- right_
pad_ low_ 8_ 32 - Extend an 8-bit value to a 32-bit value by padding its right with zeroes.
- right_
pad_ low_ 8_ 64 - Extend an 8-bit value to a 64-bit value by padding its right with zeroes.
- right_
pad_ low_ 16_ 32 - Extend a 16-bit value to a 32-bit value by padding its right with zeroes.
- right_
pad_ low_ 16_ 64 - Extend a 16-bit value to a 64-bit value by padding its right with zeroes.
- right_
pad_ low_ 32_ 64 - Extend a 32-bit value to a 64-bit value by padding its right with zeroes.
- right_
rotate_ 8 - Right-rotate an 8-bit value by the given amount.
- right_
rotate_ 16 - Right-rotate a 16-bit value by the given amount.
- right_
rotate_ 32 - Right-rotate a 32-bit value by the given amount.
- right_
rotate_ 64 - Right-rotate a 64-bit value by the given amount.
- right_
shift_ 8 - Right-shift an 8-bit value by the given amount. Bits are filled with zeroes.
- right_
shift_ 16 - Right-shift a 16-bit value by the given amount. Bits are filled with zeroes.
- right_
shift_ 32 - Right-shift a 32-bit value by the given amount. Bits are filled with zeroes.
- right_
shift_ 64 - Right-shift a 64-bit value by the given amount. Bits are filled with zeroes.
- right_
shift_ with_ 8 - Right-shift an 8-bit value by the given amount. Bits are filled with the given bit.
- right_
shift_ with_ 16 - Right-shift a 16-bit value by the given amount. Bits are filled with the given bit.
- right_
shift_ with_ 32 - Right-shift a 32-bit value by the given amount. Bits are filled with the given bit.
- right_
shift_ with_ 64 - Right-shift a 64-bit value by the given amount. Bits are filled with the given bit.
- rightmost_
8_ 1 - Return the least significant 1 bits of an 8-bit value.
- rightmost_
8_ 2 - Return the least significant 1 bits of an 8-bit value.
- rightmost_
8_ 4 - Return the least significant 1 bits of an 8-bit value.
- rightmost_
16_ 1 - Return the least significant 1 bit of a 16-bit value.
- rightmost_
16_ 2 - Return the least significant 2 bits of a 16-bit value.
- rightmost_
16_ 4 - Return the least significant 4 bits of a 16-bit value.
- rightmost_
16_ 8 - Return the least significant 8 bits of a 16-bit value.
- rightmost_
32_ 1 - Return the least significant 1 bit of a 32-bit value.
- rightmost_
32_ 2 - Return the least significant 2 bits of a 32-bit value.
- rightmost_
32_ 4 - Return the least significant 4 bits of a 32-bit value.
- rightmost_
32_ 8 - Return the least significant 8 bits of a 32-bit value.
- rightmost_
32_ 16 - Return the least significant 16 bits of a 32-bit value.
- rightmost_
64_ 1 - Return the least significant 1 bits of a 64-bit value.
- rightmost_
64_ 2 - Return the least significant 2 bits of a 64-bit value.
- rightmost_
64_ 4 - Return the least significant 4 bits of a 64-bit value.
- rightmost_
64_ 8 - Return the least significant 8 bits of a 64-bit value.
- rightmost_
64_ 16 - Return the least significant 16 bits of a 64-bit value.
- rightmost_
64_ 32 - Return the least significant 32 bits of a 64-bit value.
- some_1
- Check if a 1-bit value is nonzero.
- some_8
- Check if an 8-bit value is nonzero.
- some_16
- Check if a 16-bit value is nonzero.
- some_32
- Check if a 32-bit value is nonzero.
- some_64
- Check if a 64-bit value is nonzero.
- xor_1
- Bitwise XOR of two 1-bit values.
- xor_8
- Bitwise XOR of two 8-bit values.
- xor_16
- Bitwise XOR of two 16-bit values.
- xor_32
- Bitwise XOR of two 32-bit values.
- xor_64
- Bitwise XOR of two 64-bit values.
- xor_
xor_ 1 - Bitwise XOR of three 1-bit values.
- xor_
xor_ 8 - Bitwise XOR of three 8-bit values.
- xor_
xor_ 16 - Bitwise XOR of three 16-bit values.
- xor_
xor_ 32 - Bitwise XOR of three 32-bit values.
- xor_
xor_ 64 - Bitwise XOR of three 64-bit values.