Number Base Converter
Convert between decimal, binary, hexadecimal, and octal instantly. Bitwise AND, OR, XOR operations. Perfect for programmers and CS students.
Why computers speak binary
The choice of binary in computing wasn't arbitrary — it was physical necessity. Transistors are electronic switches with two reliable states: conducting current (1) or blocking it (0). Engineering circuits that reliably distinguish ten states (decimal) would be orders of magnitude harder than two. Claude Shannon's 1948 paper "A Mathematical Theory of Communication" formalized the bit as the fundamental unit of information, cementing binary as the language of digital computing.
Hexadecimal emerged as a human-friendly bridge. Since 16 = 2⁴, each hex digit maps to exactly 4 bits. This means a byte (8 bits) always compresses to exactly 2 hex digits — much easier to read than 8 binary digits. Programmers, security researchers, and hardware engineers read hex fluently. Memory addresses like 0x7FFE4000, color codes like #1A2B3C, and SHA-256 hashes are all hexadecimal.
Bitwise operations in software
AND, OR, and XOR are the workhorses of low-level programming. Unix file permissions use bitwise flags (read=4, write=2, execute=1). Game engines use bitmasks to track player states. Cryptographic algorithms like AES rely heavily on XOR. Network subnet masks are AND operations. Understanding bitwise operations bridges the gap between high-level code and the silicon beneath it.
Source: Shannon, C.E. — "A Mathematical Theory of Communication" (1948); Knuth, D.E. — "The Art of Computer Programming"; IEEE Std 754.
Frequently asked questions
What is a number base?
How do I convert decimal to binary?
Why is hexadecimal used in programming?
What are bitwise operations (AND, OR, XOR)?
Why do computers use binary?
How do I convert hexadecimal to decimal?
Other calculators
Was this tool helpful?