for( $_=0b000000000000111111; ($x=$_)<=0b111111000000000000; $x&=~$x>>1,$x&=-$x,$_+=$x--,($x&=$_)?($_-=$x,$_+=$x/($x&-$x)):0 ){ printf "%018b\n",$_ }
In reply to Re: Is there a faster way to do this?
by I0
in thread Permutations in binary
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |