How is hexadecimal used to represent MAC addresses, and what notation conventions apply?
Each byte (8 bits, binary 00000000–11111111) maps to exactly two hex digits (00–FF), so a 48-bit MAC becomes 12 hex digits; leading zeros are always kept, and hex may be flagged with a 0x prefix or an H suffix.
Hexadecimal (base 16) is used for MAC (Media Access Control) addresses because it lines up cleanly with bytes. One byte is 8 bits, and 8 bits is precisely two hex digits — so a byte ranging from binary 00000000 to 11111111 is written as 00 to FF. A MAC address is 6 bytes (48 bits), which is therefore always 12 hexadecimal digits, far more readable than 48 ones and zeros.
The crucial convention is that leading zeros are always shown to keep each byte two digits wide: binary 0000 1010 is written 0A, never just A. Drop the zero and a value could be misread and the fixed 12-digit layout that devices and parsing tools depend on would break.
To avoid confusing hex with decimal in documentation, hex values are often marked: a 0x prefix (e.g. 0x73), a subscript 16, or a trailing H (e.g. 73H). On the wire there's no such marker — the position in the frame tells the device it's a MAC address — so these notations are purely a human-reading aid.
Go deeper:
-
Hexadecimal (Wikipedia) — base-16, how a 4-bit nibble is one hex digit and a byte two, and the 0x / subscript-16 notations.
-
MAC address — notation (Wikipedia) — the IEEE 802 format of six groups of two hex digits, with the hyphen, colon and dot conventions.