??? 08/24/08 14:37 Read: times |
#157703 - 256 / 6 is a failure Responding to: ???'s previous message |
An 8-bit counter has 256 possible steps, but 256 / 6 = 42.66666...
Because of this, not all six alternatives will get the same chance. A solution where some iterations takes 7 clocks and some takes 8 clocks will also be immediately picked up at the testing. If they produce 30k numbers, they expect to find close to 5k of every possible digit. 7/8 = 0.875 which is trivial to detect at the test. Creating a six-byte table with the values 1,2,3,4,5,0 and use the current value to look up the next is a sample way to get identical step times. Then after the key is pressed (or released), convert from a number 0..5 into the shifted value. |