CS101 Introduction to Computing Lecture 5 Central Processing Unit

Slides:



Advertisements
Similar presentations
Chapter 4 The Central Processing Unit
Advertisements

Goals for Today Today we want to learn about the microprocessor, the key component, the brain, of a computer We’ll learn about the function of a microprocessor.
CS101 Introduction to Computing Lecture 7 Microprocessors.
The Central Processing Unit: What Goes on Inside the Computer.
CENTRAL PROCESSING UNIT
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
3.1Introduction to CPU Central processing unit etched on silicon chip called microprocessor Contain tens of millions of tiny transistors Key components:
Chapter 4  Converts data into information  Control center  Set of electronic circuitry that executes stored program instructions  Two parts ◦ Control.
CPU, CONTROL UNIT, ALU BY: GROUP 10 (MT - 2A) Grado, Crystell Joy
Technology in Action Alan Evans Kendall Martin Mary Anne Poatsy Eleventh Edition Copyright © 2015 Pearson Education, Inc.
BLOCK DIAGRAM OF COMPUTER
History – 2.
Writer:-Rashedul Hasan Editor:- Jasim Uddin
1 More on Computer Components Computer switches Binary number system Inside the CPU Cache memory Types of RAM Computer buses Creating faster CPUs NEXT.
E0001 Computers in Engineering1 The System Unit & Memory.
3 1 3 C H A P T E R Hardware: Input, Processing, and Output Devices.
Practical PC, 7th Edition Chapter 17: Looking Under the Hood
Technology in Focus: Under the Hood
Microcontrollers Microcontroller (MCU) – An integrated electronic computing device that includes three major components on a single chip Microprocessor.
Technology in Action Alan Evans Kendall Martin Mary Anne Poatsy Ninth Edition Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall.
Module 5 Central Processing Unit 1. Binary representation of data 2. The components of the CPU 3. CPU and Instruction set 4. Important features of CPUs.
Copyright © 2003 by Prentice Hall Module 5 Central Processing Unit 1. Binary representation of data 2. The components of the CPU 3. CPU and Instruction.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
The Central Processing Unit: What Goes on Inside the Computer
1Copyright © Prentice Hall 2000 The Central Processing Unit Chapter 3 What Goes on Inside the Computer.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2013.
CS101 Introduction to Computing Lecture 5 Central Processing Unit.
CHAPTER 4 The Central Processing Unit. Chapter Overview Microprocessors Replacing and Upgrading a CPU.
SKILL AREA: 1.2 MAIN ELEMENTS OF A PERSONAL COMPUTER.
CSCI-100 Introduction to Computing Hardware Part I.
Introduction to Microprocessors
Stored Programs In today’s lesson, we will look at: what we mean by a stored program computer how computers store and run programs what we mean by the.
Confidentiality/date line: 13pt Arial Regular, white Maximum length: 1 line Information separated by vertical strokes, with two spaces on either side Disclaimer.
Basic Computer Organization Rashedul Hasan.. Five basic operation No matter what shape, size, cost and speed of computer we are talking about, all computer.
The Computer System.
Succeeding with Technology Chapter 2 Hardware Designed to Meet the Need The Digital Revolution Integrated Circuits and Processing Storage Input, Output,
Chapter 2 Turning Data into Something You Can Use
The Processor & its components. The CPU The brain. Performs all major calculations. Controls and manages the operations of other components of the computer.
CS 1410 Intro to Computer Tecnology Computer Hardware1.
Information Technology INT1001 Lecture 2 1. Computers Are Your Future Tenth Edition Chapter 6: Inside the System Unit Copyright © 2009 Pearson Education,
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
History a bit. The 1 st uP: Intel 4004 Introduced Nov., 1971 by Intel 2250 transistors 108 kHz, 60,000 ops/sec 16 pins DIP (Dual in-line package) 10-micron.
TECHNOLOGY IN ACTION. Technology in Focus Under the Hood.
Chapter 2 content Basic organization of computer What is motherboard
Computer Hardware What is a CPU.
GCSE Computing - The CPU
Microprocessor – Intro!
History – 2 Intel 8086.
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
The Central Processing Unit
Lecture-1 Introduction
Introduction to Microprocessors
Components of Computer
INTRODUCTION TO MICROPROCESSORS
Week 3 The Components of the System Unit
CENTRAL PROCESSING UNIT CPU (microprocessor)
CPU Processing, Cache Memory, Busses, & RAM
Edited by : Noor Alhareqi
Edited by : Noor Alhareqi
BIC 10503: COMPUTER ARCHITECTURE
3.1 Introduction to CPU Central processing unit etched on silicon chip called microprocessor Contain tens of millions of tiny transistors Key components:
Chapter 2: Computer Hardware
Computers: Tools for an Information Age
Introduction to Computer Architecture
GCSE Computing - The CPU
Microprocessor Architecture
Computers: Tools for an Information Age
Goals for Today Today we want to learn about the microprocessor, the key component, the brain, of a computer We’ll learn about the function of a microprocessor.
Computer Science. The CPU The CPU is made up of 3 main parts : Cache ALU Control Unit.
Presentation transcript:

CS101 Introduction to Computing Lecture 5 Central Processing Unit

Goals for Today Today we want to learn about the central processing unit, the key component, the brain, of a computer We’ll learn about the function of a central processing unit And its various sub-systems Bus interface unit Data & instruction cache memory Instruction decoder Arithmetic-Logic unit Floating-point unit Control unit

Central Processing Unit (CPU) Control center in computer Converts data input to information output CPU utilizes primary and secondary data storage

Components of CPU Control Unit Arithmetic/Logic Unit (ALU)

Central Processing Unit Secondary Storage Central Processing Unit Output Input Control Unit Arithmetic/ Logic Unit Memory

Control Unit The brain of the CPU Manages the whole CPU Tasks include fetching instructions & data, storing data, managing input/output devices

Control Unit Does not execute program instructions, but directs other parts of the computer system to do so Contains circuitry that uses electrical signals to control

Arithmetic/Logic Unit Contains electronic circuitry that executes all arithmetic and logical operations Arithmetic operations Addition Subtraction Multiplication division

Arithmetic/Logic Unit Logical operations Comparisons Equal to Less than Greater than Less than or equal to Greater than or equal to Less than or greater than

Arithmetic & Logic Unit (ALU) Also known as the “Integer Unit” It performs whole-number math calculations (subtract, multiply, divide, etc) comparisons (is greater than, is smaller than, etc.) and logical operations (NOT, OR, AND, etc) The new breed of popular uPs have not one but two or four almost identical ALU’s that can do calculations simultaneously, doubling the capability

Registers Temporary storage areas for instructions or data Small amount of super-fast private memory placed right next to the ALU & FPU for their exclusive use Work under direction of control unit to accept, hold, transfer instructions of data and perform arithmetic or logical comparisons at high speed

Registers The ALU & FPU store intermediate and final results from their calculations in these registers Processed data goes back to the data cache and then to main memory from these registers

Registers Just like a cash register used by store owner Registers - immediate Memory – near future Hard Drive – late future

How CPU Executes Program Instructions Instruction execution time PC: one-millionth of a second Supercomputer: one-trillionth of a second Data and program instructions first placed in Memory Then placed in Registers

How CPU Executes Program Instructions 4 steps Fetches Decodes Executes Stores

How CPU Executes Program Instructions I-time: Instruction time (1+2) E-time: Execution time (3+4)

Central Processing Unit Secondary Storage Central Processing Unit Output Input Control Unit Arithmetic/ Logic Unit 1. Fetch 3. Execute 2. Decode 2. Store Memory

Machine Cycle Combination of I-time and E-time

Clock CPU has internal clock Produces pulses at fixed rates to synchronize all computer operations Single machine-cycle instruction may consist of number of sub-instructions each of which must take at least one clock cycle

