Chapter:4 Microprocessor Basic, Input, Output & Memory Devices Class: XI A.

51
Chapter:4 Microprocessor Basic, Input, Output & Memory Devices Class: XI A

Transcript of Chapter:4 Microprocessor Basic, Input, Output & Memory Devices Class: XI A.

Chapter:4

Microprocessor Basic, Input, Output & Memory Devices

Class: XI A

Microprocessor: A microprocessor is a Central Processing Unit (CPU) on a single chip. It is a multipurpose programmable device constructed using Metal Oxide Semiconductor (MOS) technology. It read binary instructions from a storage device called memory, accepts binary data as input and processes data according to those instructions and provides results as output.Instruction Set: It is the set of instructions that the microprocessor executes

Word Length(Bandwidth): The number of bits processed in a single instruction is called word length or word size. The word size is directly proportional to the processing power of the CPU.System Clock Speed: The System Clock is an electronic circuit that generates pulses which are measured in million of cycles per second (MHz). The number of pulses generated by the clock per unit of time is its Clock speed. Each microprocessor is characterized by its clock speed. Nowadays microprocessors have clock speed of several GHz. The CPU uses this clock speed to control sequencing and execution of various operations in the computer

Classification of Microprocessors1.By bandwidth of the data format( 4-bit, 8-bit, 16-bit, 32-bit, 64-bit, 128-bit): It depends upon the size of the internal registers and the word –size or the data width they can process in one go.2. By their instruction set: It is divided into three types.(a). RISC(Reduced Instruction Set Computer)(b). CISC(Complex Instruction Set Computer)

(c). EPIC(Explicitly Parallel Instruction Computing)

(a). RISC(Reduced Instruction Set Computer) : It is a type of microprocessor architecture that uses a small set of instructions of uniform length. These are simple but primitive instructions which execute in one clock cycle. For this reason, RISC chips are less complex and also less expensive to produce. The instructions are of uniform length which interface with about 32-36 registers. Examples of RISC processor is SPARC,

POWER PC etc.

(b). CISC(Complex Instruction Set Computer)

:A CISC chip such as Intel Pentium provides programmers with hundreds of instructions of variable sizes, and the processing circuitry includes many special purpose circuits that carry out these instructions at high speeds. These instructions interface with memory in multiple mechanisms with complex addressing modes. In this case the program size is reduced and hence lesser number of memory cycles are required to execute the instruction. So fewer general purpose registers(8-12) are present in CISC processors. Also less number of memory cycles result in faster execution of the program.

(c).EPIC(Explicitly Parallel Instruction Computing): It is a computer architecture that combines the best feature of both RISC and CISC. It does not use instructions of any fixed length but rather aims at parallel processing of instructions. It uses a bundle of complex instructions that in addition to basic

instruction also contain information on how to run the instruction in parallel with other instructions. This greatly increases the efficiency of an EPIC processor. IA-64 (Intel Architecture-64) is Intel’s first 64 bit processor based on EPIC.

=>Input Device: A device used to provide data and instruction to the computer are called input device.

Example: keyboard

1.Keyboard: It is used to enter both numerical and characters type data. it is like a mechanical typewriter with alphanumeric and special keys.

• Mouse: A mouse is a pointing device that functions by detecting two-dimensional motion relative to its supporting surface. The mouse's motion typically translates into the motion of a cursor on a display, which allows for fine control of a Graphical User Interface.

Microphone(MIC): It is used to record sound. It convert sound waves into audio signals and vice versa.

• Output Device: When the data and instructions are fed to the computer and processed, the next step is to get the output. This output may be displayed on the monitor or printed on the paper.

Softcopy output Hardcopy output.

=> Monitor: It is output device that display the information on the screen. The quality of pictures depends on the number of pixels that it can display.

=> Types of Monitors:

1.Cathode Ray tube: The CRT works in the same way as a television. It contains an electron gun at the back of the glass tube. when the electrons stakes the phosphors dots they glow to give the colors

2. Liquid Crystal Display(TFT):Thin film transistor is the device within each pixel that sets the charge .

3. Plasma Monitors: it stand for PDP(Plasma display Panels) are flat panel displays. It utilizes small cells containing electrically ionized gases across the face of a plasma display, to collectively form a visual image.

4.Touchscreen monitor: it build by combining touch sensitive materials with a durable but sensitive outer material that protects the monitor from finger but still allows the monitor to detect where a person is placing his fingers

5. Organic light emitting display(OLED) Monitors: OLED monitors are created from pushing an electronic current through organic material, causing these materials to glow. It is extremely thin and light-weight displays that can be worn on things like clothing.

Printer: A printer is an output device which is used to transfer output data from a computer onto paper.

Types of Printer There are two types of Printer

1.Impact Printer: There is mechanical contact between the print head and paper.

2.Non-Impact Printer: There is no mechanical contact between the print head and paper.

Impact Printer divided into Two parts.

1.Line Printer

2.Character Printer(Serial Printer)Line Printer prints a complete line at timeprints a complete line at time Types of Line Printer There are two types of Line Printer Drum Printer: a drum printer consists of a a drum printer consists of a

cylindrical drum on which characters are cylindrical drum on which characters are embossed.embossed.

Chain printer: A chain printer consists of A chain printer consists of a steel band on which the characters are a steel band on which the characters are embossed. To print a line, the characters embossed. To print a line, the characters in line are transmitted from the memory in line are transmitted from the memory to printer bufferto printer buffer Character..

printers(Serial Printer): Serial Serial character printer print one character character printer print one character at a time ,with the print head moving at a time ,with the print head moving across a lineacross a line

Serial Printer divided into Two Parts.

1.Dot Matrix Printers: The printing head contains a vertical array of pins. As the head moves across the paper, selected pins free against an inked ribbon to form a pattern of dots on the paper.

2. Letter Quality Printers: The letter quality printers print full characters (continuous character not as the character mode of dots)

Non-Impact Printers: The limitations of speed in electromechanical device and cost considerations have led to the development of printers called non-impact printers.

Type of Non-Impact Printers1.Electromagnetic printers: A

magnetic image can be written on a drum surface. then this surface is passed through magnetic powder which adheres to charged areas.

The powder is pressed onto the paper.

2.Thermal Printers: An electric pulse can be converted to heat on selected sections of a printing head or on wires or nibs(heads). When this head is applied to head sensitive paper, a character is printed.

3. Electrostatic printers:4. Inkjet printers: It is a character printers,

which form characters and all kinds of images by spraying

small drops of ink on to the paper. The print head of an inkjet printer contains up to 64 tiny nozzles.

Laser printer: Laser printers are page printers, which print one page at a time. The main components of a laser printer are a laser beam source, a multi-sided mirror, a photoconductive drum and toner.

1.High speed 2.High quality output.1.Cost. 2.maintenance cost is high.

Speakers: Enhances the value of educational and presentation products. Speakers receive the sound in the form of electric current from sound card and then convert it to sound format.

Bit : : A bits is a binary digit either a 0 or 1.A bits is a binary digit either a 0 or 1. Byte: : A byte is a basic unit of memoryA byte is a basic unit of memory A sequence of 8 bits.A sequence of 8 bits. Word: A sequence of 16 bits or 2 bytes.

22

Memory• Essential component of computer, stores data, programs and

results.

• Three kinds of memory in modern computers:

1.Semiconductor 2.Magnetic 3.Optical memories

• Types of memories

1.Main memory 2.Secondary (Auxiliary) memory

ROM Memory

Static Memory

Memory

RAM Memory

Primary (Main) Memory(Immediate access store(IAS))

Masked ROM

Auxiliary (Secondary) Memory

DynamicMemory

PROM EROM EEROM

SemiconductorMemory

Magnetic Optical

RAMROM

HARDDISK

FLOPPYDISK

TAPE

CD-ROM

WORM

Memory:: Memory is a device where data Memory is a device where data and instructions are Stored and retrieve.and instructions are Stored and retrieve.

Types of Memory

1.Main memory(Immediate access store(IAS))

2.Secondary memoryMain memory: It is the place where the

data and instructions supplied by the input devices are stored.

It is a temporary because the data and instructions stored are eased when power cut off.

Primary memory is divided into a number of memory cells (bits) or bytes.

A bit (binary digit) is the smallest storage unit within a computer. It is a tiny electrical circuit that can be in one of two states:

A voltage high represented by the symbol 1

A voltage low represented by the symbol 0

Any system of symbols can be represented by bit or byte patterns.

Each byte has a unique integer address and it is usually 8 bits.

Types of Main memoryThere are two types of main

memory.1.RAM(random Access Memory)2.ROM(Read Only Memory) RAM: It is the read and write

memory. It is like a page notebook, where write something to or read something from.

Any memory location is accessed randomly for reading and writing.

It is a temporary because the data and instructions stored are eased when power Failure.

It is also known as Volatile Memory. It is Two Types 1.Static RAM 2.Dynamic RAMBoth are volatile

• Dynamic RAM made from MOS. Charge must be continually refreshed in order to maintain data. However, it is cheaper, more compact than Static RAM.

• Dynamic Ram used for most primary memory. Amount of data per chip has increased rapidly.

• Memory Access Time: The amount of time taken to produce data required from memory , from the start of access until the availability of data , is called memory access time.

=>Static RAM is expensive, but does not need to be refreshed, and is faster. Much smaller data capacity on a chip (~256k).=>Generally made using bipolar technology, although recently have developed MOS static RAM. =>SRAM is often used for cache memory, because of its faster access time

Rom: It is a permanent memory. The data is stored permanently and cannot be altered by the programmer. It is also known as Field Stores or Dead Stores.

Types of ROM1.PROM(Programmable Read-Only Memory):

It is initially empty. Later, the user can store programs ,data or any other information permanently. However, these programs cannot be erased once they are written to it.

2.EPROM(Erasable Programmable Read-Only Memory): The Contents stored in this can The Contents stored in this can be erased by exposing it to ultra violet light be erased by exposing it to ultra violet light source for about 10-20 minutes. source for about 10-20 minutes.

then it is programmed, that is new then it is programmed, that is new information can be stored.information can be stored.

3.EEPROM(Electrically Erasable Programmable Read-Only Memory): The contents stored in this can be The contents stored in this can be erased electrically. Later new erased electrically. Later new information is stored in it.information is stored in it.

It is also known as Flash Memory.It is also known as Flash Memory.

• DifferencesRAM holds the programs and data that the processor is actively working with.

ROM contains software that is used in Input/Output operations. It also contains software that loads the Operating System in Primary Memory.

The CPU can read and write to RAM but it can only read from ROM.

RAM is volatile while ROM is not.

Primary MemoryUNITUNIT SYMBOSYMBO

LLPOWEPOWER OF 2R OF 2

Number of Number of bytesbytes

ByteByte 0022

11

KilobyteKilobyte KBKB 1010

221,0241,024

MegabyteMegabyte MBMB 2020

221,048,5761,048,576

GigabyteGigabyte GBGB 3030

221,073,741,8241,073,741,824

TerabyteTerabyte TBTB 4040

221,099,511,627,1,099,511,627,776776

Primary and Secondary Memory Comparison

Primary memoryPrimary memory Secondary memorySecondary memory

Fast Fast

Expensive Expensive

Low capacity Low capacity

Connects directly to Connects directly to the processor the processor

Slow Slow

Cheap Cheap

Large capacity Large capacity

Not connected Not connected directly to the directly to the processor processor

35

Memory• The diagrams shown below represents the memory hierarchies as

per the speed of operation.

CPU

PrimaryMemory

SecondaryMemory

CacheMEM

PrimaryMemory

SecondaryMemory

CPU

Cache Memory: It is a high speed memory and It is a high speed memory and placed between the CPU and the main memory.placed between the CPU and the main memory.

=>Users cannot access this memory. it stores data and instructions that are currently to be executed.

=>Cache memory contains a copy of frequently used data/programs from main memory (ie it duplicates some contents). When the CPU attempts to read a word of memory , a cache controller checks to determine if the word is in cache.

=>If present then word delivered to CPU (called a hit); else (a miss) gets block from main memory and loads it into cache, preserving locality of execution.

=>Hit ratio is hits to total requests

• Caching and virtual memory are both used to improve cost/benefit performance of the memory hierarchy.

• Caching improves memory access speed to both primary and secondary storage by predicting next required instructions/data & storing it in faster memory (higher up hierarchy).

• Virtual memory increases primary memory capacity while decreasing cost by using secondary memory as though it was RAM (further down hierarchy)

Secondary Memory: secondary storage devices are used to store large amount of data permanently for long-term .

Types1.Floppy Disks2.Hard Disks 3.Magnetic tapes 4.Magnetic drum 5.CD-ROM

• Hard Disk: This is a high capacity storage device ranging from 1GB to Tera Bytes .

• Concentric circles on the magnetized surface of the magnetic disks are known as Tracks.

Each track is divided into 8 parts. Each of the 8 parts of a track is called a

Sector.Sectors: The Tracks on the disk surface are The Tracks on the disk surface are

divided into invisible segments known as divided into invisible segments known as sectors.sectors.

Cylinder: Similar numbered tracks Similar numbered tracks on different platters of a hard disk on different platters of a hard disk form a cylinder.form a cylinder.

Hard Disk Example

Hard Disk Layout

Platter

Track

Cylinder

Drivemotor

Headmotor

Head, onmoving arm

Block

Sector

Track

Head

Head assembly

Locating a Block of DataSeek Time Latency Time Transfer Rate

Desiredtrack

Seek

Head

TransferLatency

Note: Access time = seek time + latency

Magnetic Disks

• A magnetic substance is coated on a round surface

• The magnetic substance can be polarized in one of two directions with an electromagnet (“writing data”)

• The electromagnet can also sense the direction of magnetic polarization (“reading data”)

• Similar to a read/write head on a tape recorder (except the information is digital rather than analogue)

Floppy Disks

• Also called “flexible disks” or “diskettes”• The platter is “floppy”, or flexible (e.g.,

mylar)• Most floppy disk drives can hold one

diskette (two surfaces)• The diskette is removable• Typical rpm: 300, 360• Capacities: 700 KB to 1.4 MB (& up to 100

MB “zip” disks)

Floppy Disk Example

Writeprotect tab

Spindle

ShutterAccess window

Cutawayshowing disk

Case

Digital Video Disk or Digital Versatile Disk(DVD): DVD is a optical storage device .It DVD is a optical storage device .It store more information and transfer it to the store more information and transfer it to the computer very fast as a CD-ROM.computer very fast as a CD-ROM.

DVDs come in two Formats: DVDs come in two Formats: 1.DVD-Video Format1.DVD-Video Format 2.DVD_ROM Format.2.DVD_ROM Format. Blue Ray Disk(BD): It use a blue –violet It use a blue –violet

laser(450nm) is that it has a shorter wavelength laser(450nm) is that it has a shorter wavelength than a red laser(650 nm) , which makes it than a red laser(650 nm) , which makes it possible to focus the laser spot with even possible to focus the laser spot with even greater precision. It storage capacity 25 greater precision. It storage capacity 25 GB/50GB.GB/50GB.

InfraRed(IR)Ports: It sends or receive infrared signas from other device.

BlueTOOTH: It describes how mobile phones and PDA can connected through short range wireless connection . The maximam range is 10 meters.

Network Ports: It are used to enabled

Communications Between programs.Phone Ports: It is a port that allows

connecting telephone equipment with the computer sound card.

=> PS-2 Port: It stands for Personal System/2. A PS/2 port is an electrical receptacle or plug found on computers. It accepts a PS/2 cable with a mini – DIN connector, and is used to plug in a keyboard or mouse.

The World Wide WebOne of the more popular segments of the

Internet is the World Wide Web, also called the Web.

A Web page is a document that contains text, graphics, sound, and/or video and has built-in connections, or hyperlinks to other Web documents

A Web site is a related collection of Web pagesYou access and view Web pages using a

software program called a Web browserA Web page has a unique address, called a

Uniform Resource Locator (URL)A hyperlink is a virtual connection to another

place on the Web