Little Man Computer There’s a little man in the mailroom that follows each instruction to the letter but he can only follow one instruction at a time.

Slides:



Advertisements
Similar presentations
The CPU The Central Presentation Unit What is the CPU?
Advertisements

The Central Processing Unit (CPU) Understanding Computers.
The Little man computer
Computer Systems – Hardware
Components of Computer
The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
Lecture 3&4 Components of the computer. Computer components.
Computer Applications NCBS Stage 1. The Central Processing UnitSlide 2Computer Applications Stage 1 Course Content and Assessment Practical – 60% (2 Hrs.
CPU Describe the purpose of the CPU
Computer Hardware Computer Technology Jeopardy Review By C. Lyman © July 2007.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Lesson 3 — How a Computer Processes Data
Chapter 3 Computer Hard ware
Topics Introduction Hardware and Software How Computers Store Data
Week 2.  Understand what the processor is and what it does.  Execute basic LMC programs.  Understand how CPU characteristics affect performance.
Lesson 3 — How a Computer Processes Data Unit 1 — Computer Basics.
The Central Processing Unit (CPU) and the Machine Cycle.
Intro to Computers Computer Applications. What is a Computer? Initially the term computer referred to an individual whose job it was to perform mathematical.
SKILL AREA: 1.2 MAIN ELEMENTS OF A PERSONAL COMPUTER.
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 ORGANISATION I HIGHER STILL Computing Computer Systems Higher Marr College Computing Department 2002.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Structure & Architecture 7b - CPU & Buses.
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
1 Central Processing Unit (CPU) Consists of complex set of electronic circuitry Executes stored program instructions Three components –Registers –Control.
Central Processing Unit Part I Bayram Güzer. Central Processing Unit Central processing unit is a control center that converts data input to information.
COMPUTER BASICS Vocab and Terminology. What do all of these terms have in common? DesktopServer Workstation Handheld Laptop/Notebook Supercomputer Mainframe.
Basic Computer Organization Rashedul Hasan.. Five basic operation No matter what shape, size, cost and speed of computer we are talking about, all computer.
Computer operation is of how the different parts of a computer system work together to perform a task.
HOW COMPUTERS WORK THE CPU & MEMORY. THE PARTS OF A COMPUTER.
PARTS OF A COMPUTER 2 Hardware Computer Hardware is any of the physical parts of the computer you can touch. There are 4 categories: 1. Input Devices.
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.
BY MANJU Lesson 21 Computer Hardware. System Components A computer system requires many components to do its job: Input: Device to input data so it can.
IC 3 BASICS, Internet and Computing Core Certification Computing Fundamentals Lesson 2 How Does a Computer Process Data?
 Input - A device, such as a keyboard, used to enter information into a computer  Output - Electronic or electromechanical equipment connected to.
Instruction Memory value Description ADD1xx Add the value stored at memory address xx to the value in the accumulator register SUB2xx Subtract the value.
INTRODUCTION TO COMPUTERS. A computer system is an electronic device used to input data, process data, store data for later use and produce output in.
Part 3 Ms. T. N. Jones1. Vocabulary 1. A design for health, safety, and comfort 2. A tool used to put data into a computer, such as a keyboard, mouse,
The Processor The Main Components Arithmetic/Logic Unit (ALU) Control Unit System Clock Registers.
Information Technology (IT). Information Technology – technology used to create, store, exchange, and use information in its various forms (business data,
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Chapter 1: Introduction to Computers and Programming
Computer Hardware What is a CPU.
Hardware & Software Lesson 1 Computer Systems & Components
GCSE OCR Computing A451 The CPU Computing hardware 1.
The Little man computer
The CPU, RISC and CISC Component 1.
The Central Processing Unit (CPU)
Topics Introduction Hardware and Software How Computers Store Data
Basic Computer for Small Business
Basic Computer for Small Business
Course Name: Computer Application Topic: Central Processing Unit (CPU)
Starter Read the Feedback Click on Add new Feedback Open Realsmart
Types of Computers & Computer Hardware
Introduction to Computing Lecture # 1
Chapter 1: Introduction to Computers and Programming
Basic Computer Organization
Topics Introduction Hardware and Software How Computers Store Data
Processing Computer Components.
Computer Architecture
Logical Computer System
A451: Computer Systems and Programming
Introduction to Computer Systems
Little Man Computer (continued).
Basic Computer Organization
WJEC GCSE Computer Science
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Computer Science. The CPU The CPU is made up of 3 main parts : Cache ALU Control Unit.
Little Man Computer.
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Little Man Computer There’s a little man in the mailroom that follows each instruction to the letter but he can only follow one instruction at a time.

What is a Computer? a programmable electronic device designed to accept data, perform p rescribed mathematical and logical operations at high speed, and display the results of these operations Mainframes, desktop and laptop computers, tablets, and smartphones are some of the different types of computers

Computer Components CPU (Central Processing Unit) – the brains of the computer, where instructions are executed RAM (Random Access Memory) – memory that can be accessed quickly, stores running programs, but loses contents if you turn off the power Disk – memory that is slow to access, stores files, folders and settings, does not lose contents if power is lost Motherboard – connects all the components together

CPU The CPU executes instructions The instructions are written in binary (ones and zeroes), and they are very simple Load information from memory or disk Store information to memory or disk Add two pieces of information together Subtract two pieces of information More complex instructions are just combining these instructions together For example, multiplication is just repeated addition Division is just repeated subtraction

Fetch => Decode => Execute Execution Cycle Fetch => Decode => Execute

Little Man Computer The Little Man Computer (LMC) is designed to show how a computer thinks at a very basic level Programming the LMC is almost like programming a real computer in what is called “assembly” (readable version of the ones and zeroes) LMC demonstrates that computers are only capable of executing basic instructions They appear intelligent because they can execute those instructions much, much faster than we can

Assembly Let’s say that we want to tell the computer to add two numbers We need to give the computer the command in a format that it understands (ones and zeros) We write the command in text: ADD 1, 3 (also known as assembly) We then use a tool to convert this text command into its number equivalent: 913 (also known as an assembler) This number can then be converted into ones and zeroes which the processor can execute

Executing One Command Fetch an instruction from memory Decode the instruction (determine what the instruction is) Execute the instruction Fetch data Execute instruction Return result

Components and Behavior Little Man Computer Components and Behavior

Instruction Location Counter 00-04 05-09 10-14 15-19 20-24 25-29 30-34 35-39 40-44 45-49 50-54 55-59 60-64 65-69 70-74 75-79 80-84 85-89 90-94 95-99 Instruction Location Counter Input Output Calc

Components The man is the “processor”. He executes the instructions The mailboxes are RAM (the LMC does not have a disk). Each mailbox holds either data (information we want to store) or instructions The instruction counter tells us which mailbox we need to execute The input tray is where we get information from the user The output tray is where we put information for the user Calc is a temporary location we can put information to be used later

Instructions Instructions are three digit numbers The first digit is the command The second two numbers are general the mailbox to execute the command on For example, 1XX means take the value in the XX mailbox and add it to whatever is in the temporary location, calc

All Instructions 1XX – add the value in mailbox XX to calc 2XX – subtract the value in mailbox xx from calc 3XX – put the value of calc into mailbox XX 5XX – take the value of mailbox XX and put it into calc 6XX – set the instruction counter to XX 7XX – set the instruction counter to XX if calc is 0, otherwise nap 8XX – set the instruction counter to XX if calc is positive, otherwise nap 901 – grab the top item from input and put it in calc 902 – put calc into output 000 – stop and go home

Example – Add 2 Numbers Get a number from input into calc Copy that number to an unused mailbox (mailbox 20) Get another number from input into calc Add the number we put into a mailbox 20 to calc Copy calc to the output Halt

Example – Add 2 Numbers INPUT STORE 20 ADD 20 OUTPUT HALT 901 320 120 902 000

Example – Read / Write Two Numbers Get a number from input into calc Copy the number to an unused mailbox (mailbox 20) Copy the number to an unused mailbox (mailbox 21) Copy the value from mailbox 20 to calc Copy the value in calc to output Copy the value from mailbox 21 to calc

Your Turn – Swap Two Numbers Get a number from input into calc ???

Your Turn – First Three Multiples Get a number from input into calc ???

Your Turn – First Three Multiples 1 901 INPUT 320 STORE 20 120 ADD 20 902 OUTPUT 120 ADD 20 902 OUTPUT 120 ADD 20 902 OUTPUT 000 HALT 2 901 INPUT 320 STORE 20 902 OUTPUT 120 ADD 20 902 OUTPUT 120 ADD 20 902 OUTPUT 000 HALT 3 901 INPUT 320 STORE 20 902 OUTPUT 520 LOAD 20 120 ADD 20 320 STORE 20 902 OUTPUT 520 LOAD 20 120 ADD 20 320 STORE 20 902 OUTPUT 000 HALT 4 901 INPUT 902 OUTPUT 102 ADD 2 902 OUTPUT 102 ADD 2 902 OUTPUT 000 HALT 5 ? Think-Pair-Share: 1. Give students time to think. 2. Have students vote. 3. Have students discuss if < 80% right (“You have 1 minute: 59, 58, 57”). 4. Have students re-vote. Programs: 1: Starts at the second multiple 2: Correct 3: Doubles each time 4: Outputs the number, then the number + 102, then the number + 204.