Sei sulla pagina 1di 49

Hardware The Central Processing Unit (CPU) & Memory

Chapter 02

The Central Processing Unit and Memory

By. Shafiq Ahmed Chachar

The Computer System Concept


Central Processing Unit

Input Devices

Control Arithmetic Unit Logic Unit


System Bus

Output Devices

Keyboard Mouse Touch Screen Optical-Scanner Voice Recognition etc.

Special Cache Purpose Processors Memory

Primary Storage Memory

Visual Display Unit Printer Audio-Response Physical Control Devices, etc.

The Central Processing Unit and Memory

Secondary Storage Devices

Magnetic Disk Tape Units Optical Disks, etc.

The CPU

CPU stands for Central Processing Unit The CPU has two principal sections
Arithmetic / Logic Unit Control Unit

It also contains registers and bus.

The Central Processing Unit and Memory

Arithmetic / Logic Unit


ALU is the section of the CPU that performs arithmetic and logical operations on data. Arithmetic operations include addition, subtraction, multiplication and division. Logical operations compare pairs of data items to determine whether they are equal and, if not, which is larger.

The Central Processing Unit and Memory 4

Control Unit
The control unit is the section of the CPU that directs the flow of electronic traffic between memory and the ALU and between the CPU and input and output devices. Control unit coordinates or manages the computers operation.

The Central Processing Unit and Memory

Registers

A high speed staging area within the CPU that temporarily stores data during processing.

CPU can access contents from Registers much more rapidly than it can access from other memory (Cache memory and RAM)

The Central Processing Unit and Memory

Registers

Four types of registers


Storage registers temp store data that have been moved from memory and are awaiting processing or that are about to be sent to memory. Address registers contain the address of the data to be used in executing an instruction. Accumulators hold the results of computation as each arithmetic operation occurs. General purpose registers hold data, addresses, or arithmetic results.

The Central Processing Unit and Memory

Machine Cycles

A machine cycle has two parts Instruction Cycle (I-Cycle) Execution Cycle (E-Cycle) Microcode - Conversion of Instruction issued
to a computer into several smaller, machine level instructions. System clock - The timing mechanism within the computer system that governs the transmission of instruction and data through the circuits.

The Central Processing Unit and Memory

Machine Cycles

The processing of a single machine level instruction is accomplished in a four step machine cycle. Fetch obtain the next instruction from memory. Decode translate the instruction into individual commands that the computer can process. Execute perform the actions called for in the instructions. Store write the results of processing to memory.
9

The Central Processing Unit and Memory

Bit and Byte

Binary -The numbering system with two possible states. Bit - A binary digit, such as 0 or 1.

Byte - A configuration of 8 bits that represent a single character of data. I Kilobyte (KB) = 1,024 bytes = 210

The Central Processing Unit and Memory

10

Units of Time
Unit of Time Millisecond (ms) Part of a Second 1/1000

Microsecond (s) 1/1,000,000 Nanosecond (ns) 1/1,000,000,000) Picosecond (ps)


The Central Processing Unit and Memory

1/1,000,000,000,000)
11

ASCII and EBCDIC

When data or programs are sent between the computer & its peripheral equipment, a fixed length binary based code is used. Such codes represent digits, alphabetic characters, and special characters. ASCII (American Standard Code for Information Interchange) EBCDIC (Extended Binary Coded Decimal Interchange Code)
12

The Central Processing Unit and Memory

ASCII and EBCDIC


EBCDIC is mainly used for IBM mainframes. EBCDIC represents a character with 8 bits. ASCII is used for microcomputers. ASCII originally was designed as 7 bit but 8 bit versions are also available.

The Central Processing Unit and Memory

13

The Parity Bit

An extra bit added to the byte representations of characters to ensure there is always either an odd or even number of 1 bits transmitted with every characters. The parity bit is automatically generated by the keyboards own circuitry. Computer system support either even or odd parity.
14

The Central Processing Unit and Memory

CISC and RISC


Complex instruction set computing moves data to and from main memory, results in slower overall performance. Reduced instruction set computing data is taken from registers, this simplifies and accelerates.

The Central Processing Unit and Memory 15

The System Unit

The Central Processing Unit and Memory

By. Shafiq Ahmed Chachar

16

The System Unit


CPU chip Slave Chips Memory


RAM
Cache Memory ROM

Add-In Boards Buses Power supply Hard Disk Drive & other Secondary

Ports

Storage Devices

The Central Processing Unit and Memory

17

CPU chips
The CPU chip lies within a carrier package, and the carrier package is mounted onto a special board called the system board or mother board inside the system unit. System board - The hardware unit that houses the CPU and memory, as well as number of other devices.

The Central Processing Unit and Memory 18

Computer Storage

There are two types of storage Primary (Internal)


Also known as memory This section of the computer system temporarily holds data and program instructions awaiting processing, intermediate results, and processed output Storage on media such as disk and tape that supplements memory

Secondary (external)

The Central Processing Unit and Memory

19

Storage Trade-offs
Semiconductor Memory

Primary Storage Secondary Storage

Magnetic Disks Optical Disks Magnetic Tape


The Central Processing Unit and Memory

20

What is Memory?

Also called primary (internal) storage It holds


Programs and data passed to the computer system for processing Intermediate processing results Output ready for transmission to a secondary storage or output device

The Central Processing Unit and Memory

21

Random Access Memory (RAM)


RAM is the place in a computer where the operating system, application programs, and data in current use are kept so that they can be quickly reached by computers processor. RAM is much faster to read from and write to than the other kind of storage devices.

The Central Processing Unit and Memory 22

Random Access Memory (RAM)


RAM is volatile. More RAM in computer reduces the number of times the processor has to read data in from your hard disk. RAM access time is in nanoseconds, hard disk access time is in milliseconds. Two types - DRAM and SRAM

The Central Processing Unit and Memory 23

Dynamic RAM (DRAM)

A common type of computer memory that uses capacitors and transistors storing electrical charges to represent memory states. These capacitors lose their electrical charge, and need to be refreshed every millisecond during which time they cannot be read by the processor.
24

The Central Processing Unit and Memory

Static RAM (SRAM)

A type of computer memory that retains its contents as long as power is supplied; it does not need constant refreshment like DRAM. A static RAM can only store about one fourth of the information as compared to DRAM. SRAM has access time of 15 to 30 nanoseconds whereas DRAM has access speed ranging from 80 to 120 nanoseconds.

The Central Processing Unit and Memory

25

DRAM versus SRAM


DRAM SRAM Slow and must be Fast and doesnt constantly refreshed require refreshing Simple Complex Inexpensive Physically small
The Central Processing Unit and Memory

Expensive Physically large


26

Logical Memory Layout


Memory Description Conventional memory The first 640K of system memory. Upper memory area The upper 384K of the first megabyte of memory. High memory area The first 64K of the second megabyte of the memory. Extended memory Any memory above the high memory area.
The Central Processing Unit and Memory 27

Memory Chip Package Types


Dual inline package (DIP) Single inline memory module (SIMM) Dual inline memory module (DIMM) Small byte size pieces installed individually. Large economy size pieces that combine multiple DIPS on a single module High capacity modules that have memory on each side of the module board that connects through a single connector.
28

The Central Processing Unit and Memory

Cache Memory

microprocessor can access more quickly that it can access regular RAM. As the microprocessor processes data, it looks first in the cache memory and if it finds data there, it does not have to do the more time consuming reading data from larger memory. SRAM is used for cache memory. (512 KB)
The Central Processing Unit and Memory 29

Cache memory is RAM that a computer

Types of Cache Memory


Internal Cache - is built right into the CPU chip. The CPU looks here first to find the data it needs. External Cache - resides on SRAM chips close to the CPU chip on the system board than the regular memory. The CPU looks here if it cant find the data it needs in internal cache.

The Central Processing Unit and Memory 30

Read Only Memory (ROM)


A software in hardware chip from which the computer can read data, but to which it cannot write data. It is non volatile and read only. ROM chips can hold data and information even after the electrical current to the computer is turned off.

The Central Processing Unit and Memory

31

Read Only Memory (ROM)

PROM Programmable ROM can be modified from their manufactured state, but only once. EPROM Erasable PROM can be erased by bathing the chip in ultraviolet light. EEPROM Electrically EPROM can be reprogrammed by electronically reversing the voltage used to create the data or information.
32

The Central Processing Unit and Memory

Flash Memory
Memory that retains its contents even when the electricity is turned off. Personal Computer Memory Card International Association (PCMCIA) cards used flash memory.

The Central Processing Unit and Memory

33

BIOS

Basic Input / Output System A set of instructions, stored in readonly memory (ROM), that lets your computers hardware and operating system communicate with application

programs and peripheral devices.


The Central Processing Unit and Memory 34

