SLIDE 10 Ling-Chieh Kung (NTU IM) Programming Design – Selection and Repetition 10 / 61
Base conversion: fraction part
- Consider the faction part: XF = a-1r-1 + a-2 r-2 + ...... + a-mr-m.
- By multiplying XF by r, we obtain
1 2 1 2 3 1 2 1
...
m m m m
r a r a r a r a a r XF
integer in between 0..r−1 < 1
Because the maximum value of this part is
1 ) 1 ( 1 ) 1 ( ) ... ( ) 1 ( ) 1 ( ) 1 ( ... ) 1 ( ) 1 (
1 3 2 1 1 2 2 1
r r r r r r r r r r r r r r r
m m m
Number systems Complements Digital circuits Miscellaneous things