1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Converting 37.223_10 to hexadecimal/base 16.

  1. Jan 27, 2013 #1

    s3a

    User Avatar

    1. The problem statement, all variables and given/known data
    Convert 37.223_10 to hexadecimal/base 16.

    2. Relevant equations
    N/A

    3. The attempt at a solution
    I know how to get the non-fractional/whote part.:
    37 % 16 = 5
    2 % 16 = 2

    and the whole part is: 25.

    Having said that, I do not know how to get the fractional part.

    Could someone please help me get the fractional part as well?

    Any help would be greatly appreciated!
     
  2. jcsd
  3. Jan 27, 2013 #2

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    You can extend the same concept:

    Everything in decimal notation:
    37.223 = 2*16 + 5.223
    5.223 = 5*1 + 0.223
    0.223 = ?*1/16 + ...
    ... = ?*1/16^2 + ...
    And so on.
     
  4. Jan 27, 2013 #3

    s3a

    User Avatar

    I'm still confused. (Sorry.)

    With what you gave in the last post, how do I know that the fractional part in the hexadecimal version is 392?

    (I know that it's 392 using Wolfram alpha.)
     
  5. Jan 27, 2013 #4

    rcgldr

    User Avatar
    Homework Helper

    Note that dividing by 1/16 is the same as multiplying by 16:

    0.223 = ?*1/16 + ...
    0.223 * 16 = 3.568
    0.223 = 3 * 1/16 + .0355

    0.0355 = ? * 1/16^2 + ...
    .0355 * 16^2 = 9.088
    0.0355 = 9 * 1/16^2 + 0.00034375

    0.00034375 = ? * 1/16^3 + ...
    0.00034375 * 16^3 = 1.408
    0.00034375 = 1 * 1/16^3 + 0.000099609375

    0.000099609375 = ? * 1/16^4 + ...
    0.000099609375 * 16^4 = 6.528
    0.000099609375 = 6 * 1/16^4 + 0.000008056640625

    You could pick up 16 bits at a time:
    0.223 = ?*1/16^4 + ...
    0.223 * 16^4 = 14614.528
    14614_10 = 3916_16 (use integer base conversion)
    0.223 = 3916_16 / 16^4 + 0.000008056640625

    0.000008056640625 = ? * 1/16^8 + ...
    0.000008056640625 * 16^8 = 34603.008
    34603_10 = 872B_16 (integer base conversion)
    0.000008056640625 = 872B_16 * 1/16^8 + 0.00000000000186264514923095703125

    0.223 = hex .3916872B ...
     
    Last edited: Jan 27, 2013
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Converting 37.223_10 to hexadecimal/base 16.
Loading...