kHz, MHz, GHz (Clock Frequency) 4004 worked at a clock frequency of 108kHz The latest processors have clock freqs. in GHz Out of 2 uPs having similar designs, one with higher clock frequency will be more powerful Same is not true for 2 uPs of dissimilar designs. Example: Out of PowerPC & Pentium 4 uPs working at the same freq, the former performs better due to superior design. Same for the Athlon uP when compared with a Pentium

Instruction Set The set of machine instructions that a CPU recognizes and can execute – the only language CPU knows An instruction set includes low-level, a single step-at-a-time instructions, such as add, subtract, multiply, and divide Each CPU family has its unique instruction set Bigger instruction-sets mean more complex chips (higher costs, reduced efficiency), but shorter programs

How Control Unit Finds Instructions and Data Instructions and data located in memory Location for each piece of instruction and data has address, which an address number Address numbers remain same but contents (instructions and data) can change

How Control Unit Finds Instructions and Data Programmers do not need to memorize actual address numbers, but use a symbolic address which is a name

Microprocessor Chip is a tiny piece of silicon CPU on a chip is called microprocessor

A microprocessor system? uPs are powerful pieces of hardware, but not much useful on their own Just as the human brain needs hands, feet, eyes, ears, mouth to be useful; so does the uP A uP system is uP plus all the components it requires to do a certain task A microcomputer is 1 example of a uP system

Microprocessor The key element of all computers, providing the mathematical and decision making ability Current state-of-the-art uPs (Pentium, Itanium, Athlon, Opteron, SPARC, PowerPC) contain complex circuits consisting of tens of millions of transistors They operate at ultra-fast speeds – doing over a billion operations very second Made up from a semiconductor, Silicon

Integrated Circuits Commonly known as an IC or a chip A tiny piece of Silicon that has several electronic parts on it Most of the size of an IC comes form the pins and packaging; the actual Silicon occupies a very small piece of the volume The smallest components on an IC are much smaller than the thickness of a human hair

Those components are … Devices And are made of the following materials Transistors Diodes Resistors Capacitors Wires And are made of the following materials Silicon - semiconductor Copper - conductor Silicon Dioxide - insulator

The Main Memory Bottleneck Modern super-fast uPs can process huge amounts of data in a short duration They require quick access to data to maximize their performance If they don’t receive the data that they require, they literally stop and wait – this results in reduced performance and wasted power Current uPs can process an instruction in about a ns. Time required for fetching data from main memory (RAM) is of the order of 100 ns

Solution to the Bottleneck Problem Make the main memory faster Problem with that approach: The 1-ns memory is extremely expensive as compared the currently popular 100-ns memory Another solution: In addition to the relatively slow main memory, put a small amount of ultra-fast RAM right next to the uP on the same chip and make sure that frequently used data and instructions resides in that ultra-fast memory Advantage: Much better overall performance due to fast access to frequently-used data and instructions

On-Chip Cache Memory (1) That small amount of memory located on the same chip as the uP is called On-Chip Cache Memory The uP stores a copy of frequently used data and instructions in its cache memory When the uP desires to look at a piece of data, it checks in the cache first. If it is not there, only then the uP asks for the same from the main memory

On-Chip Cache Memory (2) The small size and proximity to the uP makes access times short, resulting in a boost in performance (it is easy to find things in a small box placed next to you) uPs predict what data will be required for future calculations and pre-fetches that data and places it in the cache so that it is available immediately when the need arises The speed-advantage of cache memory is greatly dependent on the algorithm used for deciding about what to put in cache or not

uP Building Blocks

Microprocessor RAM I/O Data Cache Control Arithmetic Unit & Logic Unit Memory Bus Control Unit Arithmetic & Logic Unit RAM Bus Interface Unit I/O Instruction Decoder Registers System Bus Floating Point Unit Instruction Cache Registers

