Binary to Decimal, Hex & Octal Converter
What is the binary or hex value?
Binary, Octal, Decimal & Hex Converter
Convert between all four bases instantly. See bit-weight visualization, base digit comparison, nearby powers of 2, and 1/0 distribution. Results update live as you type.
Quick Values
Any integer (negative OK)
Results are for informational purposes only.
Related Calculators
Password Generator
How strong should your password be?
Phone Number Extractor
Extract, normalize, and deduplicate every phone number from any text instantly.
URL Extractor
Extract, deduplicate, and analyze every URL from any text or HTML instantly.
Contact Info Extractor
Extract emails, names, phones, companies, and addresses from any text at once.
Email Extractor
Extract, deduplicate, and validate every email address from any text instantly.
Email Verifier & Validator
Validate and score every email address — single or bulk — before you send.
Get this result by email
We'll send you this summary so you can revisit it anytime — useful when making a final decision.
🔒 We'll only send your result. No spam, no noise.
Convert any number between binary (base 2), decimal (base 10), octal (base 8), and hexadecimal (base 16) — with step-by-step division work, 8-bit and 16-bit visualizations, and a color swatch if your hex value is a valid CSS color. Programmers switch between number bases constantly. Hex is used for memory addresses, color codes, and byte values. Binary is the native language of digital logic. Octal appears in Unix file permissions. Decimal is how humans think. This calculator handles all four simultaneously so you never need to chain multiple tools or convert piecemeal. The bit visualization shows exactly which bits are set in 8-bit and 16-bit representations, including two's complement for negative numbers. The reference table shows powers of 2 side-by-side with their decimal, binary, and hex equivalents — a cheat sheet for anyone working at the hardware or systems level. Whether you are a CS student, an embedded developer, or a network engineer, this tool removes the mental overhead of base arithmetic entirely.
- →Converting hex color codes (e.g., #FF5733) to decimal RGB values for CSS or design work
- →Understanding binary representations of integers for low-level programming or computer science courses
- →Checking Unix file permissions written in octal (e.g., chmod 755)
- →Learning or teaching number base conversion with step-by-step division walkthrough
- →Verifying byte values when debugging binary data, network packets, or file formats
You're debugging a network packet and see the hex value 0x1A2B. Enter 1A2B with hex as the input base. Result: decimal 6,699, binary 1101000101011, octal 15053. The bit view shows the 16-bit pattern with bits 0, 1, 3, 8, 10, 11, 12 set. You can verify the bit pattern matches the protocol spec field by field, confirming no data corruption was introduced.
How does binary to decimal conversion work?
Each binary digit (bit) represents a power of 2, starting from the rightmost bit (position 0). Multiply each bit by its positional value and sum them. For 1011: (1×8) + (0×4) + (1×2) + (1×1) = 8+0+2+1 = 11. The step-by-step view shows the reverse process: repeated division by 2 with remainders read bottom-to-top.
What is two's complement and why does it matter for negative numbers?
Two's complement is the standard way computers represent negative integers in binary. To negate a number: flip all bits, then add 1. For example, -5 in 8-bit two's complement is 11111011. This system has one representation of zero and makes arithmetic consistent — adding a negative number works the same as subtracting, so CPUs only need an adder circuit.
Why is hexadecimal so common in programming?
One hex digit maps exactly to 4 binary bits (a nibble), and two hex digits map to one byte. This makes hex a compact, human-readable representation of binary data. Memory addresses, color codes, file format magic numbers, and byte values are all naturally expressed in hex. It's much easier to read 0xFF than 11111111 or 255 depending on context.
What are Unix file permissions in octal?
Unix permissions have three groups (owner, group, others), each with three flags (read=4, write=2, execute=1). Summing the flags gives a digit 0-7, and three digits give the full permission. chmod 755 means owner has read+write+execute (7), group has read+execute (5), others have read+execute (5). Octal maps cleanly to these 3-bit groups.
What is the largest value that fits in 8 bits vs 16 bits?
An unsigned 8-bit integer holds values 0–255 (2^8 - 1). A signed 8-bit integer holds -128 to +127. An unsigned 16-bit integer holds 0–65,535 (2^16 - 1), and signed holds -32,768 to +32,767. These limits explain common errors like integer overflow — for example, a counter stored in a byte will wrap from 255 back to 0 when incremented.
Related Tools
IP Subnet Calculator
What subnet settings does your network need?
Password Generator
How strong should your password be?
Email Extractor
Extract, deduplicate, and validate every email address from any text instantly.
Phone Number Extractor
Extract, normalize, and deduplicate every phone number from any text instantly.