6. The CPU and Memory Chapt. 7.

Slides:



Advertisements
Similar presentations
Components of a computer system
Advertisements

The CPU The Central Presentation Unit What is the CPU?
DH2T 34 Computer Architecture 1 LO2 Lesson Two CPU and Buses.
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
Professor Michael J. Losacco CIS 1110 – Using Computers System Unit Chapter 4.
Main Memory Lecture 2 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
Chapter 0 Introduction to Computing
The CPU - Outline. Components of CPU Englander p
The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
The central processing unit and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
Elements of the Computer (How a processor works)
I/O Subsystem Organization and Interfacing Cs 147 Peter Nguyen
CPU Registers PC Arith Logic Unit Bus Interface I/O Bridge System bus Memory bus Main Memory USB Controller Graphics Adapter Disk Controller I/O Bus Mouse.
Lecture 12 Today’s topics –CPU basics Registers ALU Control Unit –The bus –Clocks –Input/output subsystem 1.
Lesson 3 — How a Computer Processes Data
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 2. Computer Structure Computer Structure The traditional diagram of a computer...
Computer Systems 1 Fundamentals of Computing The CPU & Von Neumann.
Computer Processing of Data
Introduction to Computing: Lecture 4
D75P 34R HNC Computer Architecture 1 Week 9 The Processor, Busses and Peripherals © C Nyssen/Aberdeen College 2003 All images © C Nyssen /Aberdeen College.
CPU Computer Hardware Organization (How does the computer look from inside?) Register file ALU PC System bus Memory bus Main memory Bus interface I/O bridge.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Components of a Computer Prepared by: Mrs. McCallum-Rodney.
The CPU and Memory.
Figures of the Allegory of Memory
CPU How It Works. 2 Generic Block Diagram CPU MemoryInputOutput Address Bus Data Bus.
Chapter 5 Computing Components. 5-2 Chapter Goals List the components and their function in a von Neumann machine Describe the fetch-decode-execute cycle.
General Concepts of Computer Organization Overview of Microcomputer.
Computer Organization & Assembly Language © by DR. M. Amer.
Computer System Internal components - The processor - Main memory - I / O controllers - Buses External components (peripherals). These include: - keyboard.
Computer Architecture Memory, Math and Logic. Basic Building Blocks Seen: – Memory – Logic & Math.
10 Internal parts of a PC Created by Federica Proietti Cesaretti.
INTRODUCTION.  Upon completing this topic, you should be able to: Illustrate a basic elements of digital computer system and their functions, Depicts.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Structure & Architecture 7b - CPU & Buses.
Computer Organization. The digital computer is a digital system that performs various computational tasks Digital computer use binary number system which.
Electronic Analog Computer Dr. Amin Danial Asham by.
Assessment Covering… Von Neuman architecture Registers – purpose and use, the fetch execute cycle.
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
THE MICROPROCESSOR A microprocessor is a single chip of silicon that performs all of the essential functions of a computer central processor unit (CPU)
Overview von Neumann Architecture Computer component Computer function
Computer operation is of how the different parts of a computer system work together to perform a task.
Chapter 2.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Information Technology INT1001 Lecture 2 1. Computers Are Your Future Tenth Edition Chapter 6: Inside the System Unit Copyright © 2009 Pearson Education,
IC 3 BASICS, Internet and Computing Core Certification Computing Fundamentals Lesson 2 How Does a Computer Process Data?
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Introduction to Programming. Key terms  CPU  I/O Devices  Main memory  Secondary memory  Operating system  User interface  Application  GUI 
Computer Architecture Adapted from CS10051 originally by Professor: Johnnie Baker Computer Science Department Kent State University von Neuman model.
CPU Lesson 2.
Computing Science Computer Structure: Lesson 1: Processor Structure
Systems Architecture Keywords Fetch Execute Cycle
What Computers Can and Cannot Do
UNIT 9 Computer architecture
Chapter 4 Objectives Learn the components common to every modern computer system. Be able to explain how each component contributes to program execution.
Course Name: Computer Application Topic: Central Processing Unit (CPU)
Computer Architecture
Introduction to Microprocessors and Microcontrollers
Chapter 4 Objectives Learn the components common to every modern computer system. Be able to explain how each component contributes to program execution.
COMS 161 Introduction to Computing
The Little Man Computer
Chapter 4 Objectives Learn the components common to every modern computer system. Be able to explain how each component contributes to program execution.
ITEC 1011 Introduction to Information Technologies 0. What is a Computer?
Basic components Instruction processing
Information Representation: Machine Instructions
Presentation transcript:

6. The CPU and Memory Chapt. 7

Introduction The Little Man Computer (LMC) is cute, but… Real computers… Memory is separate from the CPU Data are in binary (not decimal) Central Processing Unit

Components of a CPU ALU (arithmetic and logic unit) Control unit Perform arithmetic and logic operations Arithmetic: add, subtract, multiply, divide, etc. Logic: AND, OR, NOT, Shift, etc. Control unit Interprets instructions Controls the flow of information within the CPU Works with a “program counter” (address of next instruction) Input/output interface Provides mechanism for input and output of data Many variations possible p. 166

LMC Counterparts ALU Input/output interface Control unit 00 123 123 01 500 02 199 03 500 04 399 456 05 Control unit 95 96 97 98 789 99 123 05 Program counter p. 167

Input/output interface System Block Diagram CPU Memory ALU Input/output interface Control unit Program counter

Registers A register is a single storage location within the CPU Unlike memory, which is “outside” the CPU Examples of registers: Accumulator (ACC) Program counter (PC) Instruction register (IR) Memory address register (MAR) Memory data register (MDR) Status register General purpose registers (R0, R1, …) Included on some CPUs Used for high-speed temporary storage of program variables

