Number Base Converter

Convert numbers between binary, decimal and hexadecimal right in your browser. The tool also shows two's complement — how negative values are stored in a processor's memory.

Type a number in any field — the others update automatically.

How to use

Enter an integer in any of the three fields — DEC, BIN or HEX — and the others sync. For values from −128 to 255 the tool shows two's complement: the 8-bit representation in which processors store both signed and unsigned numbers.

Conversion examples:

Why computers use binary

A transistor has only two states — current and no current. That is why logic circuits and memory work with bits: zeros and ones. Hexadecimal is convenient for humans: one byte is exactly two hex digits (FF = 255). Learn more in Binary Math Basics and 0 and 1: Machine Language.

Related tools and materials

Try it in the simulator →