Skip to content

Instantly share code, notes, and snippets.

@reza-rahman-rx
Created December 25, 2017 23:44
Show Gist options
  • Select an option

  • Save reza-rahman-rx/c311edb94dbf3e1d7ea411be937122e1 to your computer and use it in GitHub Desktop.

Select an option

Save reza-rahman-rx/c311edb94dbf3e1d7ea411be937122e1 to your computer and use it in GitHub Desktop.
let bitOne = 0b100111
let bitTwo = 0b101000
print(String(bitOne<<2, radix: 2)) // Print the output 10011100
print(String(bitOne>>2, radix: 2)) // Print the output 1001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment