• About
  • Contact
  • Cookie
  • Disclaimer
  • Privacy Policy
  • Change the purpose of use

Tnhelearning.edu.vn - Various useful general information portal

  • Photo
  • Bio
  • How To
  • Tech

How to Convert Decimal to Hexadecimal

December 26, 2023 by admin Category: How To

You are viewing the article How to Convert Decimal to Hexadecimal  at Tnhelearning.edu.vn you can quickly access the necessary information in the table of contents of the article below.

X

This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.

The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.

This article has been viewed 79,153 times.

The hexadecimal system is the base sixteen system. That is, it uses 16 characters to represent single characters: add A, B, C, D, E and F to the usual ten digits. Converting from decimal to hexadecimal is more difficult than vice versa. Take the time to learn how to convert: once you understand its essence, you can easily avoid common mistakes and mistakes.

Table of Contents

  • Small number conversion
  • Steps
    • Intuitive method
    • Fast method (residual method)
  • Advice

Small number conversion

Decimal 0 first 2 3 4 5 6 7 8 9 ten 11 twelfth 13 14 15
Hexadecimal 0 first 2 3 4 5 6 7 8 9 A REMOVE OLD EASY E F

Steps

Intuitive method

Image titled Convert from Decimal to Hexadecimal Step 1

Image titled Convert from Decimal to Hexadecimal Step 1

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/7/7e/Convert-from-Decimal-to-Hexadecimal-Step-1-Version-4.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-1-Version-4.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/7/7e/Convert-from-Decimal-to- Hexadecimal-Step-1-Version-4.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-1-Version-4.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Use this method if you are new to the hexadecimal system. This is the easier approach for most people. If you are comfortable with other bases, you can use the faster method below.

  • If you are completely new to the hexadecimal system, you should learn the basics.
Image titled Convert from Decimal to Hexadecimal Step 2

Image titled Convert from Decimal to Hexadecimal Step 2

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/0/0e/Convert-from-Decimal-to-Hexadecimal-Step-2-Version-4.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-2-Version-4.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/0e/Convert-from-Decimal-to- Hexadecimal-Step-2-Version-4.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-2-Version-4.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Write down to a power of 16. Each character in a hexadecimal number represents a value to a power of 16, just as each digit in a decimal number represents a power of 10. Powers of 16 will come in very handy when you need to convert:

  • 16 5 = 1,048,576
  • 16 4 = 65,536
  • 16 3 = 4.096
  • 16 2 = 256
  • 16 1 = 16
  • For decimals greater than 1,048,576, calculate a higher power of 16 and add to the list above.
Image titled Convert from Decimal to Hexadecimal Step 3

Image titled Convert from Decimal to Hexadecimal Step 3

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/c/c9/Convert-from-Decimal-to-Hexadecimal-Step-3-Version-4.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-3-Version-4.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/c/c9/Convert-from-Decimal-to- Hexadecimal-Step-3-Version-4.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-3-Version-4.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Find the largest power of 16 that matches your decimal. Write the decimal number to convert and compare with the list above. Find the largest power of 16 less than that number.

  • For example, with 495 , we will choose 256 from the list above.
Image titled Convert from Decimal to Hexadecimal Step 4

Image titled Convert from Decimal to Hexadecimal Step 4

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/1/1a/Convert-from-Decimal-to-Hexadecimal-Step-4-Version-5.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-4-Version-5.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/1/1a/Convert-from-Decimal-to- Hexadecimal-Step-4-Version-5.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-4-Version-5.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Divide the decimal by the chosen power value. Take only the integer part, ignore the decimal part of the quotient.

  • In the example problem, 495 ÷ 256 = 1.93… but we are only interested in the integer part 1 .
  • It is the first character of the hexadecimal number. In this case, because of the division by 256, the digit 1 is in the “256th place”.
READ More:   How to do something for the first time
Image titled Convert from Decimal to Hexadecimal Step 5

Image titled Convert from Decimal to Hexadecimal Step 5

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/f/f2/Convert-from-Decimal-to-Hexadecimal-Step-5-Version-5.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-5-Version-5.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/f/f2/Convert-from-Decimal-to- Hexadecimal-Step-5-Version-5.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-5-Version-5.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Find the balance. That is the remainder of the value to be converted in decimal. Similar to putting division on paper with large numbers, here we will:

  • Multiply the integer part obtained above by the divisor. In the example problem: 1 x 256 = 256 (or in other words, the digit 1 in the hexadecimal number represents 256 in base 10).
  • Subtract the product from the number being divided. 495 – 256 = 239 .
