Transcript

CIIT ATTOCK SADIA EJAZ

Introduction to computer & programming

Ms Sadia Ejaz

CS Department

CIIT ATTOCK SADIA EJAZ

Computer ? ?

CIIT ATTOCK SADIA EJAZ

The Four Equipment Functionsof a Computer System There are four main equipment functions of a

computer system:Input, Processing, Storage and Output

CIIT ATTOCK SADIA EJAZ

The Four Equipment Functionsof a Computer System Input – the component through which a user instructs a

computer about what to do Processor – the engine that processes the instructions given by

the user Memory – where the processor stores information that is

required during its computations Storage – where information that is required to be used much

later is stored Output – the component that communicates the results of a

computation to the user

CIIT ATTOCK SADIA EJAZ

Hardware/ Software Hardware - the "machinery" - computer

equipment - the CPU, the monitor, the keyboard, the mouse, the external speakers, the scanner, the printer, etc.  The physical, touchable parts of a computer system.

Software - the program instructions that make the computer do some task, such as word process, manage databases, play games, etc. 

CIIT ATTOCK SADIA EJAZ

Hard Copy/Soft Copy

Hard Copy - a paper printout of the program code or data displayed on the screen.

Soft Copy - copy of a program stored on a hard drive, diskette, or CD.  

Network - a hardware and software data communication system.  Usually a  group of computers that are linked to share memory and programs.

Control Unit - the unit inside of the CPU which "directs the traffic" - makes decisions.  It performs the functions of fetch, decode, execute, and store.

CIIT ATTOCK SADIA EJAZ

Data Structure Computer data is in what is called binary format. This means that

it is always a 0 or a 1. It only has these two states and must be in one of them.

There are several fundamental data units which include: Bit - A data unit which must be in one of the two binary states

described above. It is the smallest data unit that exists. Byte - 8 bits of data which has a possible value from 0 to 255. Word - Two bytes or 16 bits of data with a possible unsigned

value from 0 to 16535. Long word = 8 bytes = 64 bits Quad word = 16 bytes = 128 bits

CIIT ATTOCK SADIA EJAZ

Bits, Bytes

KB 210 = 1024

MB 220 (over 1 million)

GB 230 (over 1 billion)

TB 240 (over 1 trillion)

Unit Symbol Number of Bytes

kilobyte

megabyte

gigabyte

terabyte

CIIT ATTOCK SADIA EJAZ

All computers have the following essential hardware components:

INPUT PROCESSOR MEMORY

CIIT ATTOCK SADIA EJAZ

INPUT

The devices used to give the computer data or commands are called Input devices. Includes keyboard, mouse, scanner, etc

CIIT ATTOCK SADIA EJAZ

PROCESSOR

Central Processing Unit (CPU) The “brain” of the computer. This is the

component that actually executes instructions

Controls all other computer functions In PCs (personal computers) also called

the microprocessor or simply processor..

The processor is the logic of a computer

CIIT ATTOCK SADIA EJAZ

Processor

Pentium Celeron Athlon PowerPC StrongARM (PDA) SPARC (Workstations)

CIIT ATTOCK SADIA EJAZ

Arithmetic Logic Unit

It is the place where the actual execution of the instructions take place during the processing operation.

The data and instructions, stored in the primary storage before processing, are transferred as and when needed to the ALU, where processing takes place.

All ALU are designed to perform Four basic arithmetic operations Logic operations or comparisons, such as less than,

equal to, or greater than.

13

CIIT ATTOCK SADIA EJAZ

Control Unit

It acts as a central nervous system for the other components of the computer system.

It manages and coordinates the entire computer system.

It obtains instructions from the program stored in main memory, interprets the instructions, and issues signals, which cause other units of the system to execute them.

14

CIIT ATTOCK SADIA EJAZ

Storage Unit

Two types of storage: Primary Storage Secondary Storage

15

CIIT ATTOCK SADIA EJAZ

