Electronic dice 2026-10-31
An electronic display cycling through the six die faces while a switch is pressed. A modulo-six counter and combinational logic can drive seven lights arranged as die pips. The apparent unpredictability comes from uncertainty in release timing relative to a rapid clock signal; deterministic cycling alone does not establish equal outcome probabilities.
Use three D flip-flops whose stored bits represent . Initialize them to . The Moore machine's output is this stored binary representation, and its state transition table is:
| Present | Next |
|---|---|
Treat the two unused state encodings as don't-care conditions when minimizing the sum of products. With juxtaposition for AND, for OR and a bar for NOT, one minimal choice isFor , the required ones at and cannot share one valid implicant: their differing bits would force inclusion of required zeros. Pair with the unused to get , and with unused to get . Neither term can lose a Boolean literal without covering a required zero.
For , state is isolated from every other required one and from the unused states by required zeros, so it forces the three-Boolean literal term . State pairs with unused to give . Finally is a single Boolean literal. Thus the three expressions are minimal sum of products expressions under the stated unused-state convention. In fact these choices also recover from , so initialization into an unused state eventually joins the intended modulo-six counter cycle.
Use a synchronous counter cascade, with the three-bit modulo-six counter advancing on every active clock edge and the Gray-code counter advancing only when the old binary state is . Its enable can therefore beOn the six valid binary states, only at . Both digital counters sample the same clock: at an edge leaving , the binary output becomes and simultaneously advances to the next Gray code. At all other edges holds. Starting from , this gives exactly the listed 24-state sequence. Use the shared clock and an enable, rather than making a combinational terminal-state signal into a new clock.[ref]
Digital systems, linear algebra, introduction to formal proof examination paper by the University of Oxford (2014). Question 3(c), printed page 4: original 24-row state/output table
For the output , every state with has . For , the only extra high states are with binary state , and with binary state or . On valid states these conditions are and , respectively. HenceThe lower circuit in the figure implements this with an AND for , an exclusive or on , an AND with , and an OR with . The resulting Morse code output blocks, in Gray code order , areAcross the two middle blocks these join to three three-clock highs separated by one-clock lows; the first and last blocks provide the three single-clock highs of each S. The specified table is a repeating SOS symbol pattern; its wraparound has a one-clock low, rather than an added inter-message pause. The output is a Moore machine decoding of current stored bits; its value changes after those bits settle.