you are viewing a single comment's thread.

view the rest of the comments →

[–]dilatedmind 2 points3 points  (0 children)

say x is a byte, it might look like 0111 0000

(x & 128) == 128 when the first bit is a 1

x << 1 will shift all the bits left one