CPU, Memory, and Bus systems - Mr. Mohamed Zaki

CPU, Memory, and Bus systems - Mr. Mohamed Zaki

Lesson 3 0x003 011 Hardware Components Modified and presented by : Mohamed1Zaki Topics Simple Computer Architecture CPU Architecture CPU Registers

Executing instruction Instruction set types Memory Devices Bus Systems Input / Output Architecture 2 COMPUTER ARCHITECTURE Von Neumann Architecture Address Bus CPU/ Processor Data Bus Control Bus Input & Output Devices Main Memory

Examples of CPUs Based on the manufacturer: Intel: Celeron Pentium I. Pentium MMX. ( Multimedia Extension) Pentium II. Pentium III. Pentium 4. Centrino. ( Mobile Technology) Core 2 DUO Dual core Quad core Core i series (Laptop, Desktop, and Mobile Device Processors) Xeon (Server and Workstation Processors) AMD. ARM Dual Core A4,A5, A6 ARM Cortex-A9 MPCore (for iPad & iPhone and others)

4 CPU Architecture CPU : Central Processing Unit. Also called Processor CPU: Is the part of a computer in which arithmetic and logical operations are performed and instructions are decoded then executed. CPU Components: ALU ( Arithmetic and Logic Unit) CU (Control Unit) Registers: Are high speed & small in size temporary memory storage areas used during data manipulation ( calculation , comparison , etc..)

The clock: It is a circuit for generating pulses that enable computer components to work in an ordered manner . 5 CPU Architecture Main Memory / RAM / Primary Memory ALU 101010 100001 Control Unit 001010 GENERAL PURPOS

REGISTER 010100 010100 CIR 100001 MAR Program Counter Register

MBR Bus : set of wires 6 CPU Registers General purpose registers: are used to hold data before and after it is manipulated. Also used for many operation such addition, subtraction multiplication and logic operations Special Purpose Registers: Program counter PC:

it is loaded with the address in memory of the first instruction location of a program. After fetching, it is increased to point to the next location. Memory Buffer register MBR: all data and instructions pass in and out from the main storage through MBR. Current instruction register CIR: an instruction to be performed will be taken from the main storage via the MBR and placed in register IR. Memory address register MAR : prior to each transfer between the MBR and main storage , the exact source or destination of data in the main storage must be specified by MAR. 7 Executing a Software Program The chart shows the steps that the CPU uses to execute a software Copy PC contents into MAR & Initiate

a memory read Increment the PC Copy the instruction Which is in the MBR into CIR Decode the CIR Execute the instruction 8 Instruction set types Each CPU has a set of instructions Arithmetic and Logic inst. Set: Such as addition, subtraction, multiplication, Increment, decrement, and logical operations, Such as add, sub,mul.

I/O instructions: To transfer data between peripherals and memory, or between peripherals and accumulator, Such as mov Processor reference instructions: To stop the microprocessor activities. Such as halt. Fetch (Load) and store instruction: To transfer the data between accumulator and memory, Such as load Memory reference instructions: To access the memory during their execution, it is both Load + store instructions.

Transfer of control, or branch instruction: (Executing a Program) To change the program sequence. Such as jmp 9 Memory Devices Any memory is constructed from a collection of memory cells, each having unique address. Each cell contains a combination of binary data(0 or 1). Types of Memory: RAM. ROM. Cache Memory. 10 Random Access Memory (RAM)

o It also called Main or Primary Memory. o Programs & Data are stored there before processing . o The larger amount of RAM, the quicker programs will run. o More than one type of RAMs are used in modern PCs, like DRAM(Dynamic RAM) and SDRAM(Synchronous DRAM) o The data will be lost if the power is cut (Volatile Memory). 11 Read Only Memory (ROM) It holds the firmware program (BIOS). It starts the POST power on self test program It contains auto-startup program that will load the necessary OS programs in RAM. The information remains in the ROM when the computer turned off. ( Nonvolatile Memory)

12 The Differences between ROM and RAM: ROM (Read Only Memory) RAM (Random Access Memory) 1. Used to store part of O.S. by the 1. Used to store programs such as factory. accounting program, games, 2. ROM can be used for read only, word processor by the user. we can't write or modify any thing 2. We can use the RAM for read on the ROM. and write data. 3. Not volatile memory (i.e. the 3. Volatile memory (i.e. the information remains in the ROM information in the RAM is when the computer turned off)

removed when the power turned off) 13 Cache Memory Is a small memory, located close to the processor? Some processors are built with internal cache memory. It has much shorter access time than the RAM. Therefore, it is used to hold instructions and data that has recently been accessed. There are two types of cache memory: L1 and L2. L1 ( Level 1) internal cache, built in with in the CPU. L2 ( Level 2) external cache, built in with in the Motherboard, L2 is lager than L1. ( A+ Book p 131) 14 CPU, RAM, and Cache Diagram

