bit_rev_32

Function bit_rev_32 

Source
pub fn bit_rev_32(x: u32) -> u32
Expand description

Reverses the bits in a 32-bit number.

ยงExample

let a: u32 = 2^8 + 2^4 + 1;

assert_eq!(format!("{:b}", a), "1101");
assert_eq!(format!("{:b}", bit_rev_32(a)), "10110000000000000000000000000000");