Advertisement
cwchen

[Rust] Some bitwise calculations

Aug 22nd, 2017
558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.13 KB | None | 0 0
  1. fn main() {
  2.     assert_eq!(0b0011u32 & 0b0101, 0b0001);
  3.     assert_eq!(0b0011u32 | 0b0101, 0b0111);
  4.     assert_eq!(1u32 << 5, 32);
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement