Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help code Wombat 1.1 Write Womba machine language program that converts a number into a radix representation. For example, a number converted into radix

image text in transcribed

please help code

Wombat 1.1 Write Womba 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 ne. 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: 00110000000000o0: 30 read n into accumulator 00100000000010102: 2 10 store n at location 10 0001000000001010 4: 1 10 load n from location 10 0100000000000000 6: 40 output n 00000000000000008: 0 0 stop 0000000000000000 10: 0 0 storage location for n Submission Guidelines

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions