Finding the Largest Value with Little Man Computer

  • Thread starter Thread starter buttonmutton
  • Start date Start date
  • Tags Tags
    Computer
Click For Summary
SUMMARY

The discussion focuses on writing a program for the Little Man Computer (LMC) that identifies the largest value from an indefinite number of input values. Participants clarify that it is unnecessary to store all input values; instead, the program should maintain only the largest value encountered. Key programming techniques discussed include using conditional statements to compare input values and updating the stored maximum accordingly.

PREREQUISITES
  • Understanding of Little Man Computer architecture and instruction set
  • Familiarity with basic programming concepts such as loops and conditionals
  • Knowledge of input/output operations in LMC
  • Ability to implement algorithms for finding maximum values
NEXT STEPS
  • Study the Little Man Computer instruction set and its operations
  • Learn how to implement loops in LMC for processing multiple inputs
  • Research algorithms for finding maximum values in programming
  • Explore examples of LMC programs that handle conditional logic
USEFUL FOR

Students learning computer architecture, educators teaching programming fundamentals, and hobbyists interested in retro computing and algorithm design.

buttonmutton
Messages
4
Reaction score
0
How do you write a Little Man program which accepts an indefinite number of input values given the conditions that the output value has to be the largest of the input values.

Is it just by entering and storing input or otherwise?
 
Technology news on Phys.org
How much would you need to store in that case?
 
there's no limit
 
I think you misunderstood verty's post. You don't need to store all the input.
 
Then how do you write it?
 
Any suggestions?
 
Please give a detailed rationale why would you would need to store stuff without limit. What would you do with that stored stuff anyway?
 

Similar threads

  • · Replies 29 ·
Replies
29
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
17
Views
2K
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
23K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K