Design Homework for Logic Design of Digital System

Your assignment is to design a finite-state machine to control a simple vending machine. The machine only takes nickels (5 cents) and dimes (10 cents), dispenses gum which costs 10 cents, and candy which costs 15 cents, and gives correct change. The possible inputs to the machine are n (a nickel is
inserted), d (a dime is inserted), g (gum is requested), and c (candy is requested). The possible outputs of the machine are N (return a nickel), D (return a dime), G (dispense gum), and C (dispense candy). Each of these inputs and outputs should be represented by a single wire from the outside of your controller. Your machine must be able to correctly and appropriately serve an arbitrary number of customers in sequence. If a person requests gum or candy, but doesn’t put in enough money first, return all their money. Design your circuit with edge-triggered J-K flip-flops. You must give a state diagram with the transitions labelled with inputs and outputs, a state table including
the flip-flop inputs and all the outputs, Karnaugh maps for the outputs and flip-flop inputs that can’t be simplified by inspection, the simplified logic equations, and the overall circuit diagram, including the generation of the clock signal. Minimize the number of states needed. Use the standard binary count sequence for your state assignment. Name your flip-flops A, B, C, etc., with A being the most significant bit.