Wombat 1.1 A function is defined as follows: f(n) = (n-2 for n<1 n+ 5 for n = 1 n2 – 2n +1 for n > 1 Write Wombatl machi
Posted: Wed Apr 27, 2022 3:40 pm
Wombat 1.1 A function is defined as follows: f(n) = (n-2 for n<1 n+ 5 for n = 1 n2 – 2n +1 for n > 1 Write Wombatl machine language program that reads an input integer value n, and computes and displays the output of the above function f(n). In the binary version of your programs that can be executed on the CPUSim simulator, you are also required to write as comments the line number/address, equivalent decimal version of the binary and appropriate comments to explain each line in your program. The decimal version of the program represents each binary line as two decimal values (first value is the opcode – 4 bits; second value is the operand/memory address - 12 bits). Therefore, each line of your program should be formatted as follows: Binary-number, Semi-colon, Line-number/address, Decimal-opcode, Decimal-operand/address, Comments