Bitwise Operations

What are bits?

Bits are the smallest increment of data on a computer. They are represented as a 0 or 1. When you group 8 bits together, you get one byte!

What is a bitwise operator?

In digital computer programming, a bitwise operator is used to perform bitwise operations on one or more bit patterns 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.

Let's see how they work!
Let's have a look at four bitwise operators: AND, OR, NOT, XOR.

Input 1:

Input 2:

Result:

Operation:

AND OR XOR NOT

Explanation: