🎓 Computer Science • Number Systems
100% Client-Side Privacy
Binary Converter (Base 2 ⇄ Dec, Hex, Oct)
Converts base-2 binary strings into decimal, hexadecimal, and octal representations with positional powers of 2 breakdown.
Presets:
Interactive Register Bit-Strip (Click Bits to Toggle)
Decimal (Base 10)
255
Signed 8-bit: -1 | Signed 16-bit: 255
Binary (Base 2)
1111 1111
Prefix:
0b11111111Hexadecimal (Base 16)
0xFF
Nibbles: F F
Octal (Base 8) & ASCII
0o377
ASCII Char: Non-printable
Positional Weight Expansion (Base 2)
(1 × 2^7 = 128) + (1 × 2^6 = 64) + (1 × 2^5 = 32) + (1 × 2^4 = 16) + (1 × 2^3 = 8) + (1 × 2^2 = 4) + (1 × 2^1 = 2) + (1 × 2^0 = 1) = 255
What is the Binary Number System?
The binary system is a base-2 numeral system that represents numeric values using two symbols: 0 and 1. It is the fundamental language of digital electronic computers.
Formula & Step-by-Step Calculation
Decimal = Σ [ b_i × 2^i ]
Sum of each binary bit times its power of 2 position.
Worked Step-by-Step Examples
Example 1
Convert binary 1101 to decimal
Solution: 13 (1×8 + 1×4 + 0×2 + 1×1 = 13)
• (1×2³) + (1×2²) + (0×2¹) + (1×2⁰) = 8 + 4 + 0 + 1 = 13
Common Real-World & Academic Use Cases
- ✓ Low-level firmware hardware register manipulation
- ✓ Memory addressing byte boundary calculations
- ✓ Network IP address bit masking
How to Use the Binary Converter (Base 2 ⇄ Dec, Hex, Oct)
1
Input Binary String
Enter binary sequence of 0s and 1s.
2
Read Base Values
Inspect equivalent Decimal, Hexadecimal, and Octal.
Frequently Asked Questions
Q: Why do computers use binary instead of decimal?
Binary states (0 and 1) map directly to physical hardware voltage states (OFF and ON) in transistors.