Question: Create a logic circuit simulator in C programming language. ment The first step of this milestone is to create a file that contains the implementations
ment The first step of this milestone is to create a file that contains the implementations in C programming language of the seven logical gates. Specifically, each gate, except for the NOT gate, must be represented as a separate function with two integer arguments. The return value should be the output of the gate. The body of the functions must be located in a separate file named gates.c and the corresponding prototypes in the file named gates.h The second step of this milestone is to write a program in a file named logic.simulator.c that utilizes the already developed logic gates. The program should ask from the user which gate to simulate and then ask for the appropriate input. After that, the program should print the output of the logical gate and verify it by printing the truth table as well. Each gate can be indexed according to Figure For example, when the program asks for the gate to simulate, the user can enter 1 for NOT, 2 for AND, 3 for NAND etc. Last, the program should be continuous until the user types 'Q' The third step of this milestone is to combine the developed logical gates in order to create more complicated circuits. Write a program in a file named logic.simulator.circuit.c which simulates the two circuits presented in Figure 5 The program should ask form the user the values for the input for both circuits and then print the final output. Extra points if the calculation is performed without extra variables (i.e. only use variables for the input and the final output). AND OR AND (a) Circuit 1 (b) Circuit 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
