Skip to main content

Binary Converter

Binary (base-2), octal (base-8), decimal (base-10), and hexadecimal (base-16) are the four number systems every developer works with. Our converter instantly translates between all four, shows the bit-level breakdown for binary, and supports both unsigned and two's complement signed representation for negative numbers.

Number Systems

Decimal: Base 10 (0-9)

Binary: Base 2 (0-1)

Hexadecimal: Base 16 (0-F)

Octal: Base 8 (0-7)

Quick Examples

10 = 1010 = A = 12

255 = 11111111 = FF = 377

16 = 10000 = 10 = 20

Understanding Number Systems

Decimal (Base 10)

The number system we use daily. Each digit position represents a power of 10.

Binary (Base 2)

Used in computers. Each digit is either 0 or 1. Fundamental to digital systems.

Hexadecimal (Base 16)

Used in programming for colors (#FF5733), memory addresses, and more. More compact than binary.

Share this tool
Developer Tools

About the Binary Converter

Binary (base-2), octal (base-8), decimal (base-10), and hexadecimal (base-16) are the four number systems every developer works with. Our converter instantly translates between all four, shows the bit-level breakdown for binary, and supports both unsigned and two's complement signed representation for negative numbers.

How to use it

  1. Enter a number in any base: binary (0/1), octal (0–7), decimal (0–9), or hex (0–9, A–F).
  2. See instant conversion to all other bases.
  3. For binary: view the 8-bit, 16-bit, and 32-bit representation with padding.
  4. Toggle two's complement for signed integer representation.

Formula & methodology

Decimal to binary: repeatedly divide by 2, record remainders in reverse. Binary to decimal: Σ(bit × 2^position). Hex to binary: each hex digit = 4 bits (0=0000, F=1111). Two's complement negative: flip all bits, add 1. Example: −5 in 8-bit = 11111011.

Common use cases

  • Understanding CPU register values in debuggers
  • Working with bitwise operators (AND, OR, XOR, NOT, shifts)
  • RGB color values: hex #FF5733 = R:255 G:87 B:51
  • Network subnetting: IP addresses as binary
  • Embedded systems: reading sensor register values

Frequently asked questions

Two's complement is the standard way computers represent negative integers. To negate a number: flip all bits (one's complement), then add 1. This makes binary addition work the same for both positive and negative numbers — the CPU doesn't need special subtraction hardware. 8-bit two's complement ranges from −128 to +127.
One hex digit = exactly 4 binary bits, making hex a compact shorthand for binary. A 32-bit value takes 32 binary digits but only 8 hex digits. This is why memory addresses, color codes, and byte values are written in hex. 0xFF = 11111111 in binary = 255 in decimal.

Related tools

All Tools →

Embed this tool on your site

Free for personal and commercial use. Just copy the snippet below.