Skip to main content

Convert numbers between different number systems: binary (base 2), decimal (base 10), hexadecimal (base 16), and octal (base 8). Essential for programming, computer science, and digital electronics.

Binary Converter

Enter a number in any field and the others will update automatically.

0b
Valid characters: 0, 1
Valid characters: 0-9
0x
Valid characters: 0-9, A-F
0o
Valid characters: 0-7
Privacy: All conversions are done in your browser. No data is uploaded or stored.

Quick Reference

Decimal Binary Hex Octal
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000810
91001911
101010A12
111011B13
121100C14
131101D15
141110E16
151111F17

How to Use

  1. Enter a number in any of the four input fields
  2. The other three fields will automatically update with the converted values
  3. Click the copy button next to any field to copy that value
  4. Use "Clear All" to reset all fields

Number System Basics:

  • Binary (Base 2): Uses only 0 and 1. The foundation of digital computing.
  • Decimal (Base 10): Our standard counting system using 0-9.
  • Hexadecimal (Base 16): Uses 0-9 and A-F. Common in programming for compact representation.
  • Octal (Base 8): Uses 0-7. Used in some programming contexts and file permissions.

Frequently Asked Questions

Why do we use different number systems?

Binary is the native language of computers (on/off states). Hexadecimal provides a compact way to represent binary data. Octal was popular in early computing and is still used for Unix file permissions.

What do the prefixes 0b, 0x, and 0o mean?

These are standard programming prefixes: 0b for binary, 0x for hexadecimal, and 0o for octal. They help identify the number system being used.

What's the largest number this can convert?

This tool uses JavaScript's Number type, which can safely handle integers up to 2^53 - 1 (about 9 quadrillion). For larger numbers, use a BigInt-capable tool.

Can I convert negative numbers?

This tool works with positive integers. For negative numbers in binary, you'd typically use two's complement representation, which requires specifying a bit width.

How is hex used in programming?

Hexadecimal is used for colors (#FF0000 for red), memory addresses, character codes, and any time you need a compact way to represent binary data. Each hex digit represents exactly 4 binary digits.