[−][src]Trait bitintr::Rbit
Bit reverse
Required methods
fn rbit(self) -> Self
Reverse the bit order.
Instructions
- [
RBIT
](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc. ddi0487a.k_10775/index.html):- Description: Reverse Bits reverses the bit order in a register.
- Architecture: ARMv7, ARMv8.
- Registers: 32 (v7) / 64 (v8) bits.
Example
assert_eq!(0b0011_0001_u8.rbit(), 0b1000_1100_u8); assert_eq!(0b0000_0000_0100_1011_u16.rbit(), 0b1101_0010_0000_0000_u16); assert_eq!( 0b11111111_u32.rbit(), 0b11111111_00000000_00000000_00000000_u32 );