CPU Write through cache. Cache Write back cache. RAM 15 Hard Disk 16 Hard Disk is a data storage device used for storing and retrieving digital information using rapidly rotating discs (platters) coated with magnetic material. A magnetic heads arranged on a

moving arm to read and write data to the surfaces. Disk Organization Magnetic polarity determines the bit value (1,0) Sector Bit Value is 1 Bit Value is 0 Track 0 0 1 0 1 1 1 0 The Format Command is used to create Tracks and Sectors

Other Storage Devices Flash Memory DVD Disks Magnetic Tapes Storage Device Hierarchy 1 nsec M Bytes Cache 10 nsec Main Memory d G Bytes

Siz e Registers e Spe Bytes 100 nsec G Bytes Flash Memory msec G T Bytes

Hard Disks msec T Bytes Magnetic Tapes sec -min Hard Disk and Tapes have mechanical movements Others do not have and called Solid Sate Devices (SSD) Bus Systems (Connecting them together ) Is a collection of parallel electrical lines which connect the computer components. The buses used to transfer: Data signals. Address signals. Control signals.

Power. 21 Bus Systems Address Bus The address bus is the set of wires carrying the addressing information used to describe the memory location, which the data is being sent or retrieved. The size of the address bus indicates the maximum amount of RAM that a chip can address. Size of memory that can be addressed= 2L Were L = No. of Lines in address bus ( Size of address bus) 22 Bus Systems Address Bus

Size of address bus Size of memory Size of address bus Size of memory 1 21 16 216 ~= 64 KB 2

22 =4 20 220 ~= 1 MB 3 23=8 30 220=1 GB 4 24 =16 32

232=4 GB : : : : 10 210 =1024=1KB 11 211=210x21=2 KB 12 212=210x22=4 KB

23 Bus Systems Address Bus Examples: 1) how many addresses can be built by 3 digits (3 lines): 2n = 23 = 8 address bus locations from ( 000 to 111 ) 2): how many addresses can be built by 3 digits (3 lines): 2n = 23 = 8 address bus locations from ( 000 to 111 ) 24 Input / Output Architecture The computer has the ability to send and receive data to and from other devices. We can transfer data in parallel and serial lines. When the CPU wishes to send data to a particular I/O devices it places a unique identity code ( address ) onto the address line.

Only the device that recognizes that code will respond to the command that is placed on the control line. 25

Recently Viewed Presentations

  • Introduction to Project Based Learning

    Introduction to Project Based Learning

    Flying by the seat of your pants . The ill-defined task . IS . Harder to plan for . Requires more thought about structure . Required the preparation of teaching materials to meet all the goals . Guides the rest...
  • Visual Illusions - Computer graphics

    Visual Illusions - Computer graphics

    Visual Illusions Playing with Perspective ... although some 'loopholes' have been found Müller-Lyer Lines Revisited The same illusion through perspective cues Oculomotor Macropsia/Micropsia Transactionalist Theory The world is a product of perception, not a cause of it Hamlet: Do you...
  • MATH ITEM DESIGN Design framework Item development Cognitive

    MATH ITEM DESIGN Design framework Item development Cognitive

    Design framework. Item development. Cognitive complexity. Sample items. MathItem Design. Once we've selected the types of items we want to develop, we then need to think about design frameworks, the alignment of items to the standards, and other issues of...
  • Lecture 15 Categorical data and chi-square tests

    Lecture 15 Categorical data and chi-square tests

    Times Blank Presentation Lecture 15 Categorical data and chi-square tests Sample space : the set of possible basic outcomes Subjective probability and assumption of independence Examples
  • What market failure means  Market failure is a

    What market failure means Market failure is a

    Demerit Goods. In economics, a demerit good is a good or service whose consumption is considered unhealthy, degrading, or otherwise socially undesirable due to the perceived negative effects on the consumers themselves. It is over-consumed if left to market forces.
  • Skeletal Remains - Mrs. Rosewitz

    Skeletal Remains - Mrs. Rosewitz

    The Skeletal System and Identification of Skeletal Remains ... Determine the sex of a skull with small browridges, a large mandible and an inion hook. ... The Skull The Male Skull Male Skull Nuchal Area The Female Skull Female Skull...
  • NAVSTA Pharmacy - United States Navy

    NAVSTA Pharmacy - United States Navy

    IDC Formulary - Prescription Policies. 3. Restricted items (*) and non-restricted items may be initiated, refilled, and modified by IDCs. However, prescription of restricted items (*) must be under the guidance of a supervising physician who must co-sign the clinical...
  • 2011 Senior Thesis Projects - University of Notre Dame

    2011 Senior Thesis Projects - University of Notre Dame

    It is my hope that my thesis contributes to a better understanding of what the Mass actually is—the celebration of the same Eucharist that was instituted at the Last Supper, a true and real sacrifice offered to God for the...