Programming Assignment #3 -- DUE 11/2/01 11:00am
Key learning: branches
A simple ALU has 3 logical functions and 1 arithmetic function. The inputs of the ALU are A and B and will be loaded before selecting the function to be performed. The result of the operation will appear at the output.
The ALU functions are:
1. A AND BThe program will first ask the user to input A and B.
Next, the program will print a numbered menu of the ALU's functions
The program will finally output the respective function performed and the result.
Example AND output:
Enter A: 1OR example:
Enter A: 5NOT example:
Enter A: 1ADD example
Enter A: 192