CHAPTER 6: The Little Man Computer

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

CHAPTER 6: The Little Man Computer
The “Little Man Computer” Version
SUPPLEMENTARY CHAPTER 2 Instruction Addressing Modes
2.3) Example of program execution 1. instruction  B25 8 Op-code B means to change the value of the program counter if the contents of the indicated register.
The Little man computer
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
LMC Little Moron Computer
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Overview The von Neumann Machine - the programmable digital computer Introducing the LC-3 Computer - A “toy” computer for us to learn from Computer machine.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
The Little Man Computer
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
An Interactive Web-Based Simulation of a General Computer Architecture
Introduction to a Simple Computer Nizamettin AYDIN
Machine level architecture Computer Architecture Basic units of a Simple Computer.
CSC 3210 Computer Organization and Programming Chapter 1 THE COMPUTER D.M. Rasanjalee Himali.
Chapter 4 The Von Neumann Model
CHAPTER 6: The Little Man Computer
School of Computer Science G51CSA 1 The Little Man Computer.
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
Little Man Computer When your program gets “translated to machine code” all 0’s & 1’s The translator must know the language of the program (java) as well.
Computer Architecture 2 nd year (computer and Information Sc.)
CHAPTER 6: The Little Man Computer
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
The Little-Man Computer Damian Gordon. The Little-Man Computer Most computer architectures conform to the so-called von Neuman Architecture. This means.
Dale & Lewis Chapter 5 Computing components
Computer Organization and Assembly Languages Yung-Yu Chuang 2005/09/29
Examples with 3-Digit Numbers
CHAPTER 6: The Little Man Computer
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
CMSC 104, Lecture 061 Stored Programs A look at how programs are executed.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
This is where you can reset and run your program. If your program has an “INP” (input) command, you will type it in this box here. Using the LMC These.
27 October 2015 Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
Program to multiply 2 numbers 500-Input x 291-Store acc. as x 500-Input y 292-Store acc. as y 193-Load y in to acc. (0 on 1 st parse) 391-Add x to acc.
The Postman in your PC Today you are going to learn how a computer’s CPU works to handle data. Teachcompsci.co.uk.
Little Man Computer Task 1 Last lesson you were asked to write a program to multiply two numbers together. The next slide has a working program to do this.
Instruction Memory value Description ADD1xx Add the value stored at memory address xx to the value in the accumulator register SUB2xx Subtract the value.
1. 2 TimeActivity 9:45Welcome and introductions 10:00What is a computer? 10:15What’s inside? 10:45Activity: A simple view of how computers work 11:15Coffee/tea.
1 What we want: execute High Level Language (HLL) programs What we have: computer hardware (a glorified calculator)
The Little man computer
CHAPTER 6: The Little Man Computer
Control Unit Lecture 6.
Chapter 4 The Von Neumann Model
Review of computer processing and the basic of Operating system
Architecture Review Instruction Set Architecture
Chapter 4 The Von Neumann Model
Chapter 4 The Von Neumann Model
Starter Read the Feedback Click on Add new Feedback Open Realsmart
BASIC COMPUTER ORGANIZATION AND DESIGN
Chapter 4 The Von Neumann Model
CHAPTER 6: The Little Man Computer
CHAPTER 6: The Little Man Computer
CSCE Fall 2013 Prof. Jennifer L. Welch.
Making Programming Friendlier
The Little Man Computer
Computer Architecture
Computer Architecture
Chapter 4 The Von Neumann Model
MARIE: An Introduction to a Simple Computer
CSCE Fall 2012 Prof. Jennifer L. Welch.
The Stored Program Computer
The Von Neumann Machine
Chapter 6 Programming the basic computer
A Level Computer Science Topic 5: Computer Architecture and Assembly
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Chapter 4 The Von Neumann Model
Little Man Computer.
Presentation transcript:

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

The Little Man Computer Chapter 6 Little Man Computer

Mailboxes: Address vs. Content Addresses are consecutive Content may be Data or Instructions Address Content Chapter 6 Little Man Computer

Content: Instructions Op code Operation code Arbitrary mnemonic Operand Object to be manipulated Data or Address of data Address Content Op code Operand Chapter 6 Little Man Computer

Magic! Load program into memory Put data into In Basket Chapter 6 Little Man Computer

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 Arithmetic 1xx ADD 2xx SUB Data Movement 3xx STORE 5xx LOAD Input/Output 901 INPUT 902 Output Machine Control (coffee break) 000 STOP COB Chapter 6 Little Man Computer

Input/Output Move data between calculator and in/out baskets Content Op Code Operand (address) IN (input) 9 01 OUT (output) 02 Chapter 6 Little Man Computer

LMC Input/Output IN OUT Chapter 6 Little Man Computer

Internal Data Movement Between mailbox and calculator Content Op Code Operand (address) STO (store) 3 xx LDA (load) 5 Chapter 6 Little Man Computer

LMC Internal Data LDA STO Chapter 6 Little Man Computer

Data storage location Physically identical to instruction mailbox Not located in instruction sequence Identified by DAT mnemonic Chapter 6 Little Man Computer

Arithmetic Instructions Read mailbox Perform operation in the calculator Content Op Code Operand (address) ADD 1 xx SUB 2 Chapter 6 Little Man Computer

LMC Arithmetic Instructions ADD SUB Chapter 6 Little Man Computer

Simple Program: Add 2 Numbers Assume data is stored in mailboxes with addresses >90 Write instructions Input a # Store the # Add Output the number Chapter 6 Little Man Computer

Program to Add 2 Numbers: Using Mnemonics Mailbox Mnemonic Instruction Description 00 IN ;input 1st Number 01 STO 99 ;store data 02 ;input 2nd Number 03 ADD 99 ;add 1st # to 2nd # 04 OUT ;output result 05 COB ;stop 99 DAT 00 ;data Chapter 6 Little Man Computer

Program to Add 2 Numbers Mailbox Code Instruction Description 00 901 ;input 1st Number 01 399 ;store data 02 ;input 2nd Number 03 199 ;add 1st # to 2nd # 04 902 ;output result 05 000 ;stop 99 ;data Chapter 6 Little Man Computer

Program Control Branching (executing an instruction out of sequence) Changes the address in the counter Halt Content Op Code Operand (address) BR (Jump) 6 xx BRZ (Branch on 0) 7 BRP (Branch on +) 8 COB (stop) (ignore) Chapter 6 Little Man Computer

Instruction Set Arithmetic 1xx ADD 2xx SUB Data Movement 3xx STORE 5xx LOAD BR 6xx JUMP BRZ 7xx BRANC ON 0 BRP 8xx BRANCH ON + Input/Output 901 INPUT 902 OUTPUT Machine Control (coffee break) 000 HALT COB Chapter 6 Little Man Computer

Find Positive Difference of 2 Numbers 00 IN 901 01 STO 10 310 02 03 STO 11 311 04 SUB 10 210 05 BRP 08 808 ;test 06 LDA 10 510 ;if negative, reverse order 07 SUB 11 211 08 OUT 902 ;print result and 09 COB 000 ;stop 10 DAT 00 ;used for data 11 Chapter 6 Little Man Computer

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 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. 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 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. 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) Stored program concept Memory is addressed linearly Memory is addressed without regard to content Chapter 6 Little Man Computer