Tag: LMC

Bubble Sort Algorithm in LMC


The aim of this challenge is to implement a Bubble sort algorithm on a list of 10 values using LMC. We will be using our online LMC simulator to test our code online LMC simulator: Executing the Code We will

Memory Filler in LMC


The aim of this challenge is to write a program in LMC that will fill in the memory/RAM with the value 999, from memory location 50 onwards (up to memory location 99). Note that even though such a program may

Self-modifying code in LMC


In computer science, self-modifying code is code that alters its own instructions while it is executing. Getting code that overwrites itself can seem dubious, rather risky and hence unrecommended. However in some cases, it is a technique that can be

Stacks and Queues in LMC


In this post we will investigate how to implement a queue and a stack data structure using low-level programming. We will use an upgraded version of Little Man Computer (LMC) that supports indirect addressing to to do. Implementing a Queue

Assembly Language


Assembly language is a low-level programming language. Each assembly language is specific to a particular computer architecture. Assembly language uses mnemonics to represent low-level machine instructions or opcodes. Many operations require one or more operands in order to form a

Step Count Algorithm in LMC


Count-controlled loops are used in many programs to increment a counter for each iteration of the loop. Per default the increment for the counter is +1. However you can specify a different step when incrementing your counter in a count-controlled

Higher or Lower LMC Challenge


For this challenge you will write a program of Guess the number (Higher or Lower?) using LMC assembly language. Your program will be used by two users (player A and player B) as follows: Ask player A to input a

Fibonacci Sequence using LMC


Did you know? The Fibonacci Sequence is the series of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 … where the next number is found by adding up the two numbers just before it. The first

LMC Simulator


LMC simulators are based on the Little Man Computer (LMC) model of a computer, created by Dr. Stuart Madnick in 1965. The LMC simulator is generally used to for educational purposes, because it models a simple Von Neumann architecture computer

Triangular Numbers using LMC


A triangular number correspond to the number of dots that would appear in an equilateral triangle when using a basic triangular pattern to build the triangule. The triangular numbers sequence contains all the triangular numbers in order. The first 10