Skip to content

Instantly share code, notes, and snippets.

@kogai
Created April 30, 2018 07:54
Show Gist options
  • Select an option

  • Save kogai/00133eb5133ee8a359998ec6888662e2 to your computer and use it in GitHub Desktop.

Select an option

Save kogai/00133eb5133ee8a359998ec6888662e2 to your computer and use it in GitHub Desktop.
fn main() {
// let bits = "000000000001010101111111100100101".to_owned();
let bits = "AAAAABBBBCCCDDE".to_owned();
let bit_vec = vec![0b000000u8, 0b00010101, 0b01111111, 0b11110010, 0b0101];
println!("{:?} {:?}", bits, &bit_vec);
println!("{:b} {}", 255, 0b01010101);
println!("{:b} {:b}", 5, 242);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment