Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7509945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:04:36+00:00 2026-05-29T23:04:36+00:00

Right now I’m preparing for my AP Computer Science exam, and I need some

  • 0

Right now I’m preparing for my AP Computer Science exam, and I need some help understanding how to convert between decimal, hexadecimal, and binary values by hand. The book that I’m using (Barron’s) includes an example but does not explain it very well.

What are the formulas that one should use for conversion between these number types?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:04:37+00:00Added an answer on May 29, 2026 at 11:04 pm

    Are you happy that you understand number bases? If not, then you will need to read up on this or you’ll just be blindly following some rules.

    Plenty of books would spend a whole chapter or more on this…

    Binary is base 2, Decimal is base 10, Hexadecimal is base 16.

    So Binary uses digits 0 and 1, Decimal uses 0-9, Hexadecimal uses 0-9 and then we run out so we use A-F as well.

    So the position of a decimal digit indicates units, tens, hundreds, thousands… these are the “powers of 10”

    The position of a binary digit indicates units, 2s, 4s, 8s, 16s, 32s…the powers of 2

    The position of hex digits indicates units, 16s, 256s…the powers of 16

    For binary to decimal, add up each 1 multiplied by its ‘power’, so working from right to left:

    1001 binary = 1*1 + 0*2 + 0*4 + 1*8 = 9 decimal
    

    For binary to hex, you can either work it out the total number in decimal and then convert to hex, or you can convert each 4-bit sequence into a single hex digit:

    1101 binary = 13 decimal = D hex
    
    1111 0001 binary = F1 hex
    

    For hex to binary, reverse the previous example – it’s not too bad to do in your head because you just need to work out which of 8,4,2,1 you need to add up to get the desired value.

    For decimal to binary, it’s more of a long division problem – find the biggest power of 2 smaller than your input, set the corresponding binary bit to 1, and subtract that power of 2 from the original decimal number. Repeat until you have zero left.

    E.g. for 87:

    • the highest power of two there is 1,2,4,8,16,32,64!
    • 64 is 2^6 so we set the relevant bit to 1 in our result: 1000000
    • 87 – 64 = 23
    • the next highest power of 2 smaller than 23 is 16, so set the bit: 1010000
    • repeat for 4,2,1
    • final result 1010111 binary
    • i.e. 64+16+4+2+1 = 87 in decimal

    For hex to decimal, it’s like binary to decimal, only you multiply by 1,16,256… instead of 1,2,4,8…

    For decimal to hex, it’s like decimal to binary, only you are looking for powers of 16, not 2. This is the hardest one to do manually.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now I have some TabItems in my App which are implicitly styled. I
Right now the div text is being changed to text I need it to
Right now I'm stuck between using PHP's native session management, or creating my own
Right now, I miss quite some issues for my project hosted on GitHub. I
Right now, I keep all of my projects on my laptop. I'm thinking that
Right now, I'm particularly interested in reading the data from MP3 files (ID3 tags?),
Right now my ant task looks like. <javadoc sourcepath=${source} destdir=${doc}> <link href=http://java.sun.com/j2se/1.5.0/docs/api/ /> </javadoc>
Right now I have a database (about 2-3 GB) in PostgreSQL, which serves as
Right now I'm doing something like this: RewriteRule ^/?logout(/)?$ logout.php RewriteRule ^/?config(/)?$ config.php I
Right now I have an SSIS package that runs every morning and gives me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.