Help for this page

Select Code to Download


  1. or download this
             1         2         3         4         5         6         7
    +         8
    1234567890123456789012345678901234567890123456789012345678901234567890
    +1234567890
    sub{$m=sprintf('%b',shift);$n=1;for(reverse split//,$m){$_&&push@v,$n;
    +$n*=2}@v}
    
  2. or download this
             1         2         3         4         5         6         7
    +         8
    1234567890123456789012345678901234567890123456789012345678901234567890
    +1234567890
    sub{for(reverse split//,sprintf('%b',shift)){$_&&push@v,2**$n;$n++}@v}