Converting 37.223_10 to hexadecimal/base 16.

  • Thread starter s3a
  • Start date
In summary, converting 37.223_10 to hexadecimal/base 16 involves dividing the decimal number by 16 and using the remainder as the corresponding hexadecimal digit. This process can be extended to the fractional part by multiplying by 16 and repeating the same steps. The final hexadecimal representation of 37.223_10 is hex .3916872B.
  • #1
s3a
818
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
  • #2
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.
 
  • #3
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.)
 
  • #4
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:
  • #5


I would like to clarify that the given number 37.223_10 is already in base 10, so there is no need to convert it. However, if you are looking to convert it to a different base, such as base 16 (hexadecimal), you can follow the steps outlined in your attempt. For the fractional part, you can multiply the decimal part (0.223) by the base you want to convert to (16) and take the integer value of the result. This will give you the first digit after the decimal point in hexadecimal. In this case, 0.223 * 16 = 3.568, so the first digit after the decimal point is 3. Then, you can repeat this process with the remaining decimal part (0.568) until you have the desired precision. In this case, 0.568 * 16 = 9.088, so the second digit after the decimal point is 9. Therefore, the number 37.223_10 in hexadecimal is 25.39.
 

FAQ: Converting 37.223_10 to hexadecimal/base 16.

1. What is the process for converting a decimal number to hexadecimal?

The process for converting a decimal number to hexadecimal is as follows:

1. Divide the decimal number by 16.

2. Take the remainder and convert it to the corresponding hexadecimal digit (0-9, A-F).

3. Repeat the process, dividing the quotient by 16 until the quotient is 0.

4. Write the hexadecimal digits in reverse order to get the converted number.

2. What is the decimal equivalent of a hexadecimal number?

The decimal equivalent of a hexadecimal number is the sum of each digit multiplied by its corresponding power of 16. For example, the hexadecimal number 37 is equivalent to (3*16^1) + (7*16^0) = 48 in decimal.

3. How do I convert a fractional decimal number to hexadecimal?

To convert a fractional decimal number to hexadecimal, follow these steps:

1. Multiply the fractional part by 16.

2. Take the integer part of the result and convert it to the corresponding hexadecimal digit.

3. Repeat the process, multiplying the remaining fractional part by 16 until the fractional part becomes 0 or the desired precision is achieved.

4. Write the hexadecimal digits after the decimal point to get the converted number.

4. Can I use a calculator to convert decimal to hexadecimal?

Yes, many scientific calculators have a function for converting decimal to hexadecimal. Alternatively, you can use an online converter or a programming language with built-in functions for conversion.

5. What is the significance of using hexadecimal in computing?

Hexadecimal is often used in computing because it is a convenient way to represent binary numbers in a shorter and more readable format. It is also commonly used in computer memory addressing and programming languages such as HTML and CSS.

Similar threads

Replies
8
Views
5K
Replies
2
Views
11K
Replies
4
Views
1K
Replies
2
Views
3K
Replies
6
Views
1K
Replies
4
Views
15K
Replies
8
Views
2K
Back
Top