Chapter 6 the little man computer
Download
1 / 45

CHAPTER 6: The Little Man Computer - PowerPoint PPT Presentation


  • 1088 Views
  • Updated On :

CHAPTER 6: The Little Man Computer. The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander John Wiley and Sons  2003 Linda Senne, Bentley College Wilson Wong, Bentley College. Introduction.

Related searches for CHAPTER 6: The Little Man Computer

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'CHAPTER 6: The Little Man Computer' - macha


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Chapter 6 the little man computer l.jpg

CHAPTER 6:The Little Man Computer

The Architecture of Computer Hardware and Systems Software: An Information Technology Approach

3rd Edition, Irv Englander

John Wiley and Sons 2003

Linda Senne, Bentley College

Wilson Wong, Bentley College


Introduction l.jpg
Introduction

  • The power of the computer does not arise from complexity. Instead, the computer has the ability to perform simple operations at an extremely high rate of speed.

  • These operations can be combined to provide the computer capabilities that you are familiar with.

Chapter 6 Little Man Computer


Lmc little man computer l.jpg
LMC – Little Man Computer

  • Original was created by Dr. Stuart Madnick at MIT in 1965.

  • He produced a newer version in 1979. The newer version has a slightly modified instruction set. We will use the modified version.

Chapter 6 Little Man Computer


The little man computer l.jpg
The Little Man Computer

Chapter 6 Little Man Computer


Mailboxes address vs content l.jpg
Mailboxes: Address vs. Content

  • Addresses are consecutive

  • Content may be

    • Data or

    • Instructions

Chapter 6 Little Man Computer


Content instructions l.jpg
Content: Instructions

  • Op code

    • Operation code

    • Arbitrary mnemonic

  • Operand

    • Object to be manipulated

      • Data or

      • Address of data

Chapter 6 Little Man Computer


Magic l.jpg
Magic!

  • Load program into memory

  • Put data into In Basket

Chapter 6 Little Man Computer


Assembly language l.jpg
Assembly Language

  • Specific to a CPU

  • 1 to 1 correspondence between assembly language instruction and binary (machine) language instruction

  • Mnemonics (short character sequence) represent instructions

  • Used when programmer needs precise control over hardware, e.g., device drivers

Chapter 6 Little Man Computer


Instruction set direct addressing l.jpg
Instruction Set –Direct Addressing

Chapter 6 Little Man Computer


Instruction set load direct l.jpg
Instruction Set –LOAD (Direct)

Chapter 6 Little Man Computer


Instruction set store direct l.jpg
Instruction Set –STORE (Direct)

Chapter 6 Little Man Computer


Instruction set add direct l.jpg
Instruction Set –ADD (Direct)

Chapter 6 Little Man Computer


Instruction set sub direct l.jpg
Instruction Set –SUB (Direct)

Chapter 6 Little Man Computer


Instruction set input l.jpg
Instruction Set –INPUT

Chapter 6 Little Man Computer


Instruction set output l.jpg
Instruction Set –OUTPUT

Chapter 6 Little Man Computer


Instruction set halt l.jpg
Instruction Set –HALT

Chapter 6 Little Man Computer


Instruction set skip l.jpg
Instruction Set –SKIP

Chapter 6 Little Man Computer


Instruction set jump direct l.jpg
Instruction Set –JUMP (Direct)

Chapter 6 Little Man Computer


What does this program do l.jpg
What does this program do?

  • 00 IN;

  • 01 STA 99;

  • 02 IN;

  • 03 ADD 99;

  • 04 OUT;

  • 05 HLT;

    Write the opcode.

Chapter 6 Little Man Computer


What does this program do20 l.jpg
What does this program do?

  • 00 IN;

  • 01 STA 99;

  • 02 IN;

  • 03 STA 98;

  • 04 ADD 99;

  • 05 STA 97;

  • 06 LDA 99;

  • 07 OUT;

  • 08 LDA 98;

  • 09 OUT;

  • 10 LDA 97;

  • 11 OUT;

  • 12 HLT;

Chapter 6 Little Man Computer


Write a program to l.jpg
Write a program to…

  • Enter two number. Find (and output) the sum of twice the first number plus the second number.

  • Enter two number. Compute the sum of twice the first number and three times the second number. Output the first number, then the second number, then the result.

Chapter 6 Little Man Computer


Indirect addressing l.jpg
INDIRECT ADDRESSING

Chapter 6 Little Man Computer


Instruction set load indirect l.jpg
Instruction Set –LOAD (Indirect)

Chapter 6 Little Man Computer


Instruction set store indirect l.jpg
Instruction Set –STORE (Indirect)

Chapter 6 Little Man Computer


Instruction set add indirect l.jpg
Instruction Set –ADD (Indirect)

Chapter 6 Little Man Computer


Instruction set sub indirect l.jpg
Instruction Set –SUB (Indirect)

Chapter 6 Little Man Computer


Instruction set jump indirect l.jpg
Instruction Set –JUMP (Indirect)

Chapter 6 Little Man Computer


Immediate addressing l.jpg
Immediate Addressing

Chapter 6 Little Man Computer


Instruction set load immediate l.jpg
Instruction Set –LOAD (Immediate)

Chapter 6 Little Man Computer


Instruction set add immediate l.jpg
Instruction Set –ADD (Immediate)

Chapter 6 Little Man Computer


Instruction set sub immediate l.jpg
Instruction Set –SUB (Immediate)

Chapter 6 Little Man Computer


Indirect immediate direct l.jpg
Indirect, Immediate, Direct

  • 00 IN;

  • 01 STA 99;

  • 02 ADD #05;

  • 03 STA *99;

  • 04 ADD *99;

  • 05 OUT;

  • 06 SUB *99;

  • 07 OUT;

  • 08 HLT;

Chapter 6 Little Man Computer


Indirect immediate direct33 l.jpg
Indirect, Immediate, Direct

  • 00 IN; Input a number > 10 to the calculator

  • 01 STA 99; Direct Addressing--Store data in calc to mailbox 99

  • 02 ADD #05; Add the number five to the calculator

  • 03 STA *99; Indirect addressing- Store contents of calculator

  • ; to the mailbox pointed to by the contents

  • ; of mailbox 99

  • 04 ADD *99; Indirect addressing; Add contents of mailbox pointed by 99 to contents of the calculator

  • 05 OUT;

  • 06 SUB *99; Indirect addressing-- Subtract contents of mailbox ;pointed to by the contents of mailbox 99

  • 07 OUT; Print out result in calculator to output basket

  • 08 HLT; End program

Chapter 6 Little Man Computer


Counting forward infinite l.jpg
Counting Forward INFINITE

  • 00 LDA 90;

  • 01 OUT;

  • 02 ADD #01;

  • 03 STA 90;

  • 04 JMP 01;

  • 05 HLT;

  • 90 DAT 00;

Chapter 6 Little Man Computer


Counting up to an enter num l.jpg
Counting up to an enter num

  • 00 IN;

  • 01 STA 99;

  • 02 LDA 90;

  • 03 OUT;

  • 04 ADD #01;

  • 05 STA 90;

  • 06 LDA 99;

  • 07 SUB #01;

  • 08 SKN;

  • 09 JMP 01;

  • 10 HLT;

  • 90 DAT 00;

Chapter 6 Little Man Computer


Lmc input output l.jpg
LMC Input/Output

IN

OUT

Chapter 6 Little Man Computer


Lmc internal data l.jpg
LMC Internal Data

LDA

STA

Chapter 6 Little Man Computer


Data storage location l.jpg
Data storage location

  • Physically identical to instruction mailbox

  • Not located in instruction sequence

  • Identified by DAT mnemonic

Chapter 6 Little Man Computer


Lmc arithmetic instructions l.jpg
LMC Arithmetic Instructions

ADD

SUB

Chapter 6 Little Man Computer


Instruction cycle l.jpg
Instruction Cycle

  • Fetch: Little Man finds out what instruction he is to execute

  • Execute: Little Man performs the work.

Chapter 6 Little Man Computer


Fetch portion of fetch and execute cycle l.jpg
Fetch Portion ofFetch and Execute Cycle

1. Little Man reads the address from the location counter

2. He walks over to the mailbox that corresponds to the location counter

Chapter 6 Little Man Computer


Fetch cont l.jpg
Fetch, cont.

3. And reads the number on the slip of paper (he puts the slip back in case he needs to read it again later)

Chapter 6 Little Man Computer


Execute portion l.jpg
Execute Portion

1.The Little Man goes to the mailbox address specified in the instruction he just fetched.

2.He reads the number in that mailbox (he remembers to replace it in case he needs it later).

Chapter 6 Little Man Computer


Execute cont l.jpg
Execute, cont.

3.He walks over to the calculator and punches the number in.

4.He walks over to the location counter and clicks it, which gets him ready to fetch the next instruction.

Chapter 6 Little Man Computer


Von neumann architecture 1945 l.jpg
von Neumann Architecture(1945)

  • Stored program concept

  • Memory is addressed linearly

  • Memory is addressed without regard to content

Chapter 6 Little Man Computer


ad