Number Systems Basics
Decimal, binary and hexadecimal side by side, the basis for everything close to computer hardware.
Last updated: September 1, 2026
Basic terms
Decimal systemThe familiar number system with ten digits, 0 to 9Binary systemUses only two digits, 0 and 1, the basis of all computer technologyHexadecimal systemUses 16 characters, 0 to 9 and A to F, often used to compactly represent binary numbersBaseThe number of distinct digits in a number systemBit and byte
BitThe smallest unit of storage, either 0 or 1, true or false, high or low, stored in a memory cell in RAM or ROMByteEight bits together, can represent 256 different valuesKilobyteUsually 1024 bytesMegabyteUsually 1024 kilobytesConverting
Decimal to binaryRepeatedly divide by 2, the remainders from bottom to top form the binary numberBinary to decimalMultiply each digit by its matching power of two and add them up4 bits to hexEvery four binary digits form exactly one hexadecimal digitComparison table, 0 to 15
0Binary 0000 · Hex 01Binary 0001 · Hex 12Binary 0010 · Hex 23Binary 0011 · Hex 34Binary 0100 · Hex 45Binary 0101 · Hex 56Binary 0110 · Hex 67Binary 0111 · Hex 78Binary 1000 · Hex 89Binary 1001 · Hex 910Binary 1010 · Hex A11Binary 1011 · Hex B12Binary 1100 · Hex C13Binary 1101 · Hex D14Binary 1110 · Hex E15Binary 1111 · Hex FWorth a look
The structure of a byte
A byte consists of eight bits. Each position has a fixed place value, from 128 down to 1. Here it shows the number 156.
1
128
0
64
0
32
1
16
1
8
1
4
0
2
0
1
128 + 16 + 8 + 4 = 156