Cpu LMC Worksheet
Cpu LMC Worksheet
Cpu LMC Worksheet
A451:
Computer Systems and Programming
Section 2.1.2: Computing Hardware
OCR recognises that the teaching of this qualification above will vary greatly from
school to school and from teacher to teacher. With that in mind this lesson plan is
offered as a possible approach but will be subject to modifications by the individual
teacher.
Lesson length is assumed to be one hour.
Objective 2
Content
Time
Content
15 minutes
10 minutes
5 minutes
5 minutes
Get students to write their own little man programs. Give them
sheet 3 to work on. If they have finished, they should do the
extension sheet.
They will also need the reference sheet to do the second exercise
Addres Instructio
s
n
00
INP
01
STA 99
02
INP
03
ADD 99
04
OUT
05
HLT
Cut the instructions out into individual strips
Pupils should match the explanation with the instruction. And use this to fill in Sheet
1.
When you load the LMC there is already a program in the computer. The program is
written out in the table below in machine code. By executing the program and using
the list of instructions, work out what the program does.
Addres
s
Instructio
n
00
901
01
399
02
901
03
199
04
902
05
000
What it does:
Instruction
Mnemonic
MachineCode
Load
LDA
5xx
Store
STA
3xx
Add
ADD
1xx
Subtract
SUB
2xx
Input
INP
901
Output
OUT
902
End
HLT
000
Branchifzero
BRZ
7xx
Branchifzeroorpositive
BRP
8xx
Branchalways
BRA
6xx
Datastorage
DAT
xxreferstoaMailboxnumber(MemoryAddress)
Add 3 numbers
Value
Comment
Instruction
What it does
Value
Comment
Program:
Addres
s
00
01
02
03
04
05
06
07
08
09
10
Instruction
What it does