in reply to Re: Bit manipulation of a bit stream to generate different elements of an array with each nibble taking either 0 or 1 in perl
in thread Bit manipulation of a bit stream to generate different elements of an array with each nibble taking either 0 or 1 in perl

I think that for each width, he requires only the integers
[2^($width-1) .. 2^$width-1]
transformed as others have shown.

UPDATE: From the viewpoint of 'permutations', discard all permutations that start with '0'.

Bill
  • Comment on Re^2: Bit manipulation of a bit stream to generate different elements of an array with each nibble taking either 0 or 1 in perl
  • Download Code