---
meta:
  title: Bitwise AND
  description: The bitwise and operator takes the left number and ANDs it with the right number. The result is a number with the bits of the left number set to 1 if the same bit is set in both numbers and 0 if it is not.
---

The bitwise and operator takes the left number and ANDs it with the
right number. The result is a number with the bits of the left number
set to 1 if the same bit is set in both numbers and 0 if it is not.

```javascript
console.log(2 & 2); // 2
console.log(2 & 3); // 2
console.log(2 & 4); // 0
```
