In computing, the hexadecimal (base-16) number system is an efficient way to represent binary data. Unlike the familiar decimal (base-10) system, which uses digits 0–9, hexadecimal extends this to include six additional symbols:

A = 10, B = 11, C = 12, D = 13, E = 14, F = 15

This gives a total of sixteen unique symbols — 0 to 9 and A to F. Hexadecimal is widely used because each single hex digit exactly represents four binary bits (a nibble). This close relationship makes conversions between binary and hex straightforward and compact, which is why computers “prefer” hexadecimal for human-readable binary data.


Common Uses of Hexadecimal

1. Memory Dumps

When a system crashes, the computer records its current state in a memory dump. This dump contains the binary values of memory locations. Because long binary strings are hard to interpret, hexadecimal is used to make these values shorter and more readable. Example: Binary 1011101001011110 → Hex BA5E Software engineers and game developers analyze such dumps to trace errors or locate faulty code sections.


2. HTML Color Codes

Web colors are defined in hexadecimal form to specify red, green, and blue (RGB) intensity values. Each pair of hex digits represents one color channel:

  • #FF0000 = Red
  • #00FF00 = Green
  • #0000FF = Blue
  • #FF00FF = Fuchsia
  • #FF8000 = Orange

Thus, a color code such as #RRGGBB combines the three channels, where RR, GG, and BB are hexadecimal values from 00 to FF (0–255 in decimal).


3. MAC Addresses

A Media Access Control (MAC) address is a unique identifier for network hardware. It is usually displayed in hexadecimal form, such as 00-1C-B3-3F-1A-2C.

  • The first half identifies the manufacturer.
  • The second half represents the device’s unique serial number.

There are two types of MAC addresses:

  • UAA (Universally Administered Address) – assigned by the manufacturer.
  • LAA (Locally Administered Address) – manually changed by the user or administrator.

4. Encoded Web URLs

Web addresses sometimes include encoded characters written in hexadecimal, preceded by a percent sign (%). This process, known as URL encoding, ensures that URLs remain valid across systems. Examples:

  • %20 = space
  • %2E = period (.)
  • %77 = letter w

For instance, the address www.hodder.co.uk can appear as: %77%77%77%2E%68%6F%64%64%65%72%2E%63%6F%2E%75%6B


5. Assembly and Machine Code

At the machine-level, processors read instructions as binary code. However, programmers often represent these values in hexadecimal for readability. Example: Binary 1010010111100100 → Hex A5E4 Using hex makes low-level programming clearer and reduces human error when handling binary instruction sets.


Why Hexadecimal Matters

Hexadecimal bridges human readability and computer efficiency. It simplifies binary data representation, reduces errors, and appears across various computing domains—from web design to hardware networking and programming. Without hexadecimal, debugging, encoding, and digital color management would be far more complex.


✍️ Review – Fill the Gaps

  1. The hexadecimal number system is based on ___.
  2. Hexadecimal digits include the numbers 0–9 and the letters ___ to ___.
  3. One hexadecimal digit represents exactly ___ binary bits.
  4. In HTML color codes, the notation #RRGGBB uses pairs of hex digits to indicate the ___ of red, green, and blue.
  5. The color #FF0000 represents the color ___.
  6. A MAC address is written in hexadecimal to identify a device’s ___ and ___.
  7. The two types of MAC addresses are ___ and ___.
  8. In URL encoding, %20 represents a ___ character.
  9. In assembly and machine code, hexadecimal notation simplifies the representation of long strings of ___ digits.
  10. Hexadecimal is preferred because it makes binary data more ___ and ___ to read.

<
Previous Post
🧙🏽‍♂️ JS, AJAX, JSON: The Magical Journey of Fetch and JSON; How Webpages Talk to Servers Without Reloading the Whole World
>
Next Post
🎨 JS, AJAX: “Loading… Please Wait!” – The Magical World of AJAX Preloaders; For curious young coders and creative minds 🧠✨