Convert decimal fraction to hexadecimal fraction
The method involved in the conversion of fractional decimal number to fraction hexadecimal number is different, in this post we will only concentrate on the fractional conversion.
The steps for the conversion are given below:
Successive multiplication is used to convert a given fractional decimal number to its equivalent hexadecimal fraction.
- Here the given decimal fraction is successively multiplied by the base of the target number system (16, here it is hexadecimal system).
- During each multiplication iteration, the product generated will have a carry (integer part of the product) and a fractional part.
- The carry obtained at each multiplication step becomes a numeral in the hexadecimal fraction.
- The fractional part of the product is again multiplied by base 16 in the next step and the process is repeated until the fractional part becomes zero or the number of multiplication iteration equals the number of digits after the decimal point in the given decimal fraction.
- Weights are assigned for the carry obtained at each multiplication step in the increasing order starting from the first multiplication step to the last step, such that the carry obtained in the first multiplication iteration is the most significant bit (MSD) after the decimal point and the carry obtained in the last multiplication iteration is the least significant bit (LSD)
- This procedure is illustrated in the following example.
Ex1: Convert (0.0628)10 decimal fraction to hexadecimal fraction (?)16 using successive multiplication method
1st Multiplication Iteration
Multiply 0.0628 by 16
0.0628 x 16 = 1.0048(Product) Fractional part=0.0048 Carry=1 (MSD)
2nd Multiplication Iteration
Multiply 0.0048 by 16
0.0048 x 16 = 0.0768(Product) Fractional part = 0.0768 Carry = 0
3rd Multiplication Iteration
Multiply 0.0768 by 16
0.0768 x 16 = 1.2288(Product) Fractional part = 0.2288 Carry = 1
Here the fractional part doesn’t become zero but we obtain required number of significant digits after the decimal point. Thus we stop the multiplication iteration and assign the weights to the digits obtained in each multiplication step in the increasing order starting from the 1st multiplication step to last multiplication step.
Carry from the 1st multiplication iteration becomes MSB and carry from 4th iteration becomes LSB after the decimal point.
Hence, the fractional hexadecimal number of the given decimal fraction
(0.0628)10 is (0.1013)16.