๐Ÿ”ข All Bases - Live Converter

Type in any field - all others update instantly.

Decimal Base 10
Binary Base 2
Hexadecimal Base 16
Octal Base 8

Quick Values

๏ธ Bitwise Operations

Enter two decimal numbers and select an operation.

A (Binary)-
B (Binary)-
AND Result-
Result (Binary)-
Result (Hex)-
Operation Reference
๐Ÿ”ต
AND
1 only if both bits are 1.
Uses: masking, clearing bits
๐ŸŸข
OR
1 if either bit is 1.
Uses: setting bits
๐ŸŸก
XOR
1 if bits are different.
Uses: toggling, encryption
๐Ÿ”ด
NOT
Flips all bits (01, 10).
Uses: complementing
โฌ…๏ธ
Left Shift (<<)
Shifts bits left, multiplies by 2.
Uses: fast multiplication
๏ธ
Right Shift (>>)
Shifts bits right, divides by 2.
Uses: fast division

๐Ÿ”ค Text ASCII Converter

Decimal / Binary / Hex / Octal Reference

Common values across all 4 number systems.

DecimalBinaryHexOctalNotes

How Number Systems Work

Positional Number Systems

Every number system uses positional notation - each digit's value depends on its position (place value).

Decimal (Base 10): digits 0โ€“9
Binary (Base 2): digits 0โ€“1
Octal (Base 8): digits 0โ€“7
Hex (Base 16): digits 0โ€“9, Aโ€“F

Value = ฮฃ (digit ร— base^position)

Example: Decimal 255
= 2ร—10ยฒ + 5ร—10ยน + 5ร—10โฐ
= 200 + 50 + 5 = 255

Decimal Binary

Repeatedly divide by 2 and record remainders (read bottom to top).

Convert 13 to Binary:
13 รท 2 = 6 remainder 1 โ†‘
6 รท 2 = 3 remainder 0 โ†‘
3 รท 2 = 1 remainder 1 โ†‘
1 รท 2 = 0 remainder 1 โ†‘
Result: 1101 (read upward)

Binary Decimal

Multiply each bit by its power of 2 and sum them.

Convert 1101 to Decimal:
1ร—2ยณ + 1ร—2ยฒ + 0ร—2ยน + 1ร—2โฐ
= 8 + 4 + 0 + 1
= 13

Decimal Hexadecimal

Divide by 16, record remainders using 0โ€“9 and Aโ€“F.

Convert 255 to Hex:
255 รท 16 = 15 remainder 15 F โ†‘
15 รท 16 = 0 remainder 15 F โ†‘
Result: FF

Hex Binary (Shortcut)

Each hex digit = exactly 4 binary bits. Convert each digit independently.

Convert 1A3F to Binary:
1 0001
A 1010
3 0011
F 1111
Result: 0001 1010 0011 1111

Why Programmers Love Hex

1 byte = 8 bits = exactly 2 hex digits
FF hex = 1111 1111 binary = 255 decimal

Colors in web: #FF5733
= R:FF(255) G:57(87) B:33(51)

Memory addresses: 0x7FFF0000
IPv6 addresses: 2001:0db8:85a3::8a2e