CAE - Hexadecimal Numbers (Lesson)

Hexadecimal Numbers

Introduction

In this lesson, you will learn about how hexadecimal numbers work and how we can convert back and forth from decimal numbers. If you remember, decimal is base 10, as there are ten digits, 0 through 9. The hexadecimal number system is base 16 because there are 16 possible digits that can be used: 0-9, A for 10, B for 11, C for 12, D for 13, E for 014, and F for 15. To make numbers larger than 15 we use the position of a digit to determine its value.  Each position is a multiple of 16.

Hexadecimal Question and Answer

Hexadecimal to Decimal Conversion

Just as with binary conversion you learned in the previous lesson, we have to do some math. Because hexadecimal system is base 16, 1 = 16 to the 0 power and 16 = 16 to the 1 power.

Hexadecimal to Decimal Conversion Video

Example 1

In this example, we are converting hexadecimal 24 to its decimal equivalent.

Example 1
2 4
161 160
2 x 161 4 x 160
2 x 16 4 x 1
32 4

32 = 4 = 36

Hexadecimal, base 16, 24 is an equivalent of decimal, base 10, 36!

Example 2

This example is a little more difficult because we need to find a corresponding number for D, which is 13. Let’s convert hexadecimal 1D to its decimal equivalent.

Example 2
1 D
BlueArrowSmall BlueArrowSmall
161 160
1 x 161 13 x 160
1 x 16 13 x 1
16 13

16 + 13 = 29

Hexadecimal, base 16, 1D is an equivalent of decimal, base 10, 29!

ASCII Chart Name Activity

Reflection and Wrap-up

In this lesson, you have learned about the hexadecimal system, which is base 16. You also learned the uses of hexadecimal system in computing and how to convert hexadecimal to decimal (and back). The hexadecimal (HEX) system is important because it offers a more compact and human-readable way to represent binary data, which is the fundamental language of computers. With its base-16 structure, it can represent large binary values more succinctly, making it easier for programmers and engineers to read, write, and debug digital information.

For instance, a single hexadecimal digit can represent four binary digits (bits), significantly reducing the complexity when dealing with long binary sequences. This efficiency is particularly valuable in fields like computer science, electronics, and information technology, where hexadecimal is used extensively in programming, memory addresses, and color coding in web design, enhancing both productivity and accuracy in digital computations and communications.

 

 

[CC BY-NC-SA 4.0 Links to an external site.] UNLESS OTHERWISE NOTED | IMAGES: LICENSED AND USED ACCORDING TO TERMS OF SUBSCRIPTION - INTENDED ONLY FOR USE WITHIN LESSON.