28
1 Introduction to Computers We will learn : Components of Computer: Ha rdware vs Software. Components of Hardware: CP U, Memory, Storage, Input/Out put Devices.

Introduction to Computers … We will learn : Components of Computer: Hardware vs Software

Embed Size (px)

DESCRIPTION

Introduction to Computers … We will learn : Components of Computer: Hardware vs Software. Components of Hardware: CPU, Memory, Storage, Input/Output Devices. Components of Software: Operating System and Application Programs. STORAGE structure. The Big Picture - PowerPoint PPT Presentation

Citation preview

1

Introduction to Computers…

• We will learn :• Components of Computer: Hardware vs Software.• Components of Hardware: CPU, Memory, Storage, Input/Output Devices.• Components of Software: Operating System and Application Programs.• STORAGE structure.

2

The Big Picture

A computer system contains:• hardware (equipment)• software (programs)• people (programmers and end-users)

3

Hardware: The Physical

Components of a Computer

Secondary storage

device stores dataand programs

Input device

Sends data tothe centralprocessingunit

Output device

makes processeddata (information)available

Secondary storage

Processing

Input Output

Central processingunit (CPU)executes computer instructions

memory holds data andprograms temporarily

4

A computer is a machine that canbe programmed to

• accept data• process it into useful information• store it away for safekeeping and later use

5

Processing Unit

Processing Unit is composed of

• Central Processing

Unit (CPU) that

executes program.

• Main Memory that

stores program and

data.

6

7

Main Memory: Structure• Ordered sequence of storage locations called memory cells.• Each memory cell is identified by a unique address.• The data stored in a memory cell is its content.• One can either read a memory cell or write to a memory cell.

8

Main Memory: Data Represe ntation in Memory Cells

• Data represented as binar y numbers (i.e. base2)

which are collections of1 s and0s.• Here1 and 0 correspo

nd to two different levels of voltage in electrical impl

ementation of the memory. For example:

0 0 Volts 1

5 Volts.• 1 or0 is a binary digit,

which is abbreviated as bit.• Each memory cell can hold

a binary number with 8 bits which is calle

d a byte.

9

Main Memory: Operations

READ

WRITE

CPU

CPU

MEMORY

MEMORY

AddressData

AddressData

10

Main Memory: Memory Sizes 1 byte = 8 bits. 1 2kilobyte = 10 or 1024 bytes. 1 2Megabyte = 20 105

4 8 ,7 8 6 bytes. 1 2Gigabyte = 30 1073

741824, , bytes. Typical PC Main Memory is

2 5 6 Megabyte to 4 2004Gigabyte. (as of year )

11

Storage• Primary storage (or memo

ry) holds programs and data tempor

arily: Main Memory.• Secondary storage device

s such as disks store data and programs.

12

Secondary Storage• Secondary storage has m

ore size than Main Memory (i.e. Primary Memory).• II II III-IIIIIIIII I III II

u power down the computer data is not lost.• I I III IIIIIIIII IIIIII

e t o st or e our programs and data that w

e want to save.

13

Software: Telling the Machine Wha

t to Do• - Software the planned, st

- - ep by step set of instructions required to tu

rn data into information.• Divided principally into sy

stems and applications.

14

Hardware & Software: Structure

• Hardware• Operating System• Application Programs• I III

15

Software: Operating System

• Controls the interaction of the computer with its

environment (including user).• Management of memory,

processor time and other resources for varioustasks.• Execute and provide servi

ces for applications.• Examples: Windows 2000,

Unix, Linux,…

16

Software: Applications Software

• Programs designed to perform specific tasks andf unct i ons. Examples: Matlab, Excel, Microsoft Word, and many more….• Often found in the mass market as• packaged software or• commercial software

17

Software: Organization (Files, Folders, Drives, Path)• Your computer’s filing sys tem has three basic divisions: files, folders and

dr i ves• Everything saved on you r computer is stored as a file• You can store a file in a f older (called “directory” un der UNIX) , and in turn stor e that folder inside another folder. Your computer also stores files in folders. Whe n computer needs one of t hose files, it follows a path to the folder, and then to t he file.• IIIII III IIIIIII III IIII ed on drives . Each drive is assigned a letter name. Ha rd drive (C:\), floppy drive ( - A:\), CD ROM drive, networ kdrive, et c.

18

Software Organization

Disk Drive

Files

Files

Files

Folders Fol

ders Fol

ders

19

Software:Organization Examples• Disk Drives under My Com

puter (Windows)

20

Software: Organization Examples

• - Example CD ROM Drive C ontents: Files and

Folders

21

Software : OrganizationExamples

• Example Folder (A folder - of the CD ROM in the

previous slide.)

22

23

Programming Languages

• A programming language is a set of rules that

provides a way of telling a computer what

operations to perform.• There are several levels (

or “generations”) of programming languages:• -High level• Assembly• Machine

24

- High Level Language• - High level languages use

- English like words that are much easier for hu

mans to understand.• A translator is needed to

-convert the high level language into machine lan

guage that computersunderstand.• There are several langua

ges that you can use to write programs:

• FORTRAN • COBOL •RPG

• BASIC • Pascal •VB

• C • C++ • C#

• Per l • Java • ..?...

25

Assembly Language• Assembly languages are

written using mnemonic codes and ass

emblers replace mnemonic codes with 0s

and 1s to create machine code.• Since machine language i

s the only language the computer can execute , assembly language

is eventually translated in to machine language

to execute the program.

26

Machine Language• This is the lowest level ofprogramming language because it repre

sent s dat a and program instructions as 0s

and 1s.• All programs written in difIIIIII IIIIIII I III languages are eventually

conver t ed i nt o machine language.

27

Example for a = a + b

28

Compiler, linker, loader…

Source File(Text)

Other Object Files (binary)

Library

Compiler

Linker

Loader

Object File (binary)

Executable File (binary)

Input

Results