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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
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

Post by answerhappygod »

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 1
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 1 (321.45 KiB) Viewed 41 times
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 As an example, suppose you are writing a program to read and display a number. This program could be written as follows: 0011000000000000; 0: 30 read n into accumulator 0010000000001010; 2: 2 10 store n at location 10 0001000000001010; 4: 1 10 load n from location 10 0100000000000000; 6: 40 output n 0000000000000000; 8: 0 0 stop 0000000000000000 ; 10: 00 storage location for n
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply