Base converter — binary, octal, decimal, hex

Use this for bit masks, hex values like colors or memory addresses, or permission values. Enter a value in any field and the rest update instantly.

The file is never sent to a server — processed entirely in this browser

8-bit · 3 decimal digits

Two's complement bit width

Enter a negative number to see its two's complement representation at this bit width.

Bit view (8-bit)

11111111
7–0

Advertisement

How to use Base conversion

  1. 1Enter a number into any base field (0x and 0b prefixes and underscore separators are supported).
  2. 2Values in other bases are calculated instantly, with a bit view shown for up to 64 bits.
  3. 3For negative numbers, choose a bit width (8, 16, 32, 64) to see it in two's complement.

Frequently asked questions

Does this work with decimals?

Only integers are supported. In exchange, even huge integers convert precisely, with no digit limit.

What is two's complement?

This is how computers store negative numbers. For example, -1 in 8 bits is 11111111 (0xFF).

Advertisement