## Introduction: How to Convert Decimal Numbers Into Hexadecimal Numbers

With These instructions, you will learn how to convert a decimal number into a hexadecimal number. A decimal number, which is a number in base 10, can be can be represented using the values 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. A hexadecimal number, which is a number in base 16, can be represented using the values 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.

No prior coding or complex mathematical experience is need to follow these instructions.

This process will take no more than five minutes and the material you will need include: a calculator, pencil, and paper.

### Teacher Notes

Teachers! Did you use this instructable in your classroom?

Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: Familiarize Yourself With the Basic Conversions From Decimal Numbers to Hexadecimal Numbers

The first step to converting a decimal number to hexadecimal is to learn basics conversion numbers. In decimal they are 0 – 15, this is because they correspond to all sixteen digits on the hexadecimal number system. Figure 1 shows these conversion numbers.

## Step 2: Create a Table

After familiarizing yourself with the basic conversion numbers, the next step is to use your pencil to draw a table similar to the Figure 2 onto your paper. This will keep the calculations you will perform nice and neat.

## Step 3: Begin Filling in Your Table

The next step is to begin filling in the table. For the purpose of demonstrations this instruction set will convert the decimal number 42473 but you can choose whichever number you would like. After you chose a decimal number you would like to convert:

· Place the decimal number in the top left portion of your table

· Place the Hexadecimal conversion factor, /16, in the top right portion of the table

## Step 4: Divide Your Decimal Number by 16

Using a calculator, divide your decimal number by 16. Treat the answer to this calculation as an integer. In other words, only take the whole number answer and remove any numbers after the decimal point. Then write this integer number in a new row on the left column, underneath the original decimal number.

## Step 5: Find the Remainder

Using your calculator again, multiply the new integer value you calculated in the previous step by 16, then subtract the result from the decimal number above it. Then write the answer to this calculation in the right column adjacent to the integer value calculated in step 4.

## Step 6: Repeat

Repeat steps 4 and 5 until the decimal number in the left column is less than 16. This decimal number is considered a remainder as well

## Step 7: Convert the Remainders

In reverse order, starting with the integer less than 16 and ending with the first remainder you calculated, convert the remainders into hexadecimal numbers using the basic number conversion table in Figure 1.

## 3 Discussions

7 months ago

Nice article... I was much confused about the conversion of decimal numbers into hexadecimal numbers but after reading this post I am able to convert decimal numbers into hexadecimal numbers easily...

3 years ago

This is very cool.

i have a suggestion though...

You can just multiply the digits after the decimal point by 16 and get the same answer as the subtraction multiplication you showed.

i.e.

answer = 2654.5625

42473-(2654x16) = 9

.5625x16 = 9

3 years ago

This gives me some great ideas for secret code puzzles that I can make for my kids. Thanks.