Bus Interface Unit Receives instructions & data from main memory Instructions are then sent to the instruction cache, data to the data cache Also receives the processed data and sends it to the main memory

Instruction Decoder This unit receives the programming instructions and decodes them into a form that is understandable by the processing units, i.e. the ALU or FPU Then, it passes on the decoded instruction to the ALU or FPU

Floating-Point Unit (FPU) Also known as the “Numeric Unit” It performs calculations that involve numbers represented in the scientific notation (also known as floating-point numbers). This notation can represent extremely small and extremely large numbers in a compact form Floating-point calculations are required for doing graphics, engineering and scientific work The ALU can do these calculations as well, but will do them very slowly

Microprocessor RAM I/O Data Cache Control Arithmetic Unit & Logic Unit Memory Bus Control Unit Arithmetic & Logic Unit RAM Bus Interface Unit I/O Instruction Decoder Registers System Bus Floating Point Unit Instruction Cache Registers

That was the structure, now let’s talk about the language of a uP

The 1st uP: Intel 4004 Introduced 1971 2250 transistors 108 kHz, 60,000 ops/sec 16 pins 10-micron process As powerful as the ENIAC which had 18000 tubes and occupied a large room Targeted use: Calculators Cost: less than $100

Why Intel came up with the idea? A Japanese calculator manufacturer – Busicom – wanted Intel to develop 16 separate IC’s for a line of new calculators Intel, at that point in time known only as a memory manufacturer, was quite small and did not have the resources to do all 16 chips Ted Hoff came up with the idea of doing all 16 on a single chip Later, Intel realized that the 4004 could have other uses as well

Currently Popular – Intel Pentium 4 (3.2GHz) Introduced June 2003 55 million transistors, 77 watt power dissipation 32-bit word size 2 ALU’s, each working at 6.4GHz 128-bit FPU, 8kB L1 cache, 512kB L2 cache 0.13 micron process Targeted use: PC’s and low-end workstations Cost: around $600

Moore’s Law In 1965, one of the founders of Intel – Gordon Moore – predicted that the number of transistor on an IC (and therefore the capability of microprocessors) will double every year. Later he modified it to 18-months His prediction still holds true in 2003. In fact, the time required for doubling is contracting to the original prediction, and is closer to a year now

Enhancing the capability of a uP? The computing capability of a uP can be enhanced in many different ways: By increasing the clock frequency By increasing the word-width By having a more effective caching algorithm and the right cache size By adding more functional units (e.g. ALU’s, FPU’s, Vector/SIMD units, etc.) Improving the architecture

Binary System Binary number system has 2 digits 0 and 1 It is a two state on/off system Represented by electricity turned off or on Has base of 2

Bit Each digit in binary system is called Bit (Binary Digit) Bit is basic unit for storing data in computer memory 0 means off 1 means on

Byte 8 Bits = 1 Byte Why?

Byte Bits cannot store all These are characters of data Numbers Letters Special characters These are characters of data Each byte represents one character of data

Word Number of bits that constitute a common unit of data Computer word is typically size of register Larger the word, more powerful is computer

Word 8-bit machine – can handle 1 byte (character) at a time 64-bit – can handle 8 bytes (characters) at a time Which is faster?

4-, 8-, 16-, 32-, 64-bit (Word Length) The 4004 dealt with data in chunks of 4-bits at a time Pentium 4 deals with data in chunks (words) of 32-bit length The new Itanium, Opteron, G5 processor deals with 64-bit chunks (words) at a time Why have more bits (longer words)?

Coding Schemes Byte represents a character What set of bits represents what character? 0100 0001? Solution?

Coding Schemes Solution ASCII Use common scheme for data representation ASCII American Standard Code for Information Interchange

What have we learnt today? Today we learnt about the microprocessor, the key component, the brain, of a computer We learnt about the function of a microprocessor And its various sub-systems Bus interface unit Data & instruction cache memory Instruction decoder ALU Floating-point unit Control unit