Trait deepmesa_collections::bitvec::traits::AsLsb0 [−][src]
Expand description
Converts bits to an Lsb0
ordering.
Given a specified number of bits, shift them right (towards the LSB) to produce an ordering such that those bits are counted from the LSB to the MSB
Examples
use deepmesa::collections::bitvec::AsLsb0; let val: u8 = 0b1100_0000; let converted = val.as_lsb0(4); assert_eq!(converted, 0b0000_1100);
If the bitcount equals the size of Self
(in bits) then the value
is unchanged.
Examples
use deepmesa::collections::bitvec::AsLsb0; let val: u8 = 0b1010_1100; let converted = val.as_lsb0(8); assert_eq!(converted, 0b1010_1100);