Page 156 - Bebop to The Boolean Boogie An Unconventional Guide to Electronics Fundamentals, Components, and Processes
P. 156

State Diagrams, State Tables, and State Machines     7 37

               But wait, there’s more! A further analysis of  the 138 solutions requiring
           seven product terms yields the following:

                                66 solutions requiring 17  literals
                                24 solutions requiring 18  literals
                                48 solutions requiring 19  literals

               Thus, the chances of a random assignment resulting in an optimal solution
            is relatively slight. Fortunately, there are computer programs available to aid
            designers in this task.5 One solution resulting in the minimum number of
           product terms and literals is shown in Figure 12-6.



                                                     Current 5tate              %ate
                                                 q2        c1?     @         Assignments
                                                  0        0        0          10-cents
                                                  0        0        1          15-cents
                                                  0        1        0             -
                                                  0        1        1          20-cents
                                                  1        0        0           0-cents
                                                  1        0        1           5-cents
                                                  1        1        0             -
                                                  1        1        1             -

                                                 d2        dl      dO           State
                       State Variable                  Next 5 ta te          Assignments
                         Reg is-ters


                         Figure 12-6. Example binary encoded state assignment

               A truth table for the controller function can now be derived from the state
            table shown in Figure 12-3 by replacing the assignments in the current state
           column with the corresponding binary patterns for the state variable outputs
            (q2, q~, and q,O), and replacing the assignments in the next state column with
           the corresponding binary patterns for the state variable inputs (d2, dl, and do).
           The resulting equations can then be derived from the truth table by means of
           standard algebraic or Karnaugh map techniques. As an alternative, a computer




           5 The author used the program BOQL, which was created by his friend Alon Kfir (a man with a
             size-16 brain if ever there was one).
   151   152   153   154   155   156   157   158   159   160   161