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:
- 25510 = 111111112 = FF16
- 1010 = 000010102 = 0A16
- −110 = 111111112 (two's complement)
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
- Logic circuit simulator — build circuits that add and compare binary numbers.
- Truth table generator — tables for logic functions.
- Binary Math Basics — how a processor computes in binary.
- Knowledge library — articles and component datasheets on circuitry.