I.e. the result is 1, if both x and y are 1, and 0 otherwise. If 0 is equated with false, and 1 with true the bit and operation works like our logical and.
Binary and can work on binary numbers of any size, the numbers are simply anded digit by digit. For example:
x: 10001101 y: 01010111 x AND y: 00000101
(Only in the first, and third column from the right, both operands had 1 digits.)
and is often called masking, because y can be seen as a mask which is transparent (1) in some places (x will shine through), and black (0) in others (x will be blocked).
An ordered binary arrangement of the hexagrams of the I Ching, representing the decimal sequence from 0 to 63, and a method for generating the same, was developed by the Chinese scholar and philosopher Shao Yong in the 11th century.
A binary number can be represented by any sequence of bits (binarydigits), which in turn may be represented by any mechanism capable of being in two mutually exclusive states.
When a string of binary symbols is manipulated in this way, it is called a bitwise operation; the logical operators AND, OR, and XOR may be performed on corresponding bits in two binarynumerals provided as input.