i = 1024; while( i > 0 ) i = i / 2;