12 in binary = 1100
9 in binary = 1001
$a$b means return in each bit position a 1 if their is a one in that bit position in 12 or 9. So from above
0101 would be returned, which converted to base 10 is
5.
it's really quite simple, convert to binary, and perform the
operation on each bit position.
so 12 AND 9 would equal 1000 or 8
12 OR 9 would equal 1101 or 13
and so forth
ron