Binary numbers can be difficult to read, and difficult to type in without error. With a long string of ones and zeros, it is very easy to make a mistake. Hexadecimal notation makes this a lot easier.
Hexadecimal is often shortened to hex.
A group of 4 bits can take any value between 0 (0000 binary) and 15 (1111 binary).
In hexadecimal, we replace each group of 4 bits with a single digit to represent the value 0 to 15. Since we only have digits 0 to 9, we use letters A to E to represent values 10 to 15. Here is a table of binary, denary and hex values:
Hexadecimal numbers are often written in the form:
0x1A3C
Letters are usually not case sensitive, so you can also write
0x1a3c
To convert the binary number 01101100 to hex:
To convert the hex number 0xfe to binary:
Copyright (c) Axlesoft Ltd 2021