Third Example
Problem: Given nɬ,
set s to the largest power of 2 that is at most n.
n s
1 1 20 = 1
2 2 21 = 2
3 2
4 4 22 = 2*2 = 4
5 4
6 4
7 4
8 8 23 = 2*2*2 = 8
Previous slide
Next slide
Back to first slide
View graphic version