Number System Converter
Type a value in any base and see it instantly converted to decimal, binary, octal and hexadecimal.
Base Converter
● liveNumber Systems
A number system expresses values using a fixed set of symbols. The count of symbols used is its base or radix.
Decimal10
Digits 0–9. The system we use daily.
Binary2
Digits 0–1. The native language of computers.
Octal8
Digits 0–7. Used for Unix file permissions.
Hexadecimal16
Digits 0–9, A–F. A compact, human-friendly view of binary.
In any number, the rightmost digit is the Least Significant Digit/Bit (LSD/LSB) and the leftmost is the Most Significant Digit/Bit (MSD/MSB).
Conversion Rules
Decimal → Binary/Octal/Hex
Repeatedly divide by the target base, noting each remainder. Read remainders bottom-to-top.
Binary → Decimal
Multiply each bit by its positional power of 2, then sum.
Octal ⇄ Binary
Each octal digit ⇄ a 3-bit binary group (pad with leading zeros as needed).
Hexadecimal ⇄ Binary
Each hex digit ⇄ a 4-bit binary group (pad with leading zeros as needed).
Binary Addition
Binary addition follows its own rule table, since the base is 2, not 10.
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Try it — add two binary numbers
Use only 0s and 1s.
Numeric Representation
Numbers without a fractional part are integers; with one, they're floating point. A fixed-size group of bits handled as a unit is a word (word length: 8, 16, 32, 64 bits…).
Sign & Magnitude
MSB = sign (0 positive, 1 negative); remaining bits = magnitude.
= −25 (8-bit)
1's Complement
Take the true binary form, flip every 0→1 and 1→0.
= −87 (8-bit)
2's Complement
Find the 1's complement, then add 1. Most commonly used by computers.
= −25 (8-bit)
Floating Point Numbers
A floating point number has a Mantissa (the significant digits, normalised like 0.134) and an Exponent (how far to shift the point) — just like scientific notation, but computers use powers of 2 instead of 10.
Character Representation
Letters, digits and symbols also need a binary code so computers can store and exchange text.
| Encoding | Bits | Character Range | Used For | Limitation |
|---|---|---|---|---|
| ASCII | 7 | 2⁷ = 128 | English text, control codes | Limited characters |
| Extended ASCII | 8 | 2⁸ = 256 | European characters | Not global |
| Unicode | 16–32 | 2⁸ – 2³² | Global language support | Requires more storage |
ASCII (1963) standardised English text but couldn't cover world scripts. Unicode, maintained by the Unicode Consortium, solves this — commonly encoded as UTF-8, UTF-16 or UTF-32, and defines over a million code points.
Multimedia File Formats
Images, audio and video are also just binary — pixels, sound samples, and frames encoded and compressed.
Images — built from pixels, each stored as 24-bit RGB
| Format | Compression | Transparency | Animation | Common Use |
|---|---|---|---|---|
| BMP | Uncompressed | No | No | Windows apps, raw storage |
| JPEG | Lossy | No | No | Photos, web images |
| PNG | Lossless | Yes | No | Logos, transparent images |
| GIF | Lossless | Yes | Yes | Web animations, memes |
| TIFF | Lossy/Lossless | Yes | Yes | Professional design |
Audio — analog sound digitised into samples
| Format | Compression | Quality | Common Uses |
|---|---|---|---|
| WAV | Uncompressed | Excellent | Studio recording, editing |
| MP3 | Lossy | Good | Music, streaming |
| AAC | Lossy | Better than MP3 | Streaming, Apple devices |
| FLAC | Lossless | Excellent | Archiving, audio editing |
| OGG | Lossy | Good | Gaming, open-source apps |
| WMA | Lossy/Lossless | Good–Excellent | Windows apps |
Video — frames (24–60 fps) synced with audio
| Format | Developer | Quality | Common Uses |
|---|---|---|---|
| AVI | Microsoft | Excellent | Editing, archiving |
| MP4 | MPEG | High | Web, mobile, streaming |
| MKV | Open Source | Very High | Movies, HD videos |
| MOV | Apple | Excellent | Professional editing |
| WebM | High | HTML5 streaming |
Quick Recap
Tap a question to reveal the answer.
What is the base (radix) of the hexadecimal system, and what symbols does it use?
Base 16 — digits 0–9 plus letters A–F, where A=10 through F=15.
How do you convert an octal number to binary?
Convert each octal digit to its 3-bit binary equivalent using the conversion table, then combine the groups.
What are MSB and LSB?
MSB (Most Significant Bit) is the leftmost bit, with the largest place value. LSB (Least Significant Bit) is the rightmost bit, with the smallest place value.
Which method is most commonly used by computers to represent negative integers, and why?
2's Complement — it is simple, efficient, and avoids problems (like two representations of zero) found in sign-magnitude and 1's complement methods.
What's the difference between lossy and lossless compression?
Lossy compression discards some data for a smaller file size (e.g. JPEG, MP3). Lossless compression removes only redundant data, so the original can be perfectly reconstructed (e.g. PNG, FLAC).
Why was Unicode introduced when ASCII already existed?
ASCII (7-bit, 128 characters) and Extended ASCII (8-bit, 256 characters) couldn't represent the characters and symbols of the world's many scripts. Unicode provides a universal, unambiguous encoding covering over a million code points.