Write a program to simulate a digital system consisting of AND, OR, and NOT gates connected in various user-defined ways. Each AND and OR gate has two inputs and one output. Each NOT gate has one input and one output. Each gate is to be implemented as a thread that receives Boolean values from other gates. The data for this program will be an array defining the interconnections and the gate functions. For example, Table 8.2 defines the logic circuit shown in Figure 8.15. First establish that your program can simulate the specific logic circuit shown in Figure 8.15, and then modify the program to cope with any arrangement of gates, given that there are a maximum of eight gates.
Table 8.2
Figure 8.15
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here