Binary Systems and Hexadecimal: Understanding the Hexadecimal System

In the world of computer systems, not all number systems are created equal. While humans use Denary (Base 10) and computers rely on Binary (Base 2), programmers and hardware designers often use another powerful system โ the Hexadecimal System (Base 16).
๐งฎ What is the Hexadecimal System?
The Hexadecimal number system uses 16 unique symbols to represent values. These are:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
While digits 0โ9 have their usual meanings, the letters AโF represent values from 10 to 15.
| Symbol | Decimal Equivalent | 
|---|---|
| A | 10 | 
| B | 11 | 
| C | 12 | 
| D | 13 | 
| E | 14 | 
| F | 15 | 
Thus, Hexadecimal numbers can count much higher than decimal using fewer digits.
๐ Relationship Between Binary and Hexadecimal
Hexadecimal and Binary are closely related because 16 = 2โด. This means each hexadecimal digit corresponds exactly to four binary digits (bits).
| Hex | Binary | Hex | Binary | 
|---|---|---|---|
| 0 | 0000 | 8 | 1000 | 
| 1 | 0001 | 9 | 1001 | 
| 2 | 0010 | A | 1010 | 
| 3 | 0011 | B | 1011 | 
| 4 | 0100 | C | 1100 | 
| 5 | 0101 | D | 1101 | 
| 6 | 0110 | E | 1110 | 
| 7 | 0111 | F | 1111 | 
Because of this neat alignment, converting between binary and hexadecimal is much easier than between binary and decimal.
For example:
Binary: 101111100001  
Group into fours โ 1011 1110 0001  
Hexadecimal: BE1
๐ Conversion Methods
1. Binary โ Hexadecimal
Steps:
- Split the binary number into groups of 4 bits (starting from the right).
 - Add extra zeros to the left if needed.
 - Replace each group with its Hex equivalent using the table above.
 
Example:
Binary: 101111100001  
Groups: 1011 1110 0001  
Hex:    B    E    1  
Result: BE1
2. Hexadecimal โ Binary
Reverse the process by converting each Hex digit into its 4-bit binary form.
Example:
Hex: 45A  
Binary: 0100 0101 1010
3. Hexadecimal โ Denary
Each digit in a Hex number represents a power of 16.
Formula:
Denary = (Digit ร 16โฟ) + (Next ร 16โฟโปยน) + ...
Example:
Hex: 45A  
= (4 ร 16ยฒ) + (5 ร 16ยน) + (A ร 16โฐ)  
= (4 ร 256) + (5 ร 16) + (10 ร 1)  
= 1024 + 80 + 10 = 1114
4. Denary โ Hexadecimal
You can use the successive division method:
- Divide the number by 16 repeatedly.
 - Record the remainders.
 - Read remainders from bottom to top.
 
Example:
2004 รท 16 = 125 R4  
125 รท 16 = 7 R13 (D)  
7 รท 16 = 0 R7  
Result โ 7D4
๐ก Applications of Hexadecimal
- 
    
Memory Representation: Computer memory addresses and dumps are written in Hex for readability. Example:
0x4F2Ainstead of long binary sequences. - 
    
HTML Colors: Web colors use Hex codes like:
- Red โ 
#FF0000 - Green โ 
#00FF00 - Blue โ 
#0000FF 
 - Red โ 
 - 
    
MAC Addresses: Device network identifiers use Hex pairs:
00:1C:B3:4F:2D:E2 - 
    
Assembly and Machine Code: Programmers use Hex to simplify binary instructions. Instead of
1010010111100100, itโs written asA5E4. 
๐งฉ Review โ Fill in the Gaps
- The Hexadecimal system is also known as the Base-___ number system.
 - Hexadecimal uses ___ unique symbols to represent numbers.
 - The letter C in Hex represents the denary value ___.
 - Each Hex digit is equal to ___ binary bits.
 - The Hex number 
BE1represents the binary sequence ____. - The Hex number 
45Ais equal to the denary value ___. - When converting from denary to Hex, the process involves repeated division by ___.
 - The color code 
#FF0000represents the color ___. - In computer memory representation, Hex is often prefixed with 
__. - The relationship between Binary and Hex works perfectly because 16 = ___โด.