# Hexadecimal Notation

It's a handy way of expressing byte values. Expressing in binary is too verbose and in decimal it is tedious to convert from and to it.

A hexadecimal value can range from $00_{16}$ to $FF_{16}$.

Hex digit | Decimal value | Binary value |
---|---|---|

0 | 0 | 0000 |

1 | 1 | 0001 |

2 | 2 | 0010 |

3 | 3 | 0011 |

4 | 4 | 0100 |

5 | 5 | 0101 |

6 | 6 | 0110 |

7 | 7 | 0111 |

8 | 8 | 1000 |

9 | 9 | 1001 |

A | 10 | 1010 |

B | 11 | 1011 |

C | 12 | 1100 |

D | 13 | 1101 |

E | 14 | 1110 |

F | 15 | 1111 |

## Hex to/from binary

Just remember that each Hex digit represents 4 bits in binary.

## Binary to Hex

### Hex to Binary

Same as the above but starting from the bottom instead of from the top.

## Hex to/from decimal

This requires multiplication and division by 16. Best to use a computer.