2. Literature review
An early vending machine is invented by Hero of Alexandria, a first-century engineer and mathematician . In 1876, Simeon Denham built a vending machine dispensing stamps called “the first fully automatic vending machine”. A modern coin-operated vending machine was first introduced in London in 1883 by Percival Everitt. After that, vending machines have become well-known and been widely used in England.
The following is details about background knowledge related to the design of the vending machine.
2.1 Truth Tables 
Figure 2.1: An example of truth table.
Truth tables are a kind of table for describing the set of result for each alternative set of inputs. Using ...view middle of the document...
That signal can be translated as the button has been pressed and released several time before it become steady. Also, if wiring the push button straight to the vending machine, when the buyer push and hold a button, the machine will read the signal as item has been purchased several times. So, the signal from a push button needs to be passed through a single pulser to make it steady and short before passing through the vending machine. The concepts of single pulser are reading input signal every clock instead of reading it all the time to make a steady output and generating only a single clock of high signal after the button has been pressed. The signal can become high again when the button is pressed after it has been released. So, the machine won’t misunderstand when user hold a button.
A multiplexer, or MUX, is a combinational logic network with 2n data inputs, n control inputs, and one data output. 
2.6 Karnaugh Map
Karnaugh Map or K-Map is a useful method for Boolean expression simplification. The goal of using this method is to implement the expression with fewest literals and fewer wires as possible. The concept of Karnaugh map is that when the output does not depend on some inputs, those inputs can be cut off from the expression since its do not affect a result of the output. The Kernaugh map is another way to represent a truth table so the designer can easily grouping the result. It can be drawn by arranging the input to be only one bit different from the adjacent block. Figure 2.5 show K-map which has a different number of inputs 2, 3, and 4 from left to right.
Figure 2.5: K-map which has a different number of inputs 2, 3, and 4 from left to right.
For example, if we have a truth table as in Figure 2.1 which shows the result of the value of the output V form the Boolean expression A’BC+AB’C+ABC’+ABC = V, this truth table can be translated into K-map as the left table in Figure 2.6. After simplifying the expression by using the K-map, we get BC+AC+AB = V expression which uses less resources to implement.
Figure 2.6: K-map of the Boolean expression A’BC+AB’C+ABC’+ABC = V or BC+AC+AB = V
2.7 Finite State Machine Design
Finite State Machine Design is a designing method which analyzes the problem and separates it into a sequence of states. The action performed by actors or the input will be the one that decides the next state and the machine can be in only one state at a time. The designer can design a finite state machine by drawing a...