mathematics department1 chapter 3 computer hard ware

42
Mathematics Department 1 Chapter 3 Chapter 3 Computer Hard ware Computer Hard ware

Upload: lorraine-hubbard

Post on 22-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mathematics Department1 Chapter 3 Computer Hard ware

Mathematics Department 1

Chapter 3Chapter 3Computer Hard wareComputer Hard ware

Page 2: Mathematics Department1 Chapter 3 Computer Hard ware

• A computer performs basically five major operations :

1. it accepts data or instructions by any way of input,

2. it stores data, 3. it can process data as required by the user, 4. it gives results in the form of output, and 5. it controls all operations inside a computer

Mathematics Department 2

Page 3: Mathematics Department1 Chapter 3 Computer Hard ware

Computer Hardware

• Refers to the physical components• Not one device but a system of many devices• Major types of components include:

– Central Processing Unit– Main memory– Secondary storage devices– Input devices– Output devices

Slide 1 -3

Page 4: Mathematics Department1 Chapter 3 Computer Hard ware

Organization of a Computer System

Slide 1 -4

CentralProcessing

Unit

MainMemory

InputDevice

OutputDevice

SecondaryStorage

Page 5: Mathematics Department1 Chapter 3 Computer Hard ware

The CPU

• Fetches instructions from main memory• Carries out the operations commanded by the

instructions• Each instruction produces some outcome• A program is an entire sequence of instructions• Instructions are stored as binary numbers• Binary number - a sequence of 1’s and 0’s

Slide 1 -5

Page 6: Mathematics Department1 Chapter 3 Computer Hard ware

Main Memory

• Commonly known as random access memory, or just RAM

• Holds instructions and data needed for programs that are currently running

• RAM is usually a volatile type of memory• Contents of RAM are lost when power is

turned off

Slide 1 -6

Page 7: Mathematics Department1 Chapter 3 Computer Hard ware

Secondary Storage• A nonvolatile storage medium• Contents retained while power is off• Hard disk drives are most common

– Records data magnetically on a circular disk– Provides fast access to large amounts of data

• Optical devices store data on CD’s as pits• USB flash memory devices

– High capacity device plugs into USB port– Portable, reliable, and fits easily in a pocket

Slide 1 -7

Page 8: Mathematics Department1 Chapter 3 Computer Hard ware

Input Devices

• Any type of device that provides data to a computer from the outside world

• For example:– Keyboard– Mouse– Scanner

Slide 1 -8

Page 9: Mathematics Department1 Chapter 3 Computer Hard ware

Output Devices

• Any type of device that provides data from a computer to the outside world

• Examples of output data:– A printed report– An image such as a picture– A sound

• Common output devices include:– Monitor (display screen)– Printer

Slide 1 -9

Page 10: Mathematics Department1 Chapter 3 Computer Hard ware

Knowing About: Computer Hardware

• Evolution of hardware– 1950s: all hardware units were built using relays and vacuum tubes– 1960s: introduction of transistors– mid-1960s: introduction of integrated circuits (ICs)– Present computers: use of microprocessors

• Bit: smallest and most basic data item in a computer; represents a 0 or a 1• Byte: a grouping of eight bits

– E.g., 00010001– What does this represent?

• Word: a grouping of one or more bytes

Slide 1 -10

Page 11: Mathematics Department1 Chapter 3 Computer Hard ware

(Low-Level) Languages

• Low-level languages– First-generation and second-generation languages– Machine-dependent languages– The underlying representation the machine actually understands

• First-generation languages– Also referred to as machine languages– Consist of a sequence of instructions represented as binary

numbers– E.g.: Code to ADD might be 1001 . To add 1+0 and then 1+1

our program might look like this:• 1001 0001 0000• 1001 0001 0001

Slide 1 -11

Page 12: Mathematics Department1 Chapter 3 Computer Hard ware

(Low-Level) Languages• Second-generation languages

– Also referred to as assembly languages– Abbreviated words are used to indicate operations– Allow the use of decimal numbers and labels to indicate

the location of the data• Assemblers

– Programs that translate assembly language programs into machine language programs

– Our add program now looks like:• ADD 1,0• ADD 1,1

Slide 1 -12

1001 0001 00001001 0001 0001

Assembler

Page 13: Mathematics Department1 Chapter 3 Computer Hard ware

(High-Level) Languages• High-level languages

– Third-generation and fourth-generation languages– Programs can be translated to run on a variety of computer

types• Third-generation languages

– Procedure-oriented languages– Object-oriented languages

• Our Add program might now look like:

sum = value1 + value2

Slide 1 -13

1001 0001 00001001 0001 0001

Compiler

Page 14: Mathematics Department1 Chapter 3 Computer Hard ware

Third-Generation and Fourth-Generation (High-Level) Languages

(Continued)

Slide 1 -14

The Evolution of Programming Languages

Page 15: Mathematics Department1 Chapter 3 Computer Hard ware

Third-Generation and Fourth-Generation (High-Level) Languages

• Procedure-oriented languages– Programmers concentrate on the procedures used in

the program– Procedure: a logically consistent set of instructions

which is used to produce one specific result• Object-oriented languages

– Items are represented using self-contained objects– Often used for graphical windows environments,

ability to re-use code efficiently

Slide 1 -15

Page 16: Mathematics Department1 Chapter 3 Computer Hard ware

1- Input units • This units are used for the process of entering

data and programs in to the computer system. • The input unit takes data from us to the

computer in an organized manner for Processing.

• Examples of input units : Mouse, Modem, Keyboard, Net card, Camera, microphone, CD, DVD,HD

Mathematics Department 16

Page 17: Mathematics Department1 Chapter 3 Computer Hard ware

2. Storage• The process of saving data and instructions

permanently is known as storage.

• All data and instructions are stored before and after processing

• Intermediate results of processing are also stored here.

Mathematics Department 17

Page 18: Mathematics Department1 Chapter 3 Computer Hard ware

CPU ComponentsCPU Components

• Two typical components of a CPU are:

• The arithmetic logic unit (ALU), which performs arithmetic and logical operations.

• The control unit (CU), which extracts instructions from memory and decodes and executes them, calling on the ALU when necessary.

Mathematics Department 18

Page 19: Mathematics Department1 Chapter 3 Computer Hard ware

ALU• The actual processing of the data and

instruction are performed by Arithmetic Logical Unit

• The major operations performed by the ALU are addition, subtraction, multiplication, division, logic and comparison.

• Data is transferred to ALU from storage unit when required

Mathematics Department 19

Page 20: Mathematics Department1 Chapter 3 Computer Hard ware

Control Unit (CU) • The Control Unit acts like the supervisor

• It extracts instructions from memory and decodes and executes them, and sends the necessary signals to the ALU to perform the operation needed.

• The control unit determines the sequence in which computer programs and instructions are executed.

• Processing of programs stored in the main memory, interpretation of the instructions and issuing of signals for other units of the computer to execute them. Mathematics Department 20

Page 21: Mathematics Department1 Chapter 3 Computer Hard ware

4- Output Units4- Output Units This is the process of producing results from

the data for getting useful information. The output is also stored inside the computer

for further processing. Examples of output units: Screen, printers,

plotters, net card,..

Mathematics Department 21

Page 22: Mathematics Department1 Chapter 3 Computer Hard ware

Physical computer components

• 1. Central Processing Unit (CPU)

• 2. Computer Memory (RAM and ROM)

• 3. Data bus 4. Ports

• 5. Motherboard 6. Hard disk

• 7. Output Devices

• 8. Input Devices

Mathematics Department 22

Page 23: Mathematics Department1 Chapter 3 Computer Hard ware

MEMORY • There are two kinds of computer memory: primary

and secondary.

• Primary memory is accessible directly by the processing unit.

• RAM (Random access memory) is an example of primary memory

