it's hard to normalize numbers manually. but I'm sure, there are some algos or formulas to do this. I know one method of normalization:
for example, we have decimal number 2.5, and we want to represent it as double-precision floting-point (DPFP) value...
we know the format of DPFP value: 11 bits for biased exponent, 52 bits for significand. biasing constant = 1023.
to normalize the number we should solve an equation: 1.x * y = 2.5; here will take y = 2^1. then x = 2.5/2 = 1.25
now we have x = 0.25 decimal or 01b.
now let's form the value: exponent = 1, then biased exponent = 1024 (or 10000000000b), and significand is 4000000000000h
2.5 decimal = 01000000000001000000000... 40 more zeros...0b
|