Image titled Convert from Decimal to Hexadecimal Step 6

Image titled Convert from Decimal to Hexadecimal Step 6

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/8/8a/Convert-from-Decimal-to-Hexadecimal-Step-6-Version-5.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-6-Version-5.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/8/8a/Convert-from-Decimal-to- Hexadecimal-Step-6-Version-5.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-6-Version-5.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Divide the difference by the next highest power of 16. Compare with the list of powers above. Move down to the next highest power of 16. Divide the difference by this number to find the next character of the hexadecimal number (If the number being divided is less than the divisor, the next character will be 0).

  • 239 ÷ 16 = 14 . Again, we are only interested in the integer part of the quotient.
  • This is the second character of the hexadecimal number, located at “position 16”. Every number from 0 to 15 can be represented by a hexadecimal character. We will express it in standard notation at the end of this method.
Image titled Convert from Decimal to Hexadecimal Step 7

Image titled Convert from Decimal to Hexadecimal Step 7

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/d/d7/Convert-from-Decimal-to-Hexadecimal-Step-7-Version-4.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-7-Version-4.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/d/d7/Convert-from-Decimal-to- Hexadecimal-Step-7-Version-4.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-7-Version-4.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Continue to find the balance. Similar to the previous step, here we take the trader’s integer part by the divisor and then subtract the product from the divisor. This is the balance that needs to be converted further.

  • 14 x 16 = 224.
  • 239 – 224 = 15, so the remainder here is 15 .
Image titled Convert from Decimal to Hexadecimal Step 8

Image titled Convert from Decimal to Hexadecimal Step 8

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/b/ba/Convert-from-Decimal-to-Hexadecimal-Step-8-Version-4.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-8-Version-4.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/b/ba/Convert-from-Decimal-to- Hexadecimal-Step-8-Version-4.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-8-Version-4.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Repeat until the balance is less than 16. When the resulting balance is between 0 and 15, you can represent it with a single hexadecimal character. That is the last letter of your answer.

  • The last “character” in our hexadecimal number is 15, which is in “position 1”.
Image titled Convert from Decimal to Hexadecimal Step 9

Image titled Convert from Decimal to Hexadecimal Step 9

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/2/2b/Convert-from-Decimal-to-Hexadecimal-Step-9-Version-4.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-9-Version-4.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/2/2b/Convert-from-Decimal-to- Hexadecimal-Step-9-Version-4.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-9-Version-4.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Express the answer in hexadecimal notation. At this point, we know all the characters of the hexadecimal number. But so far, we’ve only written them in base 10. To represent each character in hexadecimal notation, we need to convert like this:

  • The digits 0 to 9 are left unchanged.
  • 10 = A; 11 = B; 12 = C; 13 = D; 14 = E; 15 = F
  • In the example problem, we get the characters (1)(14)(15). With standard notation, our hexadecimal number would be 1EF .
READ More:   How to Control Excitement
Image titled Convert from Decimal to Hexadecimal Step 10

Image titled Convert from Decimal to Hexadecimal Step 10

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/c/c9/Convert-from-Decimal-to-Hexadecimal-Step-10-Version-2.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-10-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/c/c9/Convert-from-Decimal-to- Hexadecimal-Step-10-Version-2.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-10-Version-2.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Review. Once you understand the nature of hexadecimal numbers, checking the answer will be very simple. Convert each character to decimal, multiplying it by the power of 16 corresponding to its place. In the example problem:

  • 1EF → (1)(14)(15)
  • From right to left, 15 is at 16 0 = 1. 15 x 1 = 15.
  • The next character is at position 16 1 = 16. 14 x 16 = 224.
  • The next character is at position 16 2 = 256. 1 x 256 = 256.
  • Adding up, we get 256 + 224 + 15 = 495, which is the given decimal number.

Fast method (residual method)

Image titled Convert from Decimal to Hexadecimal Step 11

Image titled Convert from Decimal to Hexadecimal Step 11

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/e/e7/Convert-from-Decimal-to-Hexadecimal-Step-11-Version-2.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-11-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/e/e7/Convert-from-Decimal-to- Hexadecimal-Step-11-Version-2.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-11-Version-2.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Divide decimals by 16. Treat it as integer division, or in other words, stop at the integer part instead of continuing.

  • Take for example the number 317,547. 317,547 ÷ 16 = 19,846 , omitting the decimal place after the comma.
Image titled Convert from Decimal to Hexadecimal Step 12

