an abacus. babbage’s analytical engine punched cards first used in jacquard loom (1801) to store...

Post on 12-Jan-2016

221 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

An AbacusAn Abacus

Babbage’s Analytical EngineBabbage’s Analytical Engine

Punched cardsPunched cards First used in Jacquard Loom (1801) to store patterns First used in Jacquard Loom (1801) to store patterns

for weaving clothfor weaving cloth Stored programs in Babbage’s Analytical EngineStored programs in Babbage’s Analytical Engine Popular through the 1970’sPopular through the 1970’s

Gear positionsGear positions

The Mark I computerThe Mark I computer

Modern Day PCModern Day PC

What’s a Comput-er ?What’s a Comput-er ?

Computer Science TerminologyComputer Science Terminology

Data:Data: Information served as input to Information served as input to programs and algorithms.programs and algorithms.

Algorithm:Algorithm: A set of steps that defines how A set of steps that defines how a task is performeda task is performed

Programming:Programming: Process of developing a Process of developing a programprogram

Program:Program: A representation of an algorithm A representation of an algorithm Hardware: Hardware: EquipmentEquipment

An Algorithm for River CrossingAn Algorithm for River Crossing

9 Men and 2 boys wish to cross a river using an inflatable raft that will at most carry either one man or the two boys. How many times must the boat cross the river to accomplish this goal?

Central Questions of Computer Central Questions of Computer ScienceScience

Computer ScienceComputer Science

The science of algorithmsThe science of algorithms Draws from other subjects, includingDraws from other subjects, including

MathematicsMathematics EngineeringEngineering PsychologyPsychology Business AdministrationBusiness Administration

Types of ComputersTypes of Computers

SupercomputersSupercomputers Mainframe computersMainframe computers MinicomputersMinicomputers MicrocomputersMicrocomputers

Page 10

Personal ComputersPersonal Computers

First used by hobbyistsFirst used by hobbyists IBM introduced the PC in 1981IBM introduced the PC in 1981

Accepted by businessAccepted by business Became the standard hardware design for most Became the standard hardware design for most

desktop computersdesktop computers Most PCs use software from MicrosoftMost PCs use software from Microsoft

Four Types of MicrocomputersFour Types of Microcomputers

DesktopDesktop

Notebook or laptopNotebook or laptop

Tablet PCTablet PC

Handheld Handheld

Page 11

What Makes Up a Computer?What Makes Up a Computer?

Page 11

What Makes Up a Computer?What Makes Up a Computer?

A computer consists of a central processing unit (CPU), memory, hard disk, floppy disk, monitor, printer, and communication devices.

CPU

e.g., Disk, CD, and Tape

Input Devices

e.g., Keyboard, Mouse

e.g., Monitor, Printer

Communication Devices

e.g., Modem, and NIC

Storage Devices

Memory

Output Devices

Bus

CPUCPUThe central processing unit (CPU) is the brain of a computer. It retrieves instructions from memory and executes them. The CPU speed is measured in megahertz (MHz), with 1 megahertz equaling 1 million pulses per second. The speed of the CPU has been improved continuously. If you buy a PC now, you can get an Intel Pentium 4 Processor at 3 gigahertz (1 gigahertz is 1000 megahertz).

CPU

e.g., Disk, CD, and Tape

Input Devices

e.g., Keyboard, Mouse

e.g., Monitor, Printer

Communication Devices

e.g., Modem, and NIC

Storage Devices

Memory

Output Devices

Bus

Central Processing UnitCentral Processing Unit

Central Processing Unit (CPU) or Central Processing Unit (CPU) or processorprocessor Arithmetic/Logic unit versus Control unitArithmetic/Logic unit versus Control unit RegistersRegisters

General purposeGeneral purpose Special purposeSpecial purpose

Mounted on the motherboardMounted on the motherboard Connected to other devices via busConnected to other devices via bus

