Question: can anyone write Wombat 1 machine language for This? Write Wombatl machine language program that converts a number into a radix representation. For example, a

 can anyone write Wombat 1 machine language for This? Write Wombatl

can anyone write Wombat 1 machine language for This?

Write Wombatl machine language program that converts a number into a radix representation. For example, a number converted into radix 2 or radix 3. The program should be able to convert a decimal number into any radix from 2 to 8. Your program should take two inputs. The first input will be the number to convert (should be positive) and the second input will be the radix. Note: in CPUSIM each output will be in one line. For example, if the conversion is for 8 bits binary then there will be 8 lines of output. 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: 00110000000000000 3 0 read n into accumulator 0010000000001010 2: 2 10 store n at location 10 0001000000001010 4: 1 10 load n from location 10 0100000000000000 6: 4 0 output n 0000000000000000 8: 0 0 stop 000000000000000010: 0 0 storage location for n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!