How to Convert Hex to Decimal And Decimal to Hexadecimal Manually

Updated on April 15, 2018

About Decimal (Dec)

  1. Before you convert decimal to hexadecimal and hex to decimal you must know what are decimal bits and hex bits.
  2. A decimal or hex bit in this tutorial represents a single number, digit or letter.
  3. Decimal is also called base 10 and denary because it consists of ten numbers. These are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
  4. Decimal is a number system.
  5. A decimal number can be represented using a subscript of 10. eg 23510 reads as two hundred and thirty-five base 10.
  6. These are the numbers we use in every day counting. We mostly use the decimal number system because we have ten fingers.
  7. The number ten (10) is made by using a combination of two of these decimal numbers: one and zero (1 and 0). While two hundred and nine (209) is a combination of three decimal numbers: two, zero and nine (2, 0 and 9).
  8. There is no limit as to how many times the numbers can be reused, that is why it is said that numbers are never ending!

About Hexadecimal (Hex)

  1. Hex is a representation of 4 binary bits
  2. Hexadecimal, which is also called base 16 or 'hex' for short, consist of sixteen numbers and letters.
  3. The numbers in hex are the same as decimal numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
  4. But the big difference between hex and decimal is that hex also contains letters. These letters are: A, B, C, D, E, F.
  5. A hex number can be represented using a subscript of 16. eg 23516 235 base 16.
  6. These letters come after its decimal friends in ascending order. Therefore, the Hexadecimal series looks like this: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
  7. Hex can be considered as a shorter version of decimal. For example a large number in decimal has a much smaller hex equivalent(using less hex bits to represent the decimal number). I will demonstrate this later.

Hexadecimal to Decimal Conversion

Now how to convert Hex to decimal and decimal to hex manually!

First you must know that the letters in hex all have decimal equivalents, as listed in the table below.

This is a link to another number system table with more values for Octal, Hex, Decimal and Binary. The table below is enough for this tutorial but just in case your were curious I mentioned it.


Convert hex to decimal table
Convert hex to decimal table

How to Convert Hex To Decimal!

Example 1

This is how to convert hexadecimal to decimal manually. You must start by multiplying the hex number by 16. Which will be raised to a power that increases by 1 (the power at which the hexadecimal is raised starts at zero 0), by the hexadecimal number decimal equivalent. We start from the right of the hexadecimal number and go to the left when applying the powers. Each time you multiply a number by 16 the power of 16 increases. I know this might seen confusing that is why i will provide examples! When converting C9 hexadecimal to decimal your working should look something like this:


Multiplication Result
9 = 9 * (16 ^ 0) = 9
C = 12 * (16 ^ 1) = 192

We then add the results.

192 + 9 = 20110 decimal.

  1. First we converted all of our hex numbers to its decimal equivalents. C is equal to decimal 12 (refer to table above) and 9 is equal to decimal 9.
  2. We then multiplied the numbers 12 and 9 starting from the last number in the question, by 16 and its power. Remember the powers start from zero.
  3. Our first multiplication has a power of 0 and the second multiplication has a power of 1. If there was a third it would have a power of 2 and 4 a power of 3 etc....
  4. The stars (^) in the bracket represent 'raised to the power of'. Therefore, the first terms in brackets read, 'sixteen to the power of 0'. What this means is that sixteen is multiplying by itself zero times. Anything raised to the power of zero is 1. Therefore, 9 is being multiplied by one.
  5. In the second bracket the terms read as, 'sixteen to the power of one'. A number raised to the power of one is equal to that number. Therefore 12 is being multiplied by 16. When we multiply these we get 192.
  6. We then added the results in the results column to get our decimal equivalent number. Which is 201.

Example 2

Convert Hex ABC to decimal

Remember we raise the number sixteen to zero for the rightmost bit of the question. As we move across the numbers and letter in the question the power 16 is raised to is 1 more than the previous bit. For example, if we had a number with 22 bits the leftmost bit would be multiplied by sixteen to the power of 21.

Multiplication Result
C = 12 * (16 ^ 0) 12
B = 11 * (16 ^ 1) 176
A = 10 * (16 ^ 2) 2560

Answer = 2560 + 176 + 12 = 274810 decimal

Try these

Convert Hex AF, ACD, AB2 and FF to base 10

Answers are 17510, 276510, 273810 and 25510 respectively

The subscript at the bottom shows the base

How to Convert Decimal to Hexadecimal Manually

Example 1

To convert from decimal to hexadecimal you must divide the decimal number by 16 repeatedly. Then write the last remainder you obtained in the hex equivalent column. While doing so, if the remainder is more than nine remember to change it to its hex letter equivalent. The answer is taken from the last remainder obtained. Refer to diagram below as an example

decimal to hex conversion
decimal to hex conversion

Decimal to Hex Result

The answer is C9. As you can see it contains less bits than its decimal equivalent, 201.

  1. What we did was to divide our decimal number (base 10) by 16 to convert it to a hex equivalent (base 16).
  2. Our decimal number is 201. We divided this by 16 to get a value of 12 with a remainder of 9. The hex equivalent for 9 is 9 so no change is made.
  3. We then divided our previous answer ,12, by 16. We got a value of zero and a remainder of 12. We then converted 12 to hex. Twelve's hex equivalent is C (refer to the first table). We then wrote our answer from the last remainder we received to the first in the order from left to right respectively.

Example 2

Convert decimal 3000 to hexadecimal

Divisor Base 10 number Remainder in hex
16 3000
16 187 remainder 8 = 8
16 11 remainder 11 = B
16 0 remainder 11 = B

Answer equals to BB8 hexadecimal. Remember we write the last remainder we received at the front of our answer


Try these Decimal to Hex Conversions

Convert decimal 39554, 2856, 37 to base 16/Hex

Answers are 9A82, B28 and 25 respectively.

Conclusion

For some, this may seem difficult at first. But rest assured that with a little practice, converting from decimal to hex and changing hex to decimal can easily be mastered. You may check your answers using a calculator, type you decimal value in the dec (may vary depending on calculator) setting and then select 'hex' (may also vary depending on calculator) and press equal. Just do the opposite for hex to decimal. Easy isn't it. Though, I strongly recommend that you learn how to convert these number systems manually before using the calculator. So that you won't have to rely on a calculator to convert them.


An online calculator to convert number systems automatically since you know the basics behind the magic.


Was this hub easily understood and helpful?

See results

Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      bob 

      3 hours ago

      Very good extremely clear in the instructions

    • profile image

      nigky 

      2 weeks ago

      got it easily

    • profile image

      Thanks lot I understand 

      3 weeks ago

      Thanks

    • profile image

      roshni 

      5 weeks ago

      thanks a lot i understood it clearly

    • profile image

      Mina M. Parmar 

      7 weeks ago

      Convert decimal 201 to hexadecimal

      Solution:

      Integer Remainder

      201/16 =12. 9

      12/16 = 0. 12 i.e. C

      Hence decimal 201 = hex C9

    • profile image

      Swarnim 

      2 months ago

      Nicely explained. Thank you.

    • profile image

      PAYAL 

      2 months ago

      easy for me to understand , thank you

    • profile image

      savage 

      15 months ago

      i didnt read it

    • profile image

      Sebastian 

      19 months ago

      I found some parts of this quite hard to understand, like the remainders and how to do it without a calculator. Please help me to understand, my maths isn't that good with division.

    • profile image

      Doming su gatsaulo 

      2 years ago

      Nice one!!! Its more fun in the Phillipines

    • Fernando Idontkno profile image

      Fernando Idontkno 

      4 years ago from El Paso, Texas

      On example 2:

      Multiplication Result

      C = 12 * (16 * 0) 12

      12 * (16 * 0 ) should equal zero.

      it should be:

      12 * (16 ^ 0) = 12

    • easyguyevo profile imageAUTHOR

      easyguyevo 

      5 years ago from Barbados

      You are correct Alex. It was my mistake sorry for the trouble.

    • profile image

      Alex Lomas 

      5 years ago

      On the last set of TRY THESE examples

      I get 2857 = B29 ..........NOT B28 or am I mistaken

      I have worked this back and again it is not

      B28 = 2856

      Please comment, Alex Lomas

    • profile image

      Gemma 

      6 years ago

      I've found most sites do not mention what you need to do with the remainder.

      201 / 16 = 12.5625

      To get the remainder of 9, like in the example, you need to take the remainder .5625 and multiply by 16.

      201 / 16 = 12.5625

      .5625 * 16 = 9

      Converting is a two step process, yet for some reason no one ever mentions this, hope this helps someone!

    • easyguyevo profile imageAUTHOR

      easyguyevo 

      7 years ago from Barbados

      NO prob, lol.

    • profile image

      coder 

      7 years ago

      Thanks for the directions and source code! :-)

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, owlcation.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://owlcation.com/privacy-policy#gdpr

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)