Computer Science • Number Systems

Binary ⇄ Denary ⇄ Hex Converter

Bits
Representation

Change the number in any one of the three panels below — flick the switches, type a binary/denary/hexadecimal value directly — and watch the other two update, with the working shown step by step.

Binary

Place value × digit value, added up. When the sign bit is 1 (signed mode), the value is found by flipping every bit, adding 1, then taking that as a negative magnitude.

Denary

Type a denary (base-10) number to encode it into binary and hex.

Hexadecimal

0x

Each hex digit is one nibble (4 bits): 8 + 4 + 2 + 1 place values, 0–F.

Method reference

Place values (unsigned), most significant bit on the left:

BitsPlace values, left to right
8-bit128 · 64 · 32 · 16 · 8 · 4 · 2 · 1
16-bit32768 · 16384 · … · 8 · 4 · 2 · 1
32-bit2147483648 · … · 8 · 4 · 2 · 1

Signed (two's complement) decoding — used only when the sign (leftmost) bit is 1:

StepWhat to do
1Check the sign bit. If it's 1, the number is negative.
2Flip every bit (0↔1).
3Add 1 to the flipped bits.
4Work out the place-value sum of that result as usual.
5The answer is the negative of that sum.

Encoding a negative denary value works in reverse: convert its size (ignoring the minus sign) to binary, flip every bit, then add 1.

Binary ⇄ hex: split the bits into groups of 4 (nibbles) from the right. Each nibble is worth 8+4+2+1, giving a value 0–15, written as one hex digit (0–9, then A–F for 10–15).

This tool always shows hex as the raw bit pattern — it does not have its own separate idea of "negative"; a negative signed value and its two's complement bit pattern share the same hex.

Binary ⇄ Denary ⇄ Hex Converter — Key Terms

Key concepts and translations across English, te reo Māori.

EnglishTe reo MāoriWhat it means on this page

On the te reo Māori column. Terms marked as gaps have no attested equivalent in the sources checked — Karaitiana Taiuru's Dictionary of Māori Computer and Social Media Terms, Paekupu, the Reserve Bank's te reo financial glossary and Te Aka. No coinage is printed as though it were established; where a class needs one, commission it from Te Taura Whiri i te Reo Māori and credit the translator. Te reo Māori is not italicised and takes no plural "s".