Hexadecimal Numbering and Addressing

Hexadecimal Numbering

Hexadecimal ("Hex") is a convenient way to represent binary values. Just as decimal is a base ten numbering system and binary is base two, hexadecimal is a base sixteen system.

The base 16 numbering system uses the numbers 0 to 9 and the letters A to F. The figure shows the equivalent decimal, binary, and hexadecimal values for binary 0000 to 1111. It is easier for us to express a value as a single hexadecimal digit than as four bits.

Understanding Bytes

Given that 8 bits (a byte) is a common binary grouping, binary 00000000 to 11111111 can be represented in hexadecimal as the range 00 to FF. Leading zeroes are always displayed to complete the 8-bit representation. For example, the binary value 0000 1010 is shown in hexadecimal as 0A.

Representing Hexadecimal Values

Note: It is important to distinguish hexadecimal values from decimal values regarding the characters 0 to 9, as shown in the figure.

Hexadecimal is usually represented in text by the value preceded by 0x (for example 0x73) or a subscript 16. Less commonly, it may be followed by an H, for example 73H. However, because subscript text is not recognized in command line or programming environments, the technical representation of hexadecimal is preceded with "0x" (zero X). Therefore, the examples above would be shown as 0x0A and 0x73 respectively.

Hexadecimal is used to represent Ethernet MAC addresses and IP Version 6 addresses. You have seen hexadecimal used in the Packets Byte pane of Wireshark where it is used to represent the binary values within frames and packets.

Hexadecimal Conversions

Number conversions between decimal and hexadecimal values are straightforward, but quickly dividing or multiplying by 16 is not always convenient. If such conversions are required, it is usually easier to convert the decimal or hexadecimal value to binary, and then to convert the binary value to either decimal or hexadecimal as appropriate.

Viewing the MAC

A tool to examine the MAC address of our computer is the ipconfig /all or ifconfig. In the graphic, notice the MAC address of this computer. If you have access, you may wish to try this on your own computer.

You may want to research the OUI of the MAC address to determine the manufacturer of you NIC

Hexadecimal Numbering and Addressing

Hexadecimal Numbering and Addressing

Hexadecimal Numbering and Addressing

Hexadecimal Numbering and Addressing

Hexadecimal Numbering and Addressing

## 0 comments for "Hexadecimal Numbering and Addressing"