Coding with Scaling (1)
Assume the length is known to be 3.
bba
a
b
0
1
Scaling Principle:
If [r,l) is contained in [0,.5)
the double, r := 2r; l := 2l and
output 0.
If [r,l) is contained in [.5,1)
then shift by .5 and double,
r := 2(r -.5); l := 2(l-.5) and
output 1.
1/3
2/3
l = 2/3 r = 1
Previous slide
Next slide
Back to first slide
View graphic version