Hexadecimal to Binary
Convert hexadecimal to binary:
Hexadecimal is base 16, this means there are 16 digits: 0-9 and A-F. Each hexadecimal digit converts to exactly 4 binary digits (a nibble).
Example conversion
Convert the hexadecimal number A3 to binary:
A = 1010 (in binary)
3 = 0011 (in binary)
A3 = 10100011
Simply convert each hex digit to its 4-bit binary equivalent and concatenate them.
Hex Bin
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111Converting from hexadecimal to binary is straightforward because each hexadecimal digit represents exactly 4 binary digits (bits).
Method
To convert a hexadecimal number to binary:
- Convert each hexadecimal digit to its 4-bit binary equivalent
- Concatenate (join) all the binary groups together
- Remove any leading zeros if not required as a full byte
Each hexadecimal digit corresponds to exactly one nibble (4 bits) in binary:
Hex Bin
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111 Example
Convert 2F to binary:
2in hexadecimal =0010in binaryFin hexadecimal =1111in binary- Concatenate:
0010+1111=00101111 - Therefore
2F16 = 001011112
References:
- BBC Bitesize GCSE: AQA, OCR, Edexcel
- Wikibooks Computer Science A level (hexadecimal): OCR
- YouTube - How To Convert Hexadecimal to Binary (TheOrganicChemistryTutor)