ALL >> Education >> View Article
Convert Decimal Numbers To Hexadecimal Numbers
Most people will never have a need for this conversion but if you work in software development, IT, computer hardware or a slew of other areas surrounding the computer industry, you at some point will need to know how to do this.
As complex as it might sounds there is a very easy algorithm that you can use in order to figure out what the hexadecimal number equivalent is when given a decimal number.
As you might know decimal is base ten. It is the standard numbering system that is used everywhere in the world. Hexadecimal is base sixteen. From numbers one through nine they look identical, however once reach ten this is where it differs. Below is the decimal to hex conversion for numbers 1 through 15:
1 through 9 decimal = 1 through 9 Hex, (i.e. 1=1, 2=2, etc)
Decimal Number 10 = Hexadecimal Letter A
Decimal Number 11 = Hexadecimal Letter B
Decimal Number 12 = Hexadecimal Letter C
Decimal Number 13 = Hexadecimal Letter D
Decimal Number 14 = Hexadecimal Letter E
Decimal Number 15 = Hexadecimal Letter F
As you can see if you were converting a number from one ...
... through 15 it would be easy, but what if you had to convert say decimal number 3488 to its Hex equivalent. It's easier than you think; here is how it is done.
In this article we represent division as the backslash ( / ). The backslash is commonly used in programming languages to represent division so I will use it here.
So our number to convert is 3488. The first step is to divide 3488 by 16. Remember Hex is base 16 so that is where we get the number from.
3488/16 = 218 with a remainder of 0 (zero)
Make a note of the number zero, that is part of our answer. The next step is to see if our answer is greater than or equal to 16. Well 218 is therefore we need to continue. Our next step is to divide 218 by 16.
218/16 = 13 with a remainder of 10
Again make a note of the number 10. That too is part of our answer. You can probably see where I am going with this. As long as the answer is greater than or equal to 16 you will keep dividing the answer by 16 until it is less than 16. Low and behold we are at that point in our example because 13 is less than 16. What do you do now? Well you have now have your answer and it looks like this:
13 10 0
But remember in Hex we only count numbers up through 9 and then use letters for 10 through 15. Therefore we have to convert the numbers greater than 9 in our answer to its letter equivalent. So for the answer we have:
13 = D
10 = A
0 = 0
So our final answer is DA0. You can confidently say that the Hex equivalent for decimal number 3488 is DA0.
You are now fully equipped to convert any decimal number to its Hex equivalent. Happy calculations!
About the Author:
Mr. Tucker is a regular contributor on Bukisa, an online community for writers that pays them for their articles. You can also follow Bruce on Twitter.
Add Comment
Education Articles
1. Mlops Online Course | Mlops Online TrainingAuthor: visualpath
2. How To Transform Traditional Business Into Digital Business
Author: Sandeep Bhansali
3. The Importance Of Synonyms For Ielts
Author: lily bloom
4. The Importance Of Early Dyslexia Diagnosis And Intervention
Author: Bradly Franklin
5. 10 Ways To Support Students Who Struggle With Reading Comprehension Skills
Author: James Carter
6. Dsssb Coaching In Rohini – Your Pathway To Success
Author: Bharat Soft Tech
7. Become A Java Pro: The Ultimate Guide To Java Design Patterns
Author: login 360
8. 5 Reasons Why Jaipur’s Top Coaching Institutes Are Perfect For Ssc, Bank & Railways Preparation
Author: power minds
9. Mastering The Gre With Edunirvana - Your Pathway To Graduate Success
Author: sharvani
10. Which Is The Best Icse School For Primary Education In Bhopal?
Author: Adity Sharma
11. Paying For Assignment Help: A Guide To Making The Right Choice
Author: liam taylor
12. Golang Training In Hyderabad | Golang Online Training
Author: Hari
13. The Top No1 Terraform Training Institute In Hyderabad
Author: SIVA
14. Best Ai With Aws Training Online | Aws Ai Certification
Author: Madhavi
15. Generative Ai Training | Best Generative Ai Course In Hyderabad
Author: Renuka