Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

U11 Informing Industry: Publicizing Contract Actions 317

Answered: 1 week ago