Commit 732e5b9d authored by BRENO RILHO LEMOS's avatar BRENO RILHO LEMOS

Operations with bits

parent 5c21d5ab
Assume A = 60 and B = 13 in binary format, they will be as follows
A = 0011 1100
B = 0000 1101
-----------------
A&B = 0000 1100 -> Bitwise AND
A|B = 0011 1101 -> Bitwise OR
A^B = 0011 0001 -> XOR
~A = 1100 0011 -> Bitwise NOT
A>>1 = 0001 1110 -> Right Shift
B<<2 = 0011 0100
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment