4. Write a LMC program that begins by accepting an input number. With each input instance, the program keeps track of the highest number entered so far. The program should loop indeterminate number of times but from the second input onward if a 0 (zero) is input, the program outputs the current highest number and stop. [20 marks] Hints: O O O O It may be useful to review and modify Question #2 in the LMC-Challenge. Begin program sequence at location address 00. Indicate each address, mnemonic and numerical instruction. In the first iteration, if the second input number is 0, then output the highest number so far and complete the process. o Otherwise, each successive number is read in, stored and compared. o The higher number is stored, and the process repeats (loops) until COB. 5. Consider the following LMC instructions found in the given locations in memory below. Complete the F/E cycle table indicating each step and the content of each register as they are performed for instruction 27 in the program. [30 marks] Address 26 27 50 51 F/E cycle Steps Instruction Code 550 151 550 126 PC MAR MDR IR A

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 14E
icon
Related questions
Question
100%
4. Write a LMC program that begins by accepting an input number. With each input instance,
the program keeps track of the highest number entered so far. The program should loop
indeterminate number of times but from the second input onward if a 0 (zero) is input, the
program outputs the current highest number and stop. [20 marks]
Hints:
O It may be useful to review and modify Question #2 in the LMC-Challenge.
O Begin program sequence at location address 00.
Indicate each address, mnemonic and numerical instruction.
In the first iteration, if the second input number is O, then output the highest number so
far and complete the process.
100
O
O
O Otherwise, each successive number is read in, stored and compared.
O
The higher number is stored, and the process repeats (loops) until COB.
5. Consider the following LMC instructions found in the given locations in memory below.
Complete the F/E cycle table indicating each step and the content of each register as they
are performed for instruction 27 in the program. [30 marks]
Address
26
27
50
51
F/E cycle Steps
Instruction Code
550
151
550
126
PC
MAR
MDR
IR
A
Transcribed Image Text:4. Write a LMC program that begins by accepting an input number. With each input instance, the program keeps track of the highest number entered so far. The program should loop indeterminate number of times but from the second input onward if a 0 (zero) is input, the program outputs the current highest number and stop. [20 marks] Hints: O It may be useful to review and modify Question #2 in the LMC-Challenge. O Begin program sequence at location address 00. Indicate each address, mnemonic and numerical instruction. In the first iteration, if the second input number is O, then output the highest number so far and complete the process. 100 O O O Otherwise, each successive number is read in, stored and compared. O The higher number is stored, and the process repeats (loops) until COB. 5. Consider the following LMC instructions found in the given locations in memory below. Complete the F/E cycle table indicating each step and the content of each register as they are performed for instruction 27 in the program. [30 marks] Address 26 27 50 51 F/E cycle Steps Instruction Code 550 151 550 126 PC MAR MDR IR A
Expert Solution
steps

Step by step

Solved in 2 steps with 10 images

Blurred answer
Knowledge Booster
ADT and Class
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
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
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,