I love to see people writing Bit Twiddling code but I just can\'t understand it at all. Gone through Hacker\'s Delight and http://graphics.stanford.edu/~seander/bithacks.html, b
What is the easiest way to calculate the output of bits for example 1 | 2 = 3.
Write out the numbers as binary. This is how the numbers are really represented.
00000001 | 00000010 = 00000011