Sprint 8 Converter + Math
Base Converter (Base 2 to 36)
Convert numbers between bases 2..36.
Output
0
How it works
Number base (radix) conversion translates a number expressed in one counting system to its equivalent in another. The most common conversions are between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) — all used extensively in computing. The Base Converter supports any base from 2 to 36, using digits 0–9 and letters A–Z for bases above 10.
**Core bases in computing** - **Binary (base 2)**: the fundamental machine language — each digit is 1 bit. A byte is 8 binary digits: 11111111₂ = 255₁₀. - **Octal (base 8)**: groups binary digits in triplets; used in Unix file permissions (chmod 755 = 111 101 101₂ = read-write-execute for owner, read-execute for group/others). - **Hexadecimal (base 16)**: groups binary digits in nibbles (4 bits); one byte = exactly two hex digits (00–FF). Ubiquitous in memory addresses, colour codes, and cryptographic hashes. - **Decimal (base 10)**: human convention based on 10 fingers.
**Conversion algorithm** To convert from any base to decimal: Σ (digitᵢ × baseⁱ). To convert from decimal to any base: repeatedly divide by target base, record remainders in reverse. Example: 255₁₀ to hex: 255 ÷ 16 = 15 rem 15 (F); 15 ÷ 16 = 0 rem 15 (F) → FF₁₆.
**Bases above 16** Base 36 (hexatrigesimal) uses 0–9 and A–Z, giving 36 unique digits. It produces the most compact representation of large integers in printable ASCII. Used in URL shorteners, order IDs, and some database keys: a 6-character base-36 string encodes up to 36⁶ = 2.18 billion values.
**Two's complement** Signed integers in computers use two's complement notation. The converter displays the standard unsigned value; two's complement interpretation requires knowing the word size (8-bit, 16-bit, 32-bit, 64-bit).
Privacy: all conversion runs in the browser. No data is transmitted.
Frequently Asked Questions
- Binary maps directly to the two stable physical states of electronic circuits: high voltage (1) and low voltage (0), or transistor on/off. Using base 10 would require distinguishing 10 voltage levels reliably — extremely difficult in the presence of noise and manufacturing variation. Binary requires only one threshold (is the signal above or below halfway?), making it inherently noise-resistant. Claude Shannon's 1948 information theory formalized why binary is the optimal base for noisy channel communication.
- Unix file permissions are a 9-bit field: three groups (owner, group, others) × three permissions (read=4, write=2, execute=1). Each group maps to 3 binary bits = one octal digit. chmod 755 means: owner=7 (111₂ = rwx), group=5 (101₂ = r-x), others=5 (r-x). Reading binary permission flags from the `ls -l` output: -rwxr-xr-x = 111 101 101 binary = 755 octal. Octal is used specifically because 3 bits = 1 octal digit — it's a natural grouping of the binary permission bits.
- Hexadecimal (base 16) is used wherever binary data needs to be human-readable. Each hex digit represents exactly 4 bits (a nibble), so one byte = exactly two hex digits (00–FF). Uses: memory addresses (0x7fff5fbff8a0), colour codes (#FF5733 = R=255, G=87, B=51), hash values (SHA-256 = 64 hex chars = 32 bytes = 256 bits), binary file inspection (hex editors), network packet analysis, and UUID representation (550e8400-e29b-41d4-a716-446655440000).
- Base64 encoding is NOT the same as base-64 in number conversion. Base64 encoding is a scheme to represent arbitrary binary data using 64 ASCII printable characters (A-Z, a-z, 0-9, +, /) — it encodes 3 bytes as 4 characters. This converter's 'base 36' uses digits 0-9 and A-Z only (36 symbols). A true base-64 number system would need 64 unique digit symbols; Base64 encoding is a different concept (binary-to-text encoding, not positional number representation).