Image titled Convert from Decimal to Hexadecimal Step 12

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/0/05/Convert-from-Decimal-to-Hexadecimal-Step-12-Version-3.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-12-Version-3.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/05/Convert-from-Decimal-to- Hexadecimal-Step-12-Version-3.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-12-Version-3.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Write the remainder in hexadecimal notation. After dividing by 16, the remainder is the portion that cannot be placed in 16th or higher. Therefore, this balance must be in position 1, the last character of the hexadecimal number.

  • To find the remainder, multiply the integer part of the quotient by the divisor and then subtract the product from the divisor. Example: 317,547 – (19,846 x 16) = 11.
  • Convert the character you just found to hexadecimal notation, using the small number conversion table at the top of this page. In the example problem, 11 is converted to B .
Image titled Convert from Decimal to Hexadecimal Step 13

Image titled Convert from Decimal to Hexadecimal Step 13

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/5/5d/Convert-from-Decimal-to-Hexadecimal-Step-13-Version-2.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-13-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/5/5d/Convert-from-Decimal-to- Hexadecimal-Step-13-Version-2.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-13-Version-2.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Repeat with the quotient found above. You have converted the balance to hexadecimal characters. Now it’s time to move on with the quotient: divide the quotient by 16. The remainder in this calculation will be the penultimate character of the hexadecimal number. Here, the principle is the same as before: because of the division by (16 x 16 =) 256, the remainder cannot be in the 256 position or greater. Position 1 already exists, so this balance should be in position 16.

  • In the example problem: 19,846 / 16 = 1240.
  • Balance = 19,846 – (1240 x 16) = 6 . This is the penultimate character of our hexadecimal number.
READ More:   How to Recover Hacked Facebook Account
Image titled Convert from Decimal to Hexadecimal Step 14

Image titled Convert from Decimal to Hexadecimal Step 14

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/6/60/Convert-from-Decimal-to-Hexadecimal-Step-14-Version-3.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-14-Version-3.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/6/60/Convert-from-Decimal-to- Hexadecimal-Step-14-Version-3.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-14-Version-3.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
Repeat until the quotient is less than 16. Remember to convert the remainder from 10 to 15 to hexadecimal notation. Write down each balance during the conversion. The last quotient (less than 16) is the first character. With the example problem:

  • Take the nearest quotient and divide it by 16. 1240 / 16 = 77 remainder 8 .
  • 77 / 16 = 4 remainder 13 = D .
  • 4 < 16, so 4 is the first character.
  • Image titled Convert from Decimal to Hexadecimal Step 15

    Image titled Convert from Decimal to Hexadecimal Step 15

    {“smallUrl”:”https://www.wikihow.com/images_en/thumb/9/90/Convert-from-Decimal-to-Hexadecimal-Step-15-Version-2.jpg/v4-728px-Convert- from-Decimal-to-Hexadecimal-Step-15-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/9/90/Convert-from-Decimal-to- Hexadecimal-Step-15-Version-2.jpg/v4-728px-Convert-from-Decimal-to-Hexadecimal-Step-15-Version-2.jpg”,”smallWidth”:460,”smallHeight”:345,” bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
    Complete hexadecimal numbers. As mentioned, we are looking for each character of the hexadecimal number in order from right to left. Double-check to make sure you’re writing in the correct order.

    • The final answer is 4D86B .
    • To check your answer, convert the characters to decimal, multiply by the corresponding power of 16 and add them. (4 x 16 4 ) + (13 x 16 3 ) + (8 x 16 2 ) + (6 x 16) + (11 x 1) = 317547, given decimal.
  • Advice

    • To avoid confusion in using different coefficients, you can include the base below. For example, 512 10 means “512 in base 10”, a normal decimal number. 512 16 means “512 in base 16”, which is equivalent to the decimal number 1298 10 .
    X

    This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.

    The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.

    This article has been viewed 79,153 times.

    The hexadecimal system is the base sixteen system. That is, it uses 16 characters to represent single characters: add A, B, C, D, E and F to the usual ten digits. Converting from decimal to hexadecimal is more difficult than vice versa. Take the time to learn how to convert: once you understand its essence, you can easily avoid common mistakes and mistakes.

    Thank you for reading this post How to Convert Decimal to Hexadecimal at Tnhelearning.edu.vn You can comment, see more related articles below and hope to help you with interesting information.

    Related Search:

    Related Posts

    How to Create Curved Text in Photoshop
    How to fall asleep faster
    How to Install FBReader to Read eBooks

    Category: How To

    Previous Post: « Top 999+ ktm images – Amazing Collection ktm images Full 4K
    Next Post: Top 999+ super man images – Amazing Collection super man images Full 4K »

    Copyright © 2025 · Tnhelearning.edu.vn - Useful Knowledge