Discussão:Cadeia de bits
Counting
Exemplos de cadeias de "até k bits":
k=1 | k=2 | k=3 | k=4 | k=12 |
---|---|---|---|---|
1 bit:
0 1 n=2 |
To 2 bits:
0 00 01 1 10 11 n=6 |
To 3 bits:
0 00 000 001 01 010 011 1 10 100 101 11 110 111 n=14 |
To 4 bits:
0 00 000 0000 0001 001 0010 0011 01 010 0100 0101 011 0110 0111 1 10 100 1000 1001 101 1010 1011 11 110 1100 1101 111 1110 1111 n=30 |
To 12 bits:
0 00 000 0000 00000 000000 0000000 00000000 000000000 0000000000 00000000000 000000000000 000000000001 00000000001 000000000010 000000000011 0000000001 00000000010 000000000100 000000000101 00000000011 000000000110 000000000111 000000001 0000000010 00000000100 000000001000 000000001001 00000000101 000000001010 000000001011 0000000011 ... n=... |