Các toán tử Bitwise trong JavaScript coi toán hạng là dãy 32 bit. Danh sách toán tử:
| STT | Toán tử & Tên |
|---|---|
| 1 | & – Bitwise AND |
| 2 | | – Bitwise OR |
| 3 | ^ – Bitwise XOR |
| 4 | ~ – Bitwise NOT |
| 5 | << – Bitwise Zero fill left shift |
| 6 | >> – Bitwise Signed right shift |
| 7 | >>> – Bitwise Zero-fill right shift |
Ví dụ về toán tử OR (|):
Ví dụ
<!DOCTYPE html>
<html>
<body>
<script>
document.write("Toán tử Bitwise OR<br>");
// 7 = 00000000000000000000000000000111
// 1 = 00000000000000000000000000000001
document.write(7 | 1);
</script>
</body>
</html>