Bitwise Operation

In digital computer programming, a bitwise operation operates on one or more bit patterns or binary numerals at the level of their individual bits.

It is a fast, simple action directly supported by the processor, and is used to manipulate values for comparisons and calculations.

Input 1

Input 2

Operation

AND OR XOR NOT

Result

Explanation:

A bitwise AND takes two equal-length binary representations and performs the logical AND operation on each pair of the corresponding bits, by multiplying them. Thus, if both bits in the compared position are 1, the bit in the resulting binary representation is 1 (1 × 1 = 1); otherwise, the result is 0 (1 × 0 = 0 and 0 × 0 = 0).

SURAJ KUMAR
Info source GitHub