Introduction to Computer and Programming - Lecture 02

Post on 05-Dec-2014

461 views 1 download

description

 

Transcript of Introduction to Computer and Programming - Lecture 02

1

Introduction to Computers and Programming (CSC103)

Lecture 02

The System Unit

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

2

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

The System Unit

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

– A computer chip contains integrated circuits (IC)

4

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

Pro

cess

or

6

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

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

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

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

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

12

Figure: Moore’s Law

Processor

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

• Require additional cooling

– Heat sinks

– Liquid cooling technology

13

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

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

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

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

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

Storage

19

Storage

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

20

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

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

Hard Disks

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

23

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

25

Hard Disks

26

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

Hard Disks

28