🔢 Binary Calculator
Perform bitwise operations: AND, OR, XOR, NOT, shifts, and more
Decimal: 170
Hex: 0xAA
Both bits must be 1
Decimal: 204
Hex: 0xCC
Result
Binary
10001000
Decimal
136
Hexadecimal
0x88
Quick Convert
Truth Tables
Basic Operations
| A | B | AND | OR | XOR |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 |
Advanced Operations
| A | B | NAND | NOR | XNOR |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 1 |
Common Use Cases
Masking (AND)
Extract specific bits: 10101010 AND 00001111 = 00001010
Toggle Bits (XOR)
Flip specific bits: 10101010 XOR 11110000 = 01011010
Set Bits (OR)
Turn on specific bits: 10100000 OR 00001010 = 10101010