POST

Power on Self Test (POST)

This diagnostic program is stored in ROM BIOS, and it produces beep sound as your computer system begins operation, or boots up. POST takes an inventory of system components, checks each component for proper functioning, and initializes system settings.

The Central Processing Unit and Memory

35

Ports
A socket on the back of a computers system unit into which a peripheral device may be plugged. Serial ports - transmit data a single bit at a time. Parallel ports - transmit one byte at a time.

The Central Processing Unit and Memory

36

RS-232C

RS-232C is a long-established standard ("C" is the current version) that describes the physical interface and protocol for relatively low-speed serial data communication between computers and related devices. Your computer modem uses one of your PC's serial connections or COM ports. Serial communication between your PC and the modem and other serial devices adheres to the RS-232C standard.
37

The Central Processing Unit and Memory

Ports

Monitor Port Serial Port Parallel Port Mouse Port Keyboard Port Game Port Modem Connector Phone Connector Power Connector

The Central Processing Unit and Memory

38

Add-In Boards

A circuit board that may be inserted into a expansion slot within a desktop computers system unit to add one or

more functions.

For e.g., video - adapter board,

fax/modem board, sound board etc.


The Central Processing Unit and Memory 39

Add-In Boards

Plug and Play - The ability of a computer to detect and configure new hardware components.

PC card - A small card that fits into a


slot on the exterior of a portable

computer to provide new functions.


The Central Processing Unit and Memory 40

Buses

An electronic path within a computer system along which bits are transmitted.
Internal Bus Data Bus (Address Bus)

Expansion Bus
Local Bus The Universal Serial Bus

The Central Processing Unit and Memory

41

Buses
Internal Bus - The CPU chip contains a superfast internal bus that exchanges data between control unit, arithmetic and logic component and registers. Data Bus (Address Bus) - The CPU chip exchanges data with RAM through a data bus, which is extended by an expansion bus.

The Central Processing Unit and Memory 42

Buses
Expansion Bus - The expansion bus interacts with RAM and connects low speed devices, such as, printers, keyboard and mouse. Local Bus - The local bus services high speed devices and connects directly to the CPU, such as monitor, hard drives and network interface cards.

The Central Processing Unit and Memory 43

ISA

ISA (Industry Standard Architecture) is a standard bus (computer interconnection) architecture that is associated with the IBM AT motherboard. It allows 16 bits at a time to flow between the motherboard circuitry and an expansion slot card and its associated device(s).

The Central Processing Unit and Memory

44

EISA

EISA is a standard bus (computer interconnection) architecture that extends the ISA standard to a 32-bit interface. It was developed in part as an open alternative to the proprietary Micro Channel Architecture (MCA) that IBM introduced in its PS/2 computers. EISA data transfer can reach a peak of 33 megabytes per second.
45

The Central Processing Unit and Memory

PCI

PCI (Peripheral Component Interconnect) is an interconnection system between a microprocessor and attached devices in which expansion slots are spaced closely for high speed operation. Using PCI, a computer can support both new PCI cards while continuing to support Industry Standard Architecture (ISA) expansion cards, an older standard. PCI is designed to be synchronized with the clock speed of the microprocessor. PCI transmits 32 bits and 64 bits. PCI uses all active paths to transmit both address and data signals, sending the address on one clock cycle and data on the next.
46

The Central Processing Unit and Memory

USB

USB (Universal Serial Bus) is a plug-andplay interface between a computer and add-on devices With USB, a new device can be added to your computer without having to add an adapter card or even having to turn the computer off. USB supports a data speed of 12 megabits per second. This speed will accommodate a wide range of devices, including MPEG video devices, data gloves, and digitizers.
47

The Central Processing Unit and Memory

FireWire

FireWire is Apple Computer's version of a standard, IEEE 1394, High Performance Serial Bus, for connecting devices to your personal computer. FireWire provides a single plug-and-socket connection on which up to 63 devices can be attached with data transfer speeds up to 400 Mbps (megabits per second). The standard describes a serial bus or pathway between one or more peripheral devices and your computer's microprocessor.
The Central Processing Unit and Memory 48

Power Supply

A part of the computer that converts the power from a wall outlet into the lower voltages, typically 5 to 12 volts DC. PC power supplies are rated in watts (90 watts - 300 watts) The power supply is one of the main sources of heat and requires a fan to provide additional ventilation.

The Central Processing Unit and Memory

49

Potrebbero piacerti anche