Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the Little Man Computer instruction set and the LMC Simulator : write a program that: 1. input 3 numbers 2. output the largest of

Use the Little Man Computer instruction set and the LMC Simulator: write a program that:

1. input 3 numbers

2. output the largest of the 3 numbers

Once you run your program, take a screen shot and submit the screenshot as your test result.

Helpful Information:

LMC Instruction set

Data movement:

o LOAD - op code 5 LDA

o STORE - op code 3 STA (STA)

Arithmetic:

o ADD - op code 1 (ADD) o SUBTRACT - op code 2 (SUB)

Input/Output:

o INPUT - op code 901 (INP)

o OUTPUT - op code 902 (OUT)

Machine/Program control:

o BRANCH - op code 6 (BRA)

o BRANCH ON ZERO - op code 7 (BRZ)

o BRANCH ON POSITIVE - op code 8 (BRP)

o BREAK - op code 0 (HLT)

Hint:

Play with the simulator, and learn how it works from the video first. Enter the program in the video into the LMC simulator and run it yourself.

The advanced video has more programs you can use.


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

Big Data With Hadoop MapReduce A Classroom Approach

Authors: Rathinaraja Jeyaraj ,Ganeshkumar Pugalendhi ,Anand Paul

1st Edition

1774634848, 978-1774634844

More Books

Students also viewed these Databases questions

Question

What is your worst fault?

Answered: 1 week ago