@sharooz said in decimal fractions:
AoA, Sir, plz explain why some decimal fractions cannot be finitely represented in binary system.
Dear @sharooz ,
Decimal fractions are either converted to a finit binary or an infinite binary. For example convert 0.375 to binary.
step 1: .375 * 2 = 0.75 (we record 0 and use the leftover .75 in the next step)
step 2: .75 * 2 = 1.5 (we record 1 and use the leftover .5 in the next step)
step 3: .5 * 2 = 1.0 (we record 1 and use the leftover is .0 so this becomes the last step)
So, .375 in binary is .011. This is the case of conversion to a finite binary. Try another example 0.3125.
Now you can look at the example .7625 in the handouts.
In step 5, you record 0 and the left over is .4. You continue but in step 9, things repeat, that is again you record 0 and the left over is .4.
So, this procedure will continue. The digits written in bracket (0011) are those which will repeat continously. This is an example of conversion to infinite binary.
Now the question is when the decimal fraction reduces to finite binary and when to infinite binary. Remove the decimal point, change it to a fraction and start simplifying. When reduced to the simplest form the one in which the denominator is power of base 2 converts to a finit binary. The one in which the denominator cannot be reduced to power of base 2 converts to an infinite binary. Please check this procedure with a) .3125 and b) .7625
Best wishes