Question: Please write the code in C++ and use vectors to store the list of inputs Requirements Create a function for each of the gate operations

Please write the code in C++ and use vectors to store the list of inputs

Please write the code in C++ and use vectors to store the

Requirements Create a function for each of the gate operations

Use an enumeration to specify the type of gates

Each gate may have up to 8 user-inputs.

An input value is either 0 or 1. Value 0 implies false and value 1 implies true

For demonstration, your program tests each operation and shows all inputs and output.

Hints:

- enum GATE_TYPE { NOT, AND, OR, ...}

- const int MAX_INPUT = 8;

int input[MAX_INPUT];

Write a C++ (or Java, etc.) menu-driven program that prompts the user to select the type of gate and deteri output for the given inputs (8 max inputs). Digital Logic Gates MAIN MENU == 1 - NOT gate 2 - AND gate 3- OR gate 4 - NAND gate 5 - NOR gate 6- Half-adder 7 - Full-adder 8 - Exit HALF-ADDER Circuit P Input/Output Table Q Carry Su 1 1 P OR 1 C O AND Sum 1 0 NOT 0 0 1 0 AND Carry 0 0 0 C FULL-ADDER Circuit C OR C half-adder #1 S Input/Output Table PORcs 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 0 Q 0 0 half-adder #2 1 R

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!