28
1 Introduction to Computers and Programming (CSC103) Lecture 02

Introduction to Computer and Programming - Lecture 02

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Introduction to Computer and Programming - Lecture 02

1

Introduction to Computers and Programming (CSC103)

Lecture 02

Page 2: Introduction to Computer and Programming - Lecture 02

The System Unit

• The system unit is a case that contains electronic components of the computer used to process data

2

Page 3: Introduction to Computer and Programming - Lecture 02

The System Unit

• The inside of the system unit on a desktop personal computer includes:

3

Drive bay(s)

Power supply

Sound card

Video card

Processor

Memory

Page 4: Introduction to Computer and Programming - Lecture 02

The System Unit

• The motherboard is the main circuit board of the system unit

– A computer chip contains integrated circuits (IC)

4

Page 5: Introduction to Computer and Programming - Lecture 02

Processor

• The processor, also called the central processing unit (CPU), interprets and carries out the basic instructions that operate a computer

– Contain a Control Unit and an Arithmetic Logic Unit (ALU)

5

Page 6: Introduction to Computer and Programming - Lecture 02

Pro

cess

or

6

Page 7: Introduction to Computer and Programming - Lecture 02

Processor

• The control unit is the component of the processor that directs and coordinates most of the operations in the computer

– Interprets each instruction issued by a program and then initiates the appropriate action (to carry out the instruction)

• The arithmetic logic unit (ALU) performs arithmetic, comparison, and other operations

7

Page 8: Introduction to Computer and Programming - Lecture 02

Processor – Machine Cycle

• For every instruction, a processor repeats a set of four basic operations, which comprise a machine cycle

1. Fetch

2. Decode

3. Execute

4. Store

8

Page 9: Introduction to Computer and Programming - Lecture 02

Processor

The processor contains registers, that temporarily hold data and instructions

• Registers are part of the Processor

• Processor has many different type of registers

• Register function includes; storing location, storing instruction, storing data and storing results of a calculation

The system clock controls the timing of all computer operations

• The pace of the system clock is called the clock speed, and is measured in gigahertz (GHz)

• Giga = Billion, Hertz = one cycle per second

• Faster the clock speed, more instructions can be executed per second

9

Page 10: Introduction to Computer and Programming - Lecture 02

Dual Core and Multi-Core Processors

• Dual-Core Processor is a single chip that contains two separate processors

• Multi-Core Processor is a chip with two or more separate processors

– Implements multiprocessing into a single physical package

– Quad-Core Processor contains four (4) cores

10

Page 11: Introduction to Computer and Programming - Lecture 02

Moore’s Law

• Number of transistors and resistors placed on computer chips would double every year

– With a proportional increase in computing power and decrease in cost

11

Page 12: Introduction to Computer and Programming - Lecture 02

12

Figure: Moore’s Law

Page 13: Introduction to Computer and Programming - Lecture 02

Processor

• A processor chip generates heat that could cause the chip to burn up

• Require additional cooling

– Heat sinks

– Liquid cooling technology

13

Page 14: Introduction to Computer and Programming - Lecture 02

Memory

• Memory consists of electronic components that store instructions waiting to be executed by the processor, data needed by those instructions, and the results of processing the data

• Stores three basic categories of items:

14

The operating system and other system software

Application programs

Data being processed and the

resulting information

Page 15: Introduction to Computer and Programming - Lecture 02

Memory

• Each location in memory has an address

• Byte is the basic storage unit in memory

• Memory size is measured in kilobytes (KB or K), megabytes (MB), gigabytes (GB), or terabytes (TB)

15

Page 16: Introduction to Computer and Programming - Lecture 02

Memory

• The system unit contains two types of memory:

16

Volatile memory

Loses its contents when power is turned off

Example includes RAM

Nonvolatile memory

Does not lose contents when power is removed

Examples include ROM, flash memory, and

CMOS

Page 17: Introduction to Computer and Programming - Lecture 02

Memory – RAM

• RAM (Random Access Memory) is also called main memory

• Consists of memory chips that can be read from and written to by the processor and other devices

• When you turn on computer

– Certain Operating System files are loaded into RAM from a storage device such as a hard disk

• Saving is the process of copying data, instructions and information from RAM to a storage device

17

Page 18: Introduction to Computer and Programming - Lecture 02

Storage

Storage holds data, instructions, and information for future use

A storage medium is the physical material on which a computer keeps data, instructions, and information

18

Page 19: Introduction to Computer and Programming - Lecture 02

Storage

19

Page 20: Introduction to Computer and Programming - Lecture 02

Storage

• Capacity is the number of bytes a storage medium can hold

20

Page 21: Introduction to Computer and Programming - Lecture 02

Storage

• A storage device is the computer hardware that records and/or retrieves items to and from storage media

21

Reading is the process of transferring items from a storage medium into memory

Writing is the process of transferring items from memory to a storage medium

Page 22: Introduction to Computer and Programming - Lecture 02

Storage

• Access time measures:

– The amount of time it takes a storage device to locate an item on a storage medium

• In milliseconds or microseconds

• Measured in KBps and MBps

– The time required to deliver an item from memory to the processor

• In nanoseconds

22

Page 23: Introduction to Computer and Programming - Lecture 02

Hard Disks

• A hard disk contains one or more inflexible, circular platters that use magnetic particles to store data, instructions, and information

23

Page 24: Introduction to Computer and Programming - Lecture 02

Hard Disks

• Characteristics of a hard disk include:

24

Capacity Platters Read/Write

Heads Cylinders

Sectors and Tracks

Revolutions per Minute

Transfer Rate Access Time

Page 25: Introduction to Computer and Programming - Lecture 02

25

Page 26: Introduction to Computer and Programming - Lecture 02

Hard Disks

26

Page 27: Introduction to Computer and Programming - Lecture 02

Hard Disks

• The hard disk arms move the read/write head, which reads items and writes items in the drive

– Location often is referred to by its cylinder

27

Page 28: Introduction to Computer and Programming - Lecture 02

Hard Disks

28