ELI5: Explain Like I'm 5

Bitwise AND

Bitwise AND is when you take two numbers and compare each individual bit in those numbers to see if they match. A bit is like a little switch that can either be on or off, 1 or 0.

For example, if you have the numbers 6 and 3, they would be represented in binary (which is just a way of writing numbers in terms of 1s and 0s) as 110 and 011. When we apply a bitwise AND operation, we compare each corresponding bit in the two numbers.

```
110 (6 in binary)
& 011 (3 in binary)
------
010 (the result of the bitwise AND)
```

As you can see, only the 1st and 3rd bit match, so the resulting number is 010, which is 2 in decimal form.

So what's the point of this? One common use case of bitwise AND is to check if a certain bit in a binary number is turned on or off. For example, if you have the number 7 (111 in binary) and you want to check if the 2nd bit (which is worth 2) is turned on, you can use a bitwise AND with 010:

```
111 (7 in binary)
& 010 (2nd bit "mask")
------
010 (result, which is greater than 0)
```

Since the result is greater than 0, we know that the 2nd bit is turned on in the number 7.

So there you have it, bitwise AND is when you compare the binary digits of two numbers and only keep the common ones that are 'on'.