Main memory holds information such as computer programs, numeric data, or documents created by a word processor.

All programs must be brought into main memory before execution.

When power is turned off, everything in main memory is lost Main memory is made up of capacitors. If a capacitor is charged, then its state is said to be 1, or ON. We could also say the bit is set. If a capacitor does not have a charge, then its state is said to be

0, or OFF. We could also say that the bit is reset or cleared

Main Memory (Primary Storage)

CIIT ATTOCK SADIA EJAZ

Memory is divided into cells, where each cell contains 8 bits (a 1 or a 0). Eight bits is called a byte.

Each of these cells is uniquely numbered. The number associated with a cell is known

as its address. Main memory is volatile storage. That is, if

power is lost, the information in main memory is lost.

Main Memory (cont.)

CIIT ATTOCK SADIA EJAZ

Secondary Storage Media (Secondary Storage) Provides permanent storage for information Retains information even when power is off Examples of secondary storage:

Hard Disks (sequential access) Floppy Disks (sequential access) Tapes (sequential access) CD-ROMs (random access) DVDs (random access)

Secondary storage media store files that contain computer programs data other types of information

This type of storage is called persistent (permanent) storage because it is non-volatile.

CIIT ATTOCK SADIA EJAZ

Speed Primary storage is much faster to

access than secondary storage because of the proximity of the storage to the processor or because of the nature of the storage devices.

On the other hand, secondary storage can hold much more data than primary storage.

CIIT ATTOCK SADIA EJAZ

Hard disk Hard disk is a computer storage

device which saves and retrieves the data when required. Its capacity is much greater than the computer memory (RAM, ROM). Data on hard disk is stored.

Today we can save huge amount of data on a single hard disk. Now hard disks can contain several billion bytes.

CIIT ATTOCK SADIA EJAZ

CD A compact disc [sometimes spelled disk] (CD) is a small, portable, round medium for electronically recording, storing, and playing back audio, video, text, and other information in digital form.

CIIT ATTOCK SADIA EJAZ

Floppy disk A diskette is a random access, removable

data storage medium that can be used with personal computers.

The term usually refers to the magnetic medium housed in a rigid plastic cartridge measuring 3.5 inches square and about 2 millimeters thick. Also called a "3.5-inch diskette," it can store up to 1.44 megabytes (MB) of data.

CIIT ATTOCK SADIA EJAZ

DVD DVD (digital versatile disc) is an

optical disc technology that is expected to rapidly replace the CDROM disc (as well as the audio compact disc) over the next few years.

The digital versatile disc (DVD) holds 4.7 gigabyte of information on one of its two sides, or enough for a 133-minute movie.

CIIT ATTOCK SADIA EJAZ

Storage Devices - Other USB drive

Very popular – 64-512 MB Tape drive

Similar to cassette tape Used for backup

Zip drive 100 MB to 2 GB capacity Everyday use and backup

CIIT ATTOCK SADIA EJAZ

OUTPUT The devices to which the computer

writes data are called Output devices.

Often converts the data into a human readable form. Monitor and printer are output devices.

CIIT ATTOCK SADIA EJAZ

ROM ROM is "built-in" computer memory

containing data that normally can only be read, not written to.

ROM contains the programming that allows your computer to be "booted up" or regenerated each time

you turn it on. Unlike a computer's random access memory (RAM), the data in ROM is not lost when the computer power is turned off.

CIIT ATTOCK SADIA EJAZ

Types of ROM PROM

PROM stands for Programmable read only memory

In PROM chip , the user can write his own instructions but at once

If there is any error in writing the instruction the error can not removed from the PROM

The chip become unusable

CIIT ATTOCK SADIA EJAZ

Types of ROM EPROM

Stands for erasable programmable read only memory

User can erase a instruction if any any error occurred

EEPROM Stands for Electronically Erasable

Programmable Read Only memory

CIIT ATTOCK SADIA EJAZ

EXAMPLE

top related