All tools · Converters

Number Base

Convert between binary, octal, decimal, and hexadecimal.

Free to use, no sign-up required. Number Base is one of 198 tools built into Xenition, alongside a chat that can use them for you.

Converts a whole number between binary, octal, decimal and hexadecimal, for programming, networking and computer science homework.

How to use Number Base

  1. Type a number into Enter a number.
  2. Choose which base it is written in: Binary, Octal, Decimal or Hex.
  3. Read the same value in all four bases below.

How it works

The input is checked digit by digit against the chosen base, so a 2 in a binary number is rejected instead of being silently cut off. It is then parsed and written out in bases 2, 8, 10 and 16, with hex letters in capitals. Only non-negative whole numbers without a prefix are accepted: enter FF, not 0xFF. Values above 9,007,199,254,740,991 (2^53 − 1) lose precision.

Example

255 in decimal is 11111111 in binary, 377 in octal and FF in hex.

Questions about Number Base

Why do programmers use hexadecimal?

One hex digit is exactly four binary digits, so a byte is always two hex digits. FF is 11111111, which is far easier to read and type.

How do I convert binary to decimal by hand?

Add the powers of two where there is a 1, counting from 0 on the right. 1011 is 8 + 0 + 2 + 1 = 11.

Use it from chat

You do not have to open Number Base to use it. Ask Xenition in plain language and it runs the right tool, then carries the answer into whatever you are working on — a document, a spreadsheet, a deck.

Related tools