pub trait ToLowerBits {
type Boolean: BooleanTrait;
// Required methods
fn to_lower_bits_le(&self, k: usize) -> Vec<Self::Boolean>;
fn to_lower_bits_be(&self, k: usize) -> Vec<Self::Boolean>;
}
Expand description
Unary operator for converting to k
number of bits.
Required Associated Types§
type Boolean: BooleanTrait
Required Methods§
Sourcefn to_lower_bits_le(&self, k: usize) -> Vec<Self::Boolean>
fn to_lower_bits_le(&self, k: usize) -> Vec<Self::Boolean>
Outputs the lower k
bits of an n
-bit element in little-endian representation.
Enforces that the upper n - k
bits are zero.
Sourcefn to_lower_bits_be(&self, k: usize) -> Vec<Self::Boolean>
fn to_lower_bits_be(&self, k: usize) -> Vec<Self::Boolean>
Outputs the lower k
bits of an n
-bit element in big-endian representation.
Enforces that the upper n - k
bits are zero.