Bit operations: Test a bit
Problem: given int i, is bit n set (equal to 1)?
b
n
b
0
i
0000
0000
0000
0000
00
0
0
0000
0000
0010
bit n
How can we test if this bit is 1?