Change the program above to add the numbers 157 and 13. (Hint: these numbers are constants and therefore can pre-exist into memory before the execution of the program). No need to write both mnemonics and numeric codes (opcodes), either one is fine. Please refer to the instruction set provided for all the LMC instruction mnemonics and opcodes.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter5: Looping
Section: Chapter Questions
Problem 13PE
icon
Related questions
Question

Q1. a) The Little Man Computer (LMC) is an instructional model of a computer used to teach students all of the basic features of a modern computer in a simplified way. The following Little Man program is supposed to add two input numbers and output the result, i.e.,

  •  

OUT = IN1 + IN2

Mailbox

Mnemonic code

Numeric code

00

IN

901

01

STO 99

399

02

IN

901

03

ADD 99

199

04

OUT

902

05

COB

000

 

 

  1. i) Change the program above to add the numbers 157 and 13. (Hint: these numbers are constants and therefore can pre-exist into memory before the execution of the program). No need to write both mnemonics and numeric codes (opcodes), either one is fine. Please refer to the instruction set provided for all the LMC instruction mnemonics and opcodes.

 

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Computational Systems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT