MGMT 1030 Lecture Notes - Lecture 6: Opcode

12 views2 pages
MGMT 1030 Tutorial 6 Notes Mailbox Address
Introduction
We would like the Little Man to do some useful work.
For this purpose we have invented a small group of instructions that he can perform.
Each instruction will consist of a single digit.
We will use the first digit of a three-digit number to tell the Little Man which operation
to perform.
In some cases, the operation will require the Little Man to use a particular mailbox to
store or retrieve data (in the form of three-digit numbers, of course!).
Since the instruction only requires one digit, we can use the other two digits in a three-
digit number to indicate the appropriate mailbox address to be used as a part of the
instruction.
Thus, using the three digits on a slip of paper we can describe an instruction to the Little
Man according to the diagram: 3 | 25 instructions | mailbox address
The instruction part of the three-digit code is also kow as a operatio code.
Op code for short.
The op code number assigned to a particular instruction is arbitrary, selected by the
computer designer based on various architectural and implementation factors.
The op codes used by the author conform to the 1979 version of the Little Man
Computer model.
Now lets defie soe istructios for the Little Man to perform
LOAD instructionop code 5
The Little Man walks over to the mailbox address specified in the instruction.
He reads the three-digit number located in that mailbox
Then walks over to the calculator and punches that number into the calculator.
The three-digit number in the mailbox is left unchanged, but of course the original
number in the calculator is replaced by the new number.
STORE instructionop code 3
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents