Converting 37.223_10 to hexadecimal/base 16.

  • Thread starter Thread starter s3a
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
s3a
Messages
828
Reaction score
8

Homework Statement


Convert 37.223_10 to hexadecimal/base 16.

Homework Equations


N/A

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!
 
Physics news on Phys.org
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.
 
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.)
 
mfb said:
You can extend the same concept: Everything in decimal notation:
0.223 = ?*1/16 + ...
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: