🌐 Network & Internet Calculators › Number Encoding

Binary Converter (Binary, Decimal, Hex & Octal)

Live-synced binary, decimal, hexadecimal, and octal fields with bit-length, byte grouping, ASCII, and signed two's complement views for 8- and 16-bit values.

Binary — interactive calculator, computed instantly in your browser.

📚 Authoritative Educational Guide

Binary, Hex, and Octal: Converting Between Number Bases the Fast Way

Binary, decimal, hexadecimal, and octal are the same numbers wearing different place-value systems. Base 10 counts powers of ten, base 2 counts powers of two, base 16 counts powers of sixteen — the conversion rules never change, only the digit alphabet does. The converter syncs all four fields live and adds bit length, byte grouping, ASCII, and signed two's complement views.

1. Binary to Decimal by Place Value

1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11₁₀
  • Each binary digit doubles right to left: 1, 2, 4, 8, 16, 32, 64, 128 …
  • Add the place values where a 1 sits: 110101₂ = 32 + 16 + 4 + 1 = 53
  • Reverse (decimal → binary): divide by 2 repeatedly and read the remainders bottom-up — 53 → 110101
  • Eight bits make a byte: 255 is the largest unsigned byte value (2⁸ − 1)

2. The Nibble Trick: Binary ↔ Hex

  • Four bits = one hex digit — split the byte in half and translate each nibble independently
  • 1111 1111 → F F → 0xFF; 0011 1010 → 3 A → 0x3A
  • Hex digits run 0–9 then A–F (A = 10 … F = 15), one symbol per four-bit pattern
  • That is why hex dominates debugging output: two digits per byte, readable at a glance

3. Octal: Grouping by Three

377₈ = 3×64 + 7×8 + 7 = 255₁₀
  • Octal groups binary in threes — 11 111 111 → 3 7 7 → 377
  • Historically popular for Unix permissions (chmod 755) and mainframe dumps
  • Two octal digits cover slightly more than a byte (8 bits = 2⅔ octal digits), so alignment is clumsier than hex
  • Any base conversion follows the same engine: repeatedly divide by the base and collect remainders

4. Signed Values and Two's Complement

Computers read bytes as signed using two's complement: the top bit is the sign, so 8-bit 11111111 is −1, not 255, and the signed range runs −128 to +127. To negate: invert every bit, add one. 00000101 (5) → invert 11111010 → +1 = 11111011 (−5). The converter prints both interpretations for values that fit, so 0xFF never leaves you guessing between 255 and −1.

🔗 Data Representation Cross-References

Every byte on the wire is binary — base conversion is the reading layer over the 🌐 Tech & Network Hub measurement tools.

Sizes count bytes; bases count bits: pair the converter below with the data-size tools when a hex dump has to become a human number.

Frequently Asked Questions (Binary)

How do you convert 1011 from binary to decimal?

Add the place values where each 1 sits: 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 8 + 2 + 1 = 11 in decimal. Binary places double going right to left (1, 2, 4, 8, 16 …), so each digit's position sets its weight.

How do I convert decimal to binary?

Divide the number by 2 and keep the remainders: 255 ÷ 2 = 127 r1, 127 ÷ 2 = 63 r1, and so on — reading the remainders bottom-up gives 11111111. The calculator does this instantly for any value up to the safe-integer limit.

Why do programmers use hexadecimal instead of decimal?

Hex digits map to exact 4-bit nibbles, so one byte reads as two hex digits (0xFF) instead of an awkward decimal (255) or nine-digit binary string. Every bit pattern is representable without rounding — binary 0–9,A–F covers all 16 four-bit values exactly.

What does two's complement mean for signed numbers?

The most significant bit becomes a sign bit, splitting the byte's range: 8-bit unsigned 0–255 becomes signed −128 to +127, so 11111111 = −1. To negate a value, invert all bits and add one — this is why 0xFF reads as 255 unsigned but −1 signed in the converter.