Memory address register Memory Unit n bits Memory cell bit 0 1 2 3 4 2n-1 bit 1 Memory address register Address decoder bit n - 1 0 1 2 m - 1 Memory data register m bits p. 170

Memory Capacity 2n x m n address bits = 2n addresses m data bits m is the “width” of the data path Typical values: n: 16, 17, 18, 19, 20, 21, 22, etc. m: 8, 16, 32, 64

Question Q: How many bits of memory are contained in a memory unit with 512KB of memory? A: 512 = 29, K = 210, B = byte = 8 = 23 29 x 210 x 23 = 222 = 4,194,304

Exercise – Memory Capacity Q: How many bits of memory are contained in a memory unit with 2MB of memory? A: Skip answer Answer

Exercise – Memory Capacity Answer Q: How many bits of memory are contained in a memory unit with 2MB of memory? A: 2 = 21, M = 220, B = byte = 8 = 23 21 x 220 x 23 = 224 = 16,777,216

Memory Implementations RAM – random access memory Static RAM Dynamic RAM ROM – read-only memory p. 175

Fetch-Execute Cycle Two steps, or cycles, in the execution of every instruction Fetch – fetch the code for the instruction from memory and place it in the IR (instruction register) Execute – execute the instruction A pretty picture sometimes helps… Fetch Execute time

The Store Instruction PC  MAR MDR  IR Fetch IR[address]  MAR A  MDR PC + 1  PC Fetch time Execute

The Add Instruction PC  MAR MDR  IR Fetch IR[address]  MAR A + MDR  A PC + 1  PC Fetch time Execute

From our first lecture… Buses Definition: a collection of wires with a common purpose Each wire is called a line Typically, buses carry information from one place to another From our first lecture…

bus Ports Printer Mouse Keyboard Modem Disk controller Graphics card Monitor Speakers CPU Sound card RAM Network card Computer

Types of Buses (1 of 3) Point-to-point Serial port Modem Control unit ALU

Types of Buses (2 of 3) Multipoint Computer Computer Computer Computer CPU Memory Disk controller Video controller

Types of Buses (3 of 3) Daisy chain Device controller Device Device Terminator

Buses Inside a Computer Motherboard Many configurations possible CPU Data bus Address bus Control bus Memory I/O Module I/O Device

Data Bus Carries data between the CPU and memory or I/O devices Bi-directional Data transferred “out of” the CPU for write operations Data transferred “into” the CPU for read operations Typical sizes: 8, 16, 32, 64 lines Signal names: D0, D1, D2, D3, etc.

Address Bus Carries an address from the CPU to Memory or I/O devices Unidirectional The address is always supplied by the CPU (There is one exception to this, which we’ll discuss later.) Typical sizes: 16, 20, 24 lines Signal names: A0, A1, A2, A3, etc.

Control Bus Collection of signals for coordinating CPU activities Each signal has a unique purpose Typical sizes: 10-20 lines Signals are output, input, or bi-directional Typical signals /RD (read) /WR (write CLK (clock) /IRQ (interrupt request) etc.

Memory Maps The usage of memory space on a system is commonly depicted in a “memory map” The height of the map is determined by the number of addresses The width of the map is usually 8 bits E.g., a system with a capacity of 216 bytes…

Memory Map Data bit position The “bottom” of memory 7 6 5 4 3 2 1 0 FFFF 0002 0001 0000 Data bit position The “bottom” of memory Hexadecimal address

Use of Memory Maps Memory maps are usually drawn to show “what is where” on a system The possibilities for “what” RAM, ROM, I/O, nothing The possibilities for “where” Determined by the starting/ending addresses for each “block” of RAM, ROM, I/O, nothing E.g., a memory map for a system with a capacity of 224 bytes with two 1 MB RAM modules residing consecutively at the bottom of memory…

Memory Map 14 MB empty 224 bytes = 16 MB “capacity” 1 MB RAM 1 MB RAM FFFFFF 200000 1FFFFF 100000 0FFFFF 000000 14 MB empty 224 bytes = 16 MB “capacity” 1 MB RAM 1 MB RAM

Exercise – Memory Space Q: A system with a memory capacity of 128 GB has four 32 MB memory modules installed consecutively at the bottom of memory. The rest of the memory is unused. How much memory space is available for future expansion? (Give your answer in decimal in megabytes.) A: ? Skip answer Answer

Exercise – Memory Space Answer Q: A system with a memory capacity of 128 GB has four 32 MB memory modules installed. The rest of the memory is unused. How much memory space is available for future expansion? (Give your answer in decimal in megabytes.) A: 128 GB – 4 x 32 MB = 27 x 210 MB - 22 x 25 MB = (217 – 27) MB = (131,072 – 128) MB = 130,944 MB

Exercise – Memory Maps Draw a memory map for a system with a capacity of 2 GB. Assume the system has three 32 MB memory modules residing consecutively at the bottom of memory. Illustrate the size of each block in MB and the starting and ending address of each block of memory in hexadecimal. Skip answer Answer

Memory Map 1,952 MB empty 231 bytes = 2 GB “capacity” 32 MB RAM Answer Memory Map 7FFFFFFF 06000000 05FFFFFF 04000000 03FFFFFF 02000000 01FFFFFF 00000000 1,952 MB empty 231 bytes = 2 GB “capacity” 32 MB RAM 32 MB RAM Note: 2 GB = 2,048 MB 32 MB RAM

Memory vs. I/O Our system block diagram shows memory and I/O connected to the same buses (data, address, & control) This raises the question… How is I/O differentiated from memory? (We’ll answer this in the next topic)

Thank you