The CPU The Central Presentation Unit Language Levels Fetch execute cycle Processor speed.

Slides:



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

Computer Memory and Data Transfer
Stored Program Architecture
Dr. Ken Hoganson, © August 2014 Programming in R COURSE NOTES 2 Hoganson Language Translation.
 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
DH2T 34 Computer Architecture 1 LO2 Lesson Two CPU and Buses.
1 A Balanced Introduction to Computer Science, 2/E David Reed, Creighton University ©2008 Pearson Prentice Hall ISBN Chapter 14 Inside.
Computer Systems. Computer System Components Computer Networks.
The Analytical Engine Module 6 Program Translation.
Introduction to Computer Systems
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Stored Program Concept: The Hardware View
Inside The CPU. Buses There are 3 Types of Buses There are 3 Types of Buses Address bus Address bus –between CPU and Main Memory –Carries address of where.
The Computer Processor
Lecture 13 - Introduction to the Central Processing Unit (CPU)
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Chapter 1 An Overview of Computers and Programming Languages.
C.S. Choy95 COMPUTER ORGANIZATION Logic Design Skill to design digital components JAVA Language Skill to program a computer Computer Organization Skill.
Basic Microcomputer Design. Inside the CPU Registers – storage locations Control Unit (CU) – coordinates the sequencing of steps involved in executing.
Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
The CPU The Central Presentation Unit Main Memory and Addresses Address bus and Address Space Data Bus Control Bus The Instructions set Mnemonics Opcodes.
D75P 34R HNC Computer Architecture 1 Week 9 The Processor, Busses and Peripherals © C Nyssen/Aberdeen College 2003 All images © C Nyssen /Aberdeen College.
Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.
Information Representation: Machine Instructions
Introduction to Computer Architecture and System
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
Computer system overview1 The Effects of Computers Pervasive in all professions How have computers affected my life? How have computers affected my life?
Revision Language generations Two’s and One’s Complement and Sign and Magnitude.
Computer Systems Organization CS 1428 Foundations of Computer Science.
The CPU Central Processing Unit. 2 Reminder - how it fits together processor (CPU) memory I/O devices bus.
Von Neumann Machine Objectives: Explain Von Neumann architecture:  Memory –Organization –Decoding memory addresses, MAR & MDR  ALU and Control Unit –Executing.
The Central Processing Unit (CPU) and the Machine Cycle.
CHAPTER 4 The Central Processing Unit. Chapter Overview Microprocessors Replacing and Upgrading a CPU.
PHY 201 (Blum)1 Microcode Source: Digital Computer Electronics (Malvino and Brown)
Computer Architecture Memory, Math and Logic. Basic Building Blocks Seen: – Memory – Logic & Math.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
Assessment Covering… Von Neuman architecture Registers – purpose and use, the fetch execute cycle.
Dale & Lewis Chapter 5 Computing components
System Hardware FPU – Floating Point Unit –Handles floating point and extended integer calculations 8284/82C284 Clock Generator (clock) –Synchronizes the.
Session 4 Teaching Computing to GCSE Level with Python.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
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.
The Processor & its components. The CPU The brain. Performs all major calculations. Controls and manages the operations of other components of the computer.
Chapter 1 An Overview of Computers and Programming Languages.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Copyright © 2005 – Curt Hill MicroProgramming Programming at a different level.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)
THE CPU i Bytes 1.1.
CENTRAL PROCESSING UNIT CPU (microprocessor)
Computer Architecture
Teaching Computing to GCSE
The Processor and Machine Language
CSCE Fall 2013 Prof. Jennifer L. Welch.
CSCE 121: Simple Computer Model Spring 2015
CPU Key Revision Points.
CSCE Fall 2012 Prof. Jennifer L. Welch.
GCSE OCR 1 The CPU Computer Science J276 Unit 1
A Level Computer Science Topic 5: Computer Architecture and Assembly
Microprocessor Architecture
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Computer Architecture Assembly Language
Computer Science. The CPU The CPU is made up of 3 main parts : Cache ALU Control Unit.
Presentation transcript:

The CPU The Central Presentation Unit Language Levels Fetch execute cycle Processor speed

Language Generations: Evolution of Programming Languages

First Generation The first generation of languages was very difficult to understand and also to code This language was based on machine code language, hence the programmer would need to use binary to create a program For this particular generation, punched tape was used, where a hole would represent a 1 and no-hole meant a 0.

1 st Generation traits 1. This generation was very fast as the computer would not need to translate the language but would understand it right away 2. It allows limited calculations such as simple arithmetic, logical operators, incrimination or decrementation and shift operations only 3. It cannot be run on another machine, unless it is identical

Second Generation / Assembly Language The second generation language, was also based on machine code, This language was much easier as it used mnemonics (opcodes and operands) Programming was much easier because the programmer does not have to remember a list of binary digits Since this code is not in machine code an assembler is used to convert the code to binary

Examples of Opcodes Machine CodeAssemblyDescription 0000ENDStops the program 0001ADDAdds contents of memory location to accumulator 0010SUBSubtracts contents of memory location from accumulator 0011MULTMultiplies contents of memory location to accumulator 0100DIVDivides contents of memory location into accumulator 0101LDACopy contents of memory locations into the accumulator 0110STOCopy contents of the accumulator into the memory location 0111INInput from Input Unit to memory location 1000OUTOutput contents of memory location to Output Unit 1001JMPTransfer Control to Instruction in Named Location 1010JNZJump if contents of Accumulator is not Zero

Third Generation / High-level Language The third generation of languages was a very big improvement from the second generation This generation incorporated the use of English-like statements Since this language is coded in English-like statements a compiler or an interpreter is needed to translate the language to binary

Compiler Vs. Interpreter The Compiler Translates 3 rd Generation languages The code is translated all at once Errors shown at the end of the translation Fast translation The Interpreter Translates 3 rd Generation languages The code is translated line by line Errors are shown after each line is translated Much slower translation

Examples of the 3 rd Generations FORTRAN - mathematics formulas, scientific problems, engineering problems COBOL – business oriented BASIC – very easy to understand, ideal to learn programming PASCAL – mostly used for teaching purposes C – used to write operating systems, database management system, scientific applications LISP – artificial intelligence LOGO – teach children problem-solving and programming skills C ++ - An improved C, very popular and powerful JAVA – Very popular and powerful, also cross-platform

Fourth Generation The fourth generation language is much closer to the human language and is very fast to code A typical example of the ease of use of 4th generation languages is the creation of a GUI. To create a GUI in JAVA would be quite difficult because of the code required for each component, with 4GL creating it would be simply drag and drop

Fifth Generation Lastly we have the fifth generation languages, which are the closest to the human language This generation is used in artificial intelligence

The Fetch Execute Cycle The Fetch Execute Cycle Actions that a (CPU) performs to execute instruction

What is the Fetch Execute Cycle? The Fetch execute cycle is also sometimes know as the Fetch-decode- execute cycle This cycle explains what goes on within the CPU when an instruction is being processed

Abbreviations CU = Control Unit PC = Program Counter IR = Instruction Register ALU = Arithmetic Logic Unit ACC = Accumilator

The Fetch Execute Cycle 1. The CPU sends the value of the PC on the address bus. 2. The CPU fetches the instruction from main memory along the data bus into the IR 3. The data in the IR is decoded by the CU 4. The decoded information is sent to the relevant function units of the CPU (such as reading values from registers, passing them to the ALU, writing them to a certain register) 5. If there is another instruction the PC is incremented by 1and the cycle is repeated. If not the instruction set ends

Start PC = Address of 1 st Instruction Fetch Instruction from location found at PC Store a copy of fetched Instruction into IR PC = PC + 1 Execute Instruction End of Program? End No Yes Note: When executing the instruction the following takes place:  Get data required from main memory  Place it in Data Registers  Activate correct circuits to work out instruction  Transfer results back to main memory. Abbreviation: PC – Program Counter

Assembly Code(Using the FEC) This allows the user to input 2 numbers and display their total OpcodeOperandDescription IN100Get input from keyboard and store it in location 100 IN101Get input from keyboard and store it in location 101 LDA100Copy contents of location 100 to the accumulator ADD101 Add the number found in location 101 to the accumulator STO102Copy the number in the accumulator to location 102 OUT102Display the contents of 102 to an output device

STEPPCIRACC OUT 11 21IN IN LDA LDA ADD ADD STO STO STO OUT

Processor Speed The clock rate measures the number of instructions done by the CPU per second, this is measured in hertz. When comparing the speeds of entire computers you need to look at ◦ the clock rate of the RAM, ◦ the width in bits of the CPU's buses ◦ the amount of cache

Clock Speed History The original IBM PC,(1981),had a clock rate of 4.77 MHz (4,770,000 cycles/second) In 1995, Intel's Pentium chip ran at 100 MHz (100 million cycles/second) In 2002, an Intel Pentium 4 model has a clock rate of 3 GHz (three billion cycles/second)