markprocessor question
#1
Hi,

mp64 -1 01 ?1?1?1?1?1?1?1?1 -o posibilities.txt

how to make all possibilities but only with 4x 1 and 4x 0 no more in results?

i dont want   11111111 = 8x1
or                 00000000 = 8x0
or 11111000 = 6x1 2x0

i want          11110000 = 4x1 4x0
or                00110011 = 4x1 4x0
#2
You can't do that with maskprocessor. I've written a small perl script for you.

Code:
for (my $i = 0; $i < 256; $i++)
{
  my $ones = 0;

  for (my $j = 0; $j < 8; $j++)
  {
    next unless (($i >> $j) & 1);

    $ones++;
  }

  next unless $ones == 4;

  printf ("%08b\n", $i);
}

Result:

Quote:00001111
00010111
00011011
00011101
00011110
00100111
00101011
00101101
00101110
00110011
00110101
00110110
00111001
00111010
00111100
01000111
01001011
01001101
01001110
01010011
01010101
01010110
01011001
01011010
01011100
01100011
01100101
01100110
01101001
01101010
01101100
01110001
01110010
01110100
01111000
10000111
10001011
10001101
10001110
10010011
10010101
10010110
10011001
10011010
10011100
10100011
10100101
10100110
10101001
10101010
10101100
10110001
10110010
10110100
10111000
11000011
11000101
11000110
11001001
11001010
11001100
11010001
11010010
11010100
11011000
11100001
11100010
11100100
11101000
11110000