CPU and main memory CPU and main memory connected via a busconnected via a bus

Speak Machine Speak Machine

Machine instruction:Machine instruction: An instruction (or An instruction (or command) encoded as a bit pattern of 0’s command) encoded as a bit pattern of 0’s and 1’s recognizable by the CPUand 1’s recognizable by the CPU

Machine language:Machine language: The set of all The set of all instructions recognized by a machineinstructions recognized by a machine

Machine Instruction TypesMachine Instruction Types

Data Transfer: copy data from one location Data Transfer: copy data from one location to anotherto another

Arithmetic/Logic: use existing bit patterns Arithmetic/Logic: use existing bit patterns to compute a new bit patternsto compute a new bit patterns

Control: direct the execution of the Control: direct the execution of the programprogram

Program ConceptProgram Concept

- A program is a set of machines - A program is a set of machines instructions arranged in a purposeful way instructions arranged in a purposeful way and stored in main memory. and stored in main memory.

- CPU can then extract the instructions - CPU can then extract the instructions and execute them. and execute them.

- Program is executable and can be - Program is executable and can be altered easily.altered easily.

MemoryMemoryMemory is to store data and program instructions for CPU to execute. A memory unit is an ordered sequence of bytes, each holds 8 bits. A program and its data must be brought to memory before they can be executed. A memory byte is never empty, but its initial content may be meaningless to your program. The current content of a memory byte is lost whenever new information is placed in it.

CPU

e.g., Disk, CD, and Tape

Input Devices

e.g., Keyboard, Mouse

e.g., Monitor, Printer

Communication Devices

e.g., Modem, and NIC

Storage Devices

Memory

Output Devices

Bus

Main Memory CellsMain Memory Cells

Cell:Cell: A unit of main memory (typically 8 bits A unit of main memory (typically 8 bits which is one which is one bytebyte))

How Data is Stored?How Data is Stored?Data of various kinds, such as numbers, characters, and strings, are Data of various kinds, such as numbers, characters, and strings, are encoded as a series of bits (zeros and ones). Computers use zeros and encoded as a series of bits (zeros and ones). Computers use zeros and ones because digital devices have two stable states, which are referred ones because digital devices have two stable states, which are referred to as to as 00 and and 11 by convention. by convention.

No two data can share or split a same byte. A byte is the minimum No two data can share or split a same byte. A byte is the minimum storage unit.storage unit.

.

.

.

2000

2001

2002

2003

2004

.

.

.

01001010

01100001

01110110

01100001

00000011

Memory content

Memory address

Encoding for character ‘J’ Encoding for character ‘a’ Encoding for character ‘v’ Encoding for character ‘a’ Encoding for number 3

Memory TerminologyMemory Terminology

Random Access Memory (RAM):Random Access Memory (RAM): Memory in which individual cells can be Memory in which individual cells can be easily accessed in any ordereasily accessed in any order

Dynamic Memory (DRAM):Dynamic Memory (DRAM): RAM RAM composed of volatile memorycomposed of volatile memory

Measuring Memory CapacityMeasuring Memory Capacity

Kilobyte:Kilobyte: 2 21010 bytes = 1024 bytes bytes = 1024 bytes Example: 3 KB = 3 Example: 3 KB = 3 × 1024 bytes× 1024 bytes Sometimes “kibi” rather than “kilo”Sometimes “kibi” rather than “kilo”

Megabyte:Megabyte: 2 22020 bytes = 1,048,576 bytes bytes = 1,048,576 bytes Example: 3 MB = 3 Example: 3 MB = 3 × × 1,048,576 bytes1,048,576 bytes Sometimes “megi” rather than “mega”Sometimes “megi” rather than “mega”

Gigabyte:Gigabyte: 2 23030 bytes = 1,073,741,824 bytes bytes = 1,073,741,824 bytes Example: 3 GB = 3 Example: 3 GB = 3 × × 1,073,741,824 bytes1,073,741,824 bytes Sometimes “gigi” rather than “giga”Sometimes “gigi” rather than “giga”

Mass StorageMass Storage

On-line versus off-lineOn-line versus off-line Typically larger than main memoryTypically larger than main memory Typically less volatile than main memoryTypically less volatile than main memory Typically slower than main memoryTypically slower than main memory

Storage DevicesStorage DevicesMemory is volatile, because information is lost when the power is off. Programs and data are permanently stored on storage devices and are moved to memory when the computer actually uses them. There are three main types of storage devices:Disk drives (hard disks and floppy disks), CD drives (CD-R and CD-RW), and Tape drives.

CPU

e.g., Disk, CD, and Tape

Input Devices

e.g., Keyboard, Mouse

e.g., Monitor, Printer

Communication Devices

e.g., Modem, and NIC

Storage Devices

Memory

Output Devices

Bus

A magnetic disk storage systemA magnetic disk storage system

Magnetic tape storageMagnetic tape storage

CD storageCD storage

Device CommunicationDevice Communication

Controller:Controller: An intermediary apparatus that An intermediary apparatus that handles communication between the computer handles communication between the computer and a deviceand a device Specialized controllers for each type of deviceSpecialized controllers for each type of device General purpose controllers (USB and FireWire)General purpose controllers (USB and FireWire)

Port:Port: The point at which a device connects to a The point at which a device connects to a computer computer

Controllers attached to a Controllers attached to a machine’s busmachine’s bus

Communication DevicesCommunication DevicesA regular modem uses a phone line and can transfer data in a speed up to 56,000 bps (bits per second). A DSL (digital subscriber line) also uses a phone line and can transfer data in a speed 20 times faster than a regular modem. A cable modem uses the TV cable line maintained by the cable company. A cable modem is as fast as a DSL. Network interface card (NIC) is a device to connect a computer to a local area network (LAN). The LAN is commonly used in business, universities, and government organizations. A typical type of NIC, called 10BaseT, can transfer data at 10 mbps (million bits per second).

CPU

e.g., Disk, CD, and Tape

Input Devices

e.g., Keyboard, Mouse

e.g., Monitor, Printer

Communication Devices

e.g., Modem, and NIC

Storage Devices

Memory

Output Devices

Bus

Data Communication RatesData Communication Rates

Measurement unitsMeasurement units Bps: Bits per secondBps: Bits per second Kbps: Kilo-bps (1,000 bps)Kbps: Kilo-bps (1,000 bps) Mbps: Mega-bps (1,000,000 bps)Mbps: Mega-bps (1,000,000 bps) Gbps: Giga-bps (1,000,000,000 bps)Gbps: Giga-bps (1,000,000,000 bps)

Bandwidth: Maximum available rateBandwidth: Maximum available rate

Output Devices: MonitorOutput Devices: MonitorThe monitor displays information (text and graphics). The resolution and dot pitch determine the quality of the display.

CPU

e.g., Disk, CD, and Tape

Input Devices

e.g., Keyboard, Mouse

e.g., Monitor, Printer

Communication Devices

e.g., Modem, and NIC

Storage Devices

Memory

Output Devices

Bus

Bits and Bit PatternsBits and Bit Patterns

Bit:Bit: Binary Digit (0 or 1) Binary Digit (0 or 1) Bit Patterns are used to represent Bit Patterns are used to represent

information.information. NumbersNumbers Text charactersText characters ImagesImages SoundSound And othersAnd others

The Binary SystemThe Binary System

The traditional decimal system is based on The traditional decimal system is based on powers of 10.powers of 10.

The Binary system is based on powers of The Binary system is based on powers of 2.2.

Number SystemsNumber Systems

0, 1

0, 1, 2, 3, 4, 5, 6, 7

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

binarybinary

octaloctal

decimaldecimal

hexdecimalhexdecimal

top related