http://en.wikipedia.org/wiki/Bitwise_operation#AND

A bitwise AND takes two binary representations of equal length and performs the logical AND operation on each pair of corresponding bits. The result in each position is 1 if the first bit is 1 and the second bit is 1; otherwise, the result is 0. In this, we perform the multiplication of two bits; i.e., 1 × 0 = 0 and 1 × 1 = 1

For instance, you have a = 100 (01100100) and b = 50 (00110010), and if you write c = a & b (100 & 50 == 32) the result is:

01100100 (100)

00110010 (50)

------------

00100000 (32)

Since the 6th column (from the right) is the only one with a 1 in both a and b.

EDIT: Way too slow, it seems :-)