an abacus

38
An Abacus An Abacus

Upload: kevlyn

Post on 16-Jan-2016

13 views

Category:

Documents


0 download

DESCRIPTION

An Abacus. Babbage’s Analytical Engine. Punched cards First used in Jacquard Loom (1801) to store patterns for weaving cloth Stored programs in Babbage’s Analytical Engine Popular through the 1970’s Gear positions. The Mark I computer. Modern Day PC. What’s a Comput-er ?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: An Abacus

An AbacusAn Abacus

Page 2: An 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

Page 3: An Abacus

The Mark I computerThe Mark I computer

Page 4: An Abacus

Modern Day PCModern Day PC

Page 5: An Abacus

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

Page 6: An Abacus

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

Page 7: An Abacus

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?

Page 8: An Abacus

Central Questions of Computer Central Questions of Computer ScienceScience

Page 9: An Abacus

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

Page 10: An Abacus

Types of ComputersTypes of Computers

SupercomputersSupercomputers Mainframe computersMainframe computers MinicomputersMinicomputers MicrocomputersMicrocomputers

Page 10

Page 11: An Abacus

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

Page 12: An Abacus

Four Types of MicrocomputersFour Types of Microcomputers

DesktopDesktop

Notebook or laptopNotebook or laptop

Tablet PCTablet PC

Handheld Handheld

Page 11

Page 13: An Abacus

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

Page 11

Page 14: An Abacus

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

Page 15: An Abacus

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

Page 16: An Abacus

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

Page 17: An Abacus

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

Page 18: An Abacus

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

Page 19: An Abacus

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

Page 20: An Abacus

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.

Page 21: An Abacus

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

Page 22: An Abacus

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))

Page 23: An Abacus

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

Page 24: An Abacus

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

Page 25: An Abacus

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”

Page 26: An Abacus

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

Page 27: An Abacus

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

Page 28: An Abacus

A magnetic disk storage systemA magnetic disk storage system

Page 29: An Abacus

Magnetic tape storageMagnetic tape storage

Page 30: An Abacus

CD storageCD storage

Page 31: An Abacus

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

Page 32: An Abacus

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

Page 33: An Abacus

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

Page 34: An Abacus

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

Page 35: An Abacus

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

Page 36: An Abacus

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

Page 37: An Abacus

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.

Page 38: An Abacus

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