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
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
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
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!