• As soon as the computer is switched off the contents of RAM is lost.

• You can store and retrieve data much faster with primary memory compared to secondary memory

Mathematics Department 23

Page 24: Mathematics Department1 Chapter 3 Computer Hard ware

• Secondary memory such as floppy disks ,hard magnetic disk, etc., is located inside and outside the computer.

• Primary memory is more expensive than secondary memory.

• The size of primary memory is less than that of secondary memory.

• Primary memory is faster than secondary memory.

Mathematics Department 24

Page 25: Mathematics Department1 Chapter 3 Computer Hard ware

Memory is used to store:• i) instructions to execute a program and• ii) data. When the computer is doing

any job, the data that have to be processed are stored in the primary memory. This data may come from an input device like keyboard or from a secondary storage device like a floppy disk.

Mathematics Department 25

Page 26: Mathematics Department1 Chapter 3 Computer Hard ware

• In computer’s memory both programs and data are stored in the binary form

• The binary system has only two values (bits ) 0 and 1.

• Each of RAM’s locations stores one byte ) 8 bits)• (1 kilobyte is 1024 bytes) • (1Megabyte is 1024 kilobytes)• (1 terabyte is 1024 megabytes) • Thus 64 kilobyte (KB) memory is capable of

storing 64 X 1024 = 32,767 bytes

Mathematics Department 26

Capacity of Primary Capacity of Primary MemoryMemory

Page 27: Mathematics Department1 Chapter 3 Computer Hard ware

• Each cell of memory contains one character or 1 byte of data

• Primary storage is referred to as random access memory (RAM) because it is possible to randomly select and use any location of the memory directly store and retrieve data. It takes same time to any address of the memory as the first address.

• It is also called read/write memory

Mathematics Department 27

Page 28: Mathematics Department1 Chapter 3 Computer Hard ware

• The storage of data and instructions inside the primary storage is temporary.

• It disappears from RAM as soon as the power to the computer is switched off.

• The memories, which loose their content on failure of power supply, are known as volatile memories

Mathematics Department 28

Page 29: Mathematics Department1 Chapter 3 Computer Hard ware

Read Only Memory (ROM)

• There is another memory in computer, which is called Read Only Memory (ROM).

• The storage of program and data in the ROM is permanent.

• The ROM stores some standard processing programs supplied by the manufacturers to operate the computer.

• The ROM can only be read by the CPU but it cannot be changed.

Mathematics Department 29

Page 30: Mathematics Department1 Chapter 3 Computer Hard ware

• The basic input/output program is stored in the ROM that examines and initializes various equipment attached to the PC when the switch is made ON.

• The memories, which do not loose their content on failure of power supply, are known as non-volatile memories.

• ROM is non-volatile memory.

Mathematics Department 30

Page 31: Mathematics Department1 Chapter 3 Computer Hard ware

• PROM is another type of primary memory in computer, which is called Programmable Read Only Memory (PROM).

• You know that it is not possible to modify or erase programs stored in ROM, but it is possible for you to store your program in PROM chip. Once the programmes are written it cannot be changed and remain intact even if power is switched off.

• Programs or instructions written in PROM or ROM cannot be erased or changed.

Mathematics Department 31

Page 32: Mathematics Department1 Chapter 3 Computer Hard ware

• EPROM: Erasable Programmable Read Only Memory, which over come the problem of PROM & ROM.

• EPROM chip can be programmed time and again by erasing the information stored earlier in it.

• When the EPROM is in use information can only be read.

Mathematics Department 32

Page 33: Mathematics Department1 Chapter 3 Computer Hard ware

Cache Memory• The speed of CPU is extremely high compared to

the access time of main memory.

• Therefore the performance of CPU decreases due to the slow speed of main memory.

• Cache Memory is a small memory chip is attached between CPU and Main memory whose access time is very close to the processing speed of CPU.

• CACHE memories are accessed much faster than conventional RAM. It is used to store programs or data currently being executed or temporary data

Mathematics Department 33

Page 34: Mathematics Department1 Chapter 3 Computer Hard ware

Registers:

• The CPU processes data and instructions with high speed, there is also movement of data between various units of computer.

• It is necessary to transfer the processed data with high speed.

• So the computer uses a number of special memory units called registers.

• They are not part of the main memory but they store data or information temporarily and pass it on as directed by the control unit.

Mathematics Department 34

Page 35: Mathematics Department1 Chapter 3 Computer Hard ware

auxiliary memoryauxiliary memory or or secondary storagesecondary storage

• 1-Hard Disk, in computer science, one or more inflexible platters coated with material that allows the magnetic recording of computer data.

• Hard disks provide faster access to data than floppy disks and are capable of storing much more information. Because platters are rigid, they can be stacked so that one hard-disk drive can access more than one platter.

• Most hard disks have from two to eight platters.

Mathematics Department 35

Page 36: Mathematics Department1 Chapter 3 Computer Hard ware

• Magnetic Tape: Magnetic tapes are used for large computers like mainframe computers where large volume of data is stored for a longer time

• Floppy Disk: It is similar to magnetic disk discussed above. They are 5.25 inch or 3.5 inch in diameter. They come in single or double density and recorded on one or both surface of the diskette. The capacity of a 5.25-inch floppy is 1.2 mega bytes whereas for 3.5 inch floppy it is 1.44 mega bytes.

Mathematics Department 36

Page 37: Mathematics Department1 Chapter 3 Computer Hard ware

• floppy disk * small magnetic data storage disk: a small

flexible magnetically coated disk in a rigid plastic case on which data can be stored or retrieved by a computer

* a regular floppy disk holds approximately 1.44 megabytes.

Mathematics Department 37

Page 38: Mathematics Department1 Chapter 3 Computer Hard ware

CD- ROM• CD-ROM, short for compact disc read-only memory,

a rigid plastic disk that stores a large amount of data through the use of laser optics technology.

• Because they store data optically, CD-ROMs have a much higher memory capacity than computer disks that store data magnetically.

• However, CD-ROM drives, the devices used to access information on CD-ROMs, can only read information from the disc, not write to it.

• CD-ROMs can store large amounts of data and so are popular for storing databases and multimedia material. The most common format of CD-ROM holds approximately 630 megabytes .

Mathematics Department 38

Page 39: Mathematics Department1 Chapter 3 Computer Hard ware

INPUT OUTPUT DEVICES • When you work with the computer you feed your

data and instructions through some devices to the computer. These devices are called Input devices.

• Input Devices: Keyboard, Mouse, Scanner, Optical Character Recognition (OCR)

• Output Devices • Visual Display Unit: The most popular

input/output device is the Visual Display Unit (VDU). It is also called the monitor

Mathematics Department 39

Page 40: Mathematics Department1 Chapter 3 Computer Hard ware

• Terminals: It is a very popular interactive input-output unit.

• It can be divided into two types: hard copy terminals and soft copy terminals. A hard copy terminal provides a printout on paper whereas soft copy terminals provide visual copy on monitor.

• A terminal when connected to a CPU sends instructions directly to the computer.

Mathematics Department 40

Page 41: Mathematics Department1 Chapter 3 Computer Hard ware

Printer• It is an important output device which can

be used to get a printed copy of the processed text or result on paper.

• There are different types of printers that are designed for different types of applications.

• Depending on their speed and approach of printing, printers are classified as impact and non-impact printers.

Mathematics Department 41

Page 42: Mathematics Department1 Chapter 3 Computer Hard ware

• Impact printers use the familiar typewriter approach of hammering a typeface against the paper and inked ribbon.

• Dot-matrix printers are of this type. • Non-impact printers do not hit or impact a

ribbon to print. • They use electro-static chemicals and ink-jet

technologies. • Laser printers and Ink-jet printers are of this

type.• This type of printers can produce color printing

and elaborate graphics. Mathematics Department 42