The document discusses five C programming tasks: 1) generating a digital clock, 2) writing a program for a full adder, 3) using a Karnaugh map to minimize a boolean function for a full subtractor, 4) designing a motor control state machine, and 5) writing a program for an ATM state machine with states such as idle, card inserted, PIN entered, option selected, and amount entered. Figures 1 and 2 show state diagrams for the motor control and ATM state machines.
The document discusses five C programming tasks: 1) generating a digital clock, 2) writing a program for a full adder, 3) using a Karnaugh map to minimize a boolean function for a full subtractor, 4) designing a motor control state machine, and 5) writing a program for an ATM state machine with states such as idle, card inserted, PIN entered, option selected, and amount entered. Figures 1 and 2 show state diagrams for the motor control and ATM state machines.
The document discusses five C programming tasks: 1) generating a digital clock, 2) writing a program for a full adder, 3) using a Karnaugh map to minimize a boolean function for a full subtractor, 4) designing a motor control state machine, and 5) writing a program for an ATM state machine with states such as idle, card inserted, PIN entered, option selected, and amount entered. Figures 1 and 2 show state diagrams for the motor control and ATM state machines.
2. Write a program in C for Full Adder 3. Write a C program for Karnaugh Map to minimize a Three Variables Boolean function (Full subtractor) 4. State Machine Design in C a. Let's say we are designing motor-control software. We want to start and stop the motor, as well as change the motor's speed.
Figure 1: Motor state diagram
5. Write a program for ATM state machine in C
Consider an ATM machine and creating its sample state machine in C. The state of the ATM machine could be changed through the coming events. The Sample States of the ATM machine. Idle State Card Inserted State Pin entered State Option Selected State Amount Entered State Initially, the ATM machine would be in the Idle state. When a user inserts the card then it changes state and processes the card. After the card processing, ATM again changes state and asks the user to enter the PIN. When the user enteres the PIN then it asks for choice (Balance inquiry, withdrawal, Deposit) and after that changes the state and asks to enter the amount and dispatches the entered amount.