Truth table in C programming Please follow the instructions below and include comments and snipshot for explanation
Question:
Truth table in C programming
Please follow the instructions below and include comments and snipshot for explanation thanks.
1) Copy the C program below. This program generates the truth table for a three input OR function.
2) Modify the program to print a truth table for function f given by its canonical SOP form of f=x'y'z' + x'yz' + x'yz' + x'yz + xy'z' + xyz
Compare the printout produced by your program to the truth table below.
3) Look at the code, line 15. Notice that each logic calculation uses bitwise operators (~, &, and |), and that the last operation uses &1 to mask out all but the least significant bit. Edit the code and remove the &1 operation from your answer to part 1, then recompile and re-execute the code.
3) In fewer than 20 words, explain why the function f values appear as negative values in the resulting output.
For every execution please please take a snipshot of the output code. Thanks.
Process Dynamics And Control
ISBN: 978-0471000778
2nd Edition
Authors: Dale E. Seborg, Thomas F. Edgar, Duncan A. Mellich