Question: Source code showing all your codes. Please include the global documentation and each function head documentation in your source code ( before compilation ) .
Source code showing all your codes. Please include the global
documentation and each function head documentation in your source code before
compilation
Run your simulation program with the testing input values cases as shown above
and submit the runtime outputWrite a simulation code program for bit ALU, which performs AND, OR Add and Sub
operations.
bit ALU should have subcomponents: input ANDOR gates, bit full adder, x mux and
mux. These subcomponents should be implemented with a function each.
Suggested steps to complete the code:
Write a simulation functions for AND gate and OR gate, eg
int ANDgate int a int b
int ORgate int a int b
Write a simulation function for the fulladder. eg
int fulladder int a int b int cin, int &cout
Write a simulation function for the eg
int muxxint int int sel
Write a simulation function for the mux, eg
int muxxint int int int string sel
Write a simulation function for the bitALU, eg
int ALUbit int a int b int Binv, int cin, string op int &cout
Write a driver module main function and test your bit ALU for correctness with all
possible input value combinations total cases to test
The driver should display input values and the corresponding output values for each
test case, ie
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
