Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The focus of this lab is to create a logic circuit simulator in C programming language. Specififically, there will be multiple milestones and students have

The focus of this lab is to create a logic circuit simulator in C programming language. Specififically,

there will be multiple milestones and students have to present the correct functionality of their

implementation

2Table 1: Truth table of the Boolean expression Y = A B + A C

A B C

Y

0 0 0

0

0 0 1

1

0 1 0

0

0 1 1

1

1 0 0

0

1 0 1

0

1 1 0

1

1 1 1

1

2.1 Milestone 1: Logic gates library DEMONSTRATION: Wednesday/Friday

February 10th/12th (depending on your group)

The fifirst step of this milestone is to create a fifile that contains the implementations in C programming

language of the seven logical gates. Specififically, 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 fifile named gates.c and

the corresponding prototypes in the fifile named gates.h.

The second step of this milestone is to write a program in a fifile 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 1. 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 fifile 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 fifinal output. Extra points if the calculation is performed

without extra variables (i.e. only use variables for the input and the fifinal output).

(a) Circuit 1

(b) Circuit 2

Figure 5: Custom circuits

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago