Using Hexadecimal Numbers to Represent Binary Numbers

As you can see from the previous post, binary numbers can become rather long. With only two possible values, 0 and 1, it takes 16 binary digits to represent the decimal value +32,768. For that reason, the hexadecimal, or base 16, system is often used as a shorthand representation of binary numbers. The hexadecimal system uses 16 digits: 0 to 9 and A to F. The letters A to F represent the values 10, 11, 12, 13, 14, and 15.

The maximum value that can be represented in four binary digits is 2⁴ − 1, or 15. The maximum value of a hexadecimal digit is also 15, which is represented by the letter F. So you can reduce the size of a binary number by using hexadecimal digits to represent each group of four binary digits.

Here are displayed the hexadecimal digits along with their binary equivalents.

Screen Shot 2018-11-17 at 8.35.58 AM

Screen Shot 2018-11-17 at 8.36.15 AM

Screen Shot 2018-11-17 at 8.36.34 AM

To represent the following binary number in hexadecimal, you simply substitute the appropriate hex digit for each set of four binary digits.

Screen Shot 2018-11-17 at 8.48.22 AM

Here’s an interesting sequence of hexadecimal numbers. The first 32 bits of every Java applet are:

Screen Shot 2018-11-17 at 8.49.10 AM.png

Translated into hexadecimal, that binary number becomes:

Screen Shot 2018-11-17 at 8.49.53 AM

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s