Binary / Hex Converter
Convert between number bases with interactive bit visualization
Decimal
Hexadecimal
Binary
Octal
ASCII
Interactive Bits (click to toggle)
Quick Operations
Bitwise Calculator
Result
—
Number Base Reference
| Base | Prefix | Digits | Example |
|---|---|---|---|
| Binary (2) | 0b | 0-1 | 0b1010 = 10 |
| Octal (8) | 0o | 0-7 | 0o12 = 10 |
| Decimal (10) | (none) | 0-9 | 10 |
| Hexadecimal (16) | 0x | 0-9, A-F | 0xA = 10 |
Bitwise Operations
| Operation | Symbol | Description | Example |
|---|---|---|---|
| AND | & | 1 if both bits are 1 | 1010 & 1100 = 1000 |
| OR | | | 1 if either bit is 1 | 1010 | 1100 = 1110 |
| XOR | ^ | 1 if bits are different | 1010 ^ 1100 = 0110 |
| NOT | ~ | Inverts all bits | ~1010 = 0101 |
| Left Shift | << | Shift bits left (×2) | 0010 << 1 = 0100 |
| Right Shift | >> | Shift bits right (÷2) | 0100 >> 1 = 0010 |