GCSE Computing#BristolMet Session Objectives#11 MUST identify what program instructions consist of SHOULD describe how instructions are coded as bit patterns.

Slides:



Advertisements
Similar presentations
Microprocessors Typical microprocessor controlled devices: Camera, mobile phone, stereo, mp3 player, electronic toys… High-level microprocessor controlled.
Advertisements

9-6 The Control Word Fig The selection variables for the datapath control the microoperations executed within datapath for any given clock pulse.
 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
1 COMS 361 Computer Organization Title: Instructions Date: 9/28/2004 Lecture Number: 10.
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 CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
19-1 Programming… The Pencil and Paper Computer The Pencil & Paper Instruction Set: (table on p148) The Operand specifies a memory location.
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
Basic Computer Organization, CPU L1 Prof. Sin-Min Lee Department of Computer Science.
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
1 Sec (2.3) Program Execution. 2 In the CPU we have CU and ALU, in CU there are two special purpose registers: 1. Instruction Register 2. Program Counter.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
A-Level Computing#BristolMet Session Objectives#5 MUST identify different buses and registers used in a CPU SHOULD describe the use of buses to send information.
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
The CPU The Central Presentation Unit Main Memory and Addresses Address bus and Address Space Data Bus Control Bus The Instructions set Mnemonics Opcodes.
Explain giving examples as appropriate, the essential features of an instruction set of a CPU. Each instruction must contain 4 basic components: Operation.
A Level Computing#BristolMet Session Objectives U2#S9 MUST identify operators and operands SHOULD describe different types of operator COULD Create an.
What have mr aldred’s dirty clothes got to do with the cpu
Computer Architecture and the Fetch-Execute Cycle
Week 2.  Understand what the processor is and what it does.  Execute basic LMC programs.  Understand how CPU characteristics affect performance.
Chapter 4 MARIE: An Introduction to a Simple Computer.
CPU Design. Introduction – The CPU must perform three main tasks: Communication with memory – Fetching Instructions – Fetching and storing data Interpretation.
The Central Processing Unit (CPU) and the Machine Cycle.
Lecture 14 Today’s topics MARIE Architecture Registers Buses
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 Science 101 Computer Systems Organization ALU, Control Unit, Instruction Set.
What Do I Represent?. Translators – Module Knowledge Areas Revisiting object code When we disassemble code we can view the opcodes used This is just a.
CMSC 150 PROGRAM EXECUTION CS 150: Wed 1 Feb 2012.
Chapter 7 Low-Level Programming Languages (slides modified by Erin Chambers)
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
1.4 Representation of data in computer systems Instructions.
An Example Architecture. A Paper Computer - Woody Woody's characteristics Word size – 8 bits One word.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Computer Systems – Machine & Assembly code. Objectives Machine Code Assembly Language Op-code Operand Instruction Set.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
GROUP 2 CHAPTER 16 CONTROL UNIT Group Members ๏ Evelio L. Hernandez ๏ Ashwin Soerdien ๏ Andrew Keiper ๏ Hermes Andino.
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.
Central Processing Unit Decode Cycle. Central Processing Unit Current Instruction Register (CIR) I1 The fetch cycle has transferred an instruction from.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Representation of Data Binary Representation of Instructions teachwithict.weebly.com.
Representation of Data - Instructions Start of the lesson: Open this PowerPoint from the A451 page – Representation of Data/ Instructions How confident.
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.
First Foray into Programming (the hard way). A reminder from last lesson: A machine code instruction has two parts:  Op-code  Operand An instruction.
A computer consists of five functionally independent main parts.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
A Level Computing – A2 Component 2 1f, 1g, 1h, 1i, 1j.
Control Unit Lecture 6.
A Closer Look at Instruction Set Architectures
Computer Architecture
Do it now You will find your do it now task in your workbook – look for the start button! Thursday, 20 September 2018.
Data Representation – Instructions
The fetch-execute cycle
CS149D Elements of Computer Science
Computer Organization and ASSEMBLY LANGUAGE
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
MARIE: An Introduction to a Simple Computer
MARIE: An Introduction to a Simple Computer
8-6 The Control Word The selection variables for the datapath control the microoperations executed within datapath for any given clock pulse Fig
Program Execution.
Information Representation: Machine Instructions
Instruction execution and ALU
CS 111 – Sept. 16 Machine language examples Instruction execution
Algoritmos y Programacion
Sec (2.3) Program Execution.
Little Man Computer.
Presentation transcript:

GCSE Computing#BristolMet Session Objectives#11 MUST identify what program instructions consist of SHOULD describe how instructions are coded as bit patterns COULD explain how the computer distinguishes between data and memory addresses Write a simple program using machine code

GCSE Computing#BristolMet Representation of Program Instructions During the fetch phase of the processing cycle, the CPU fetches the first instruction from the start memory address location. The CPU will then decode the instruction to find out what it needs to do next. In the meantime it has already updated a register, the program counter, to point to the next memory location so that it can fetch the next instruction. A program instruction, for example “print” [character A] has 2 parts, the instruction “print” which is called the operator, and the data part, the operand, in this case [A]. The operand may be specific data or it may be a reference to another memory address location, to save to or retrieve previously stored data from. A typical instruction may be to add the data in a memory location to data in another register, the accumulator

GCSE Computing#BristolMet KEY TERMS Register – Special fast access part of the CPU that stores data in use by the CPU. Program Counter – A register in the CPU that keeps the address of the next instruction. Accumulator – A register in the CPU that stores data currently being used by the CPU. Operator – The part of the instruction which tells the computer what to do. Operand – The part of the instruction that tells the CPU what to apply the operation to (either specific data or a memory address). What does the Program counter do when it receives a new instruction? Can you think of examples of operations which occur in the accumulator

GCSE Computing#BristolMet Representation of Program Instructions The diagram below is of a 10 bit instruction. The first three bits represent the op-code and the final six bits represent the operand. The middle bit (the number bit) distinguishes between operands that are memory addresses and operands that are numbers. When the bit is set to '1', the operand represents a number. 0 would mean???

GCSE Computing#BristolMet Machine Code and Assembly Language Notice that all the op-codes are given an English mnemonic to simplify programming. Together these mnemonics are called an assembly language. Programs written in assembly language must be converted to their binary representation before the CPU can understand them. This is usually done by another program called an assembler, hence the name. View the program simulations

GCSE Computing#BristolMet Writing Machine code from LMC assembly language TASK: Using the code library from the LMC simulator attempt to write binary machine code for the following simple programs. NB The Operator will only need the first 3 bits Input number 5 Add number 3 Store Result in 10 COD E MEANING 1abLoad 2abStore 3abAdd 4abSubtract 500Input 600Output 700Stop 800Skip If Negative 801Skip If Zero 802If Skip Positive 9ABJump