Like the [[Binary System|binary system]] or the [[Decimal System|decimal system]], the *hexadecimal system* is used to encode numbers. In contrast to the binary system which uses two numerals ($0$ and $1$), or the decimal system (with 10 numerals $0-9$), the hexadecimal system uses 16 numerals ($0-9$, $A$,$B$,$C$,$D$,$E$ und $F$).
The main motivation is to more efficiently describe groups of 4 bits (half a byte). Four bits can encode the integers $0-15$, which is exactly what the hexadecimal system describes directly. Thus, a byte (8 bits) can be described with two numerals in hexadecimal notation instead of $8$ bits which makes it much more readable.
As an example, the number $166$ fits into a byte since it is lower than 255 (which is the maximal value in eight bits). It is much easier to read $A6_{16}$ than $1010 0110_2$. The indices ($16$ and $2$) just indicate the base that we sue to encode the numbers. They stand for the [[Binary System|binary system]] and the [[Hexadecimal System|hexadecimal system]]).
>[!read]- Further Reading
>- [[Binary System]]
>- [[Bit]]
>- [[Decimal System]]
>[!ref]- References