module 5 hardware. what computers do receive input process information produce output store...

71
Module 5 Module 5 Hardware Hardware

Upload: tyra-craddock

Post on 15-Dec-2015

224 views

Category:

Documents


0 download

TRANSCRIPT

Module 5Module 5

HardwareHardware

What Computers DoWhat Computers Do

Receive Input

Process Information

Produce Output

Store InformationStore Information

4 Primary Components of a Computer4 Primary Components of a Computer

Input Device

s

Storage Devices

Output Devices

Processing

Secondary

- hard disks

- removable disks

- CDs

- tapes

- keyboard

- mouse

- scanner

- digital camera

- touchpad

-CPU

-Control Unit

-Arithmetic & Logic Unit

- monitor

- printer

- speakers

Primary

- memory

- RAM

- ROM

Processing - CPUProcessing - CPU ““Central Processing Unit”Central Processing Unit” http://www.howstuffworks.com/microprocessor1.htm http://www.howstuffworks.com/microprocessor1.htm

evolution of processorsevolution of processors

the “brains” of the computer, where the “brains” of the computer, where calculations take placecalculations take place

two parts:two parts: ALU - Arithmetic Logic UnitALU - Arithmetic Logic Unit

• electronic circuitry that does all electronic circuitry that does all arithmetic and logic operationsarithmetic and logic operations

Control UnitControl Unit• circuitry that directs all other parts circuitry that directs all other parts

of the computerof the computer

Input DevicesInput Devices

accept input from the outside accept input from the outside world.world.

most common is the most common is the keyboardkeyboard, , followed by the followed by the mousemouse

sends signals to the computer, sends signals to the computer, telling it what you’ve “told” ittelling it what you’ve “told” it

Output DevicesOutput Devices

sends output to the outside worldsends output to the outside world

converts and displays the converts and displays the computer’s internal bit patterns to computer’s internal bit patterns to a format that humans can a format that humans can understandunderstand

Main output devices areMain output devices are monitors for immediate visual outputmonitors for immediate visual output printers for permanent paper outputprinters for permanent paper output

Screen OutputScreen Output

A monitor or video display terminal (VDT) A monitor or video display terminal (VDT) displays characters, graphics, displays characters, graphics, photographic images, animation and photographic images, animation and video.video. Video adapterVideo adapter —connects the monitor to the —connects the monitor to the

computercomputer VRAMVRAM or video memory—a special portion of or video memory—a special portion of

RAM to hold video images (the more video RAM to hold video images (the more video memory, the more detail of a picture memory, the more detail of a picture displayed)displayed)

Screen TalkScreen Talk

Monitor sizeMonitor size - measured as a diagonal line - measured as a diagonal line across the screen.across the screen.

PixelsPixels (or picture element) - tiny dots that (or picture element) - tiny dots that compose a picturecompose a picture

ResolutionResolution - the number of pixels - the number of pixels displayed on the screen (the higher the displayed on the screen (the higher the resolution, the closer together the dots)resolution, the closer together the dots)

Image QualityImage Quality

Image quality is affected Image quality is affected by by resolutionresolution and and color color depthdepth (or bit depth) (or bit depth)

Color depthColor depth refers to the refers to the number of different colors number of different colors a monitor displays at the a monitor displays at the same timesame time

Examples of Color DepthExamples of Color Depth

1-bit depth

16-bit depth8-bit depth

4-bit depth

Paper OutputPaper Output

Printers produce Printers produce paper output or hard paper output or hard copy copy

2 kinds of printers:2 kinds of printers: Impact printersImpact printers Non-impact printersNon-impact printers

Impact PrintersImpact Printers

Line printerLine printer Used by mainframes to Used by mainframes to

produce massive printoutsproduce massive printouts Limited to printing Limited to printing

characterscharacters

Dot matrix printerDot matrix printer Images created by a Images created by a

matrix of tiny dotsmatrix of tiny dots Low print qualityLow print quality Low costLow cost

Non-impact PrintersNon-impact Printers

A laser beam reflected A laser beam reflected off a rotating drum to off a rotating drum to create patterns of create patterns of electrical chargeselectrical charges

Faster and more Faster and more expensive expensive than dot matrix printerthan dot matrix printer

High-resolution outputHigh-resolution output

Laser Printer

More on Non-impact PrintersMore on Non-impact Printers

Sprays ink onto paper Sprays ink onto paper to produce printed text to produce printed text and graphic imagesand graphic images

Prints fewer Prints fewer pages/minute than laser pages/minute than laser printerprinter

High-quality color High-quality color costing less than laser costing less than laser printerprinter

Ink-jet Printer

Storage devicesStorage devices

Storage/Memory DevicesStorage/Memory Devices Divided into two groups:Divided into two groups:

Primary storagePrimary storage• usually a usually a temporarytemporary storage for the data and storage for the data and

programs currently in operation or currently programs currently in operation or currently being accessed.being accessed.

• it’s fastest and most expensiveit’s fastest and most expensive Secondary storageSecondary storage

• long-term long-term storage locationsstorage locations• cheap but slower than primary memorycheap but slower than primary memory• some are portable/removablesome are portable/removable• larger capacity than primary memorylarger capacity than primary memory

Primary Storage - RAMPrimary Storage - RAM

RAMRAM: Random Access Memory: Random Access Memory very fast - access times < 1 billionth of a second – in very fast - access times < 1 billionth of a second – in

nanosecondsnanoseconds volatile storagevolatile storage - once the computer is turned off, - once the computer is turned off,

everything is losteverything is lost this is where data and programs currently being used this is where data and programs currently being used

residereside a document that has not yet been “saved” is in RAM and will a document that has not yet been “saved” is in RAM and will

be lost if the computer freezes or the power goes offbe lost if the computer freezes or the power goes off

Primary Storage - ROMPrimary Storage - ROM ROM ROM = Read Only Memory= Read Only Memory permanentpermanent memory (doesn’t disappear if the memory (doesn’t disappear if the

computer is turned off)computer is turned off) normally holds the data/programs needed to start normally holds the data/programs needed to start

(“boot up”) the computer(“boot up”) the computer typically, cannot be altered except by physically typically, cannot be altered except by physically

changing the chipchanging the chip

ROMRAM

Secondary StorageSecondary Storage

Secondary storage devices are computer Secondary storage devices are computer peripherals capable of performing both peripherals capable of performing both input and output functions input and output functions

Information is stored semi-permanently on Information is stored semi-permanently on tape and disk drivestape and disk drives

Examples of storage devicesExamples of storage devices Magnetic tapes and disksMagnetic tapes and disks Zip, Jaz and SuperDisksZip, Jaz and SuperDisks Optical disksOptical disks

Secondary storage - Magnetic TapeSecondary storage - Magnetic Tape

Magnetic tapesMagnetic tapes Sequential access Sequential access Can store large amounts of information Can store large amounts of information

in a small space at a relatively low costin a small space at a relatively low cost Limitation: sequential accessLimitation: sequential access Used mainly for backup purposesUsed mainly for backup purposes

Magnetic MediaMagnetic Media Magnetic drivesMagnetic drives

Random accessRandom access Floppy disksFloppy disks for inexpensive, portable for inexpensive, portable

storagestorage

Hard disksHard disks are typically non-removable, are typically non-removable, rigid disks that spin continuously and rigid disks that spin continuously and rapidly thus providing much faster access rapidly thus providing much faster access than a floppy disk.than a floppy disk.

Removable mediaRemovable media (Zip & Jaz disks) (Zip & Jaz disks) provide high-capacity portable storage.provide high-capacity portable storage.

Hard DiskHard Disk magnetic storagemagnetic storage data is saved until something is written over it (or it data is saved until something is written over it (or it

gets damaged somehow)gets damaged somehow) data saved on “platters” and read with a “head” data saved on “platters” and read with a “head” platters spin at 3600-7200RPMplatters spin at 3600-7200RPM

head can move to center and back to edge about 50 head can move to center and back to edge about 50 times per secondtimes per second

platters divided into “tracks” and “sectors” to make it platters divided into “tracks” and “sectors” to make it easier to retrieve data. easier to retrieve data.

Optical MediaOptical Media

Not as fast as magnetic hard Not as fast as magnetic hard disksdisks

Massive storage capacity and Massive storage capacity and reliabilityreliability

Optical disk drive uses laser beams to read and write bits of information on the disk surface.

Types of Optical MediaTypes of Optical Media

CD-ROMCD-ROM drives are optical drives that drives are optical drives that readread CD-ROMs.CD-ROMs.

CD-RCD-R are are WORM WORM media (write-once, read media (write-once, read many). Hold about 700megabytes of infomany). Hold about 700megabytes of info

CD-RWCD-RW can read CD-ROMs and write (onto can read CD-ROMs and write (onto CD-R), erase and rewrite data onto CD-RW CD-R), erase and rewrite data onto CD-RW disks.disks.

DVDDVD (digital video disks) store & distribute all (digital video disks) store & distribute all kinds of data. They hold between 3.8 and 17 kinds of data. They hold between 3.8 and 17 gigabytes of information.gigabytes of information.

Solid-state Storage DevicesSolid-state Storage Devices

Flash memory is an erasable memory chip. Compact alternativeCompact alternative

No moving partsNo moving parts

Designed for specific applications such as Designed for specific applications such as storing pictures in digital camerasstoring pictures in digital cameras

Likely to eventually replace disk and tape Likely to eventually replace disk and tape storagestorage

ProcessingProcessing

The CPUThe CPU

The microprocessor that makes up your personal computer’s central processing unit, or CPU, is the

ultimate computer brain, messenger, ringmaster and boss. All the other components—RAM, disk drives, the monitor— exist only to bridge the gap between

you and the processor.

Ron White, in How Computers Work

The CPUThe CPU The CPU:The CPU:

interprets and executes interprets and executes instructionsinstructions

performs arithmetic and performs arithmetic and logical data manipulationslogical data manipulations

communicates with the communicates with the other parts other parts of the computer system.of the computer system.

The CPUThe CPU The CPU is a complex The CPU is a complex

collection of electronic collection of electronic circuits.circuits.

When all of those circuits are built into a single silicon chip, the chip is referred to as a microprocessor.

The circuit board that contains a computer’s CPU is called the motherboard or system board.

CPU

motherboard

CPU SpeedCPU Speed

A computer’s speed is determined in A computer’s speed is determined in part by the speed of its part by the speed of its internal clockinternal clock

The clock is a timing device that The clock is a timing device that produces electrical pulses to produces electrical pulses to synchronize the computer’s operations. synchronize the computer’s operations.

A computer’s clock speed is measured A computer’s clock speed is measured in units called in units called megahertz (MHz),megahertz (MHz), for for millions of clock cycles per second millions of clock cycles per second

CPU SpeedCPU Speed Parallel processingParallel processing

places multiple places multiple processors in a processors in a computer.computer.

Most supercomputers Most supercomputers have multiple processors have multiple processors that divide jobs into that divide jobs into pieces and work in pieces and work in parallel on the pieces.parallel on the pieces.

Ports and SlotsPorts and Slots

Tying things togetherTying things together

Ports and SlotsPorts and Slots

The system or motherboard includes several The system or motherboard includes several standard ports:standard ports:

Serial PortSerial Port for attaching devices that for attaching devices that send/receive messages one bit at a time send/receive messages one bit at a time (modems)(modems)

Parallel PortParallel Port for attaching devices that for attaching devices that send/receive bits in groups (printers)send/receive bits in groups (printers)

Keyboard/Mouse PortKeyboard/Mouse Port for attaching a keyboard for attaching a keyboard and a mouseand a mouse

More on Ports and SlotsMore on Ports and Slots Other ports are typically included on Other ports are typically included on

expansion boards rather than the system expansion boards rather than the system board:board: Video PortVideo Port used to plug in a color monitor into used to plug in a color monitor into

the video boardthe video board

Microphone, speaker, headphone, MIDI Microphone, speaker, headphone, MIDI portsports used to attach sound equipment used to attach sound equipment

SCSI portSCSI port allows several peripherals to be allows several peripherals to be strung together and attached to a single portstrung together and attached to a single port

Expansion Made EasyExpansion Made Easy

With the open architecture of the PC and the introduction of new interfaces, you can now hot swap devices.

USBUSB (Universal Serial Bus)(Universal Serial Bus) transmits a transmits a hundred times faster than a PC serial porthundred times faster than a PC serial port

Firewire (IEEE 1394)Firewire (IEEE 1394) can move data between can move data between devices at 400 or more megabits per seconddevices at 400 or more megabits per second

high speed makes it ideal for data-intensive work high speed makes it ideal for data-intensive work like digital video like digital video

Bits and BytesBits and Bytes

InformationInformation

Information comes in many forms

Computers store information in digital form

Text

12 3Numbers SoundsPictures

Bit BasicsBit Basics

A bit (binary digit)A bit (binary digit) is the smallest unit of is the smallest unit of

informationinformation can have two values: can have two values: 11 or or 00 can represent can represent numbersnumbers, , codescodes, , oror instructionsinstructions

On/off

Bits as NumbersBits as Numbers

Each switch can be used to store a tiny Each switch can be used to store a tiny amount of information, such as:amount of information, such as: An answer to a yes/no questionAn answer to a yes/no question A signal to turn on a lightA signal to turn on a light

Larger chunks of information are stored by Larger chunks of information are stored by grouping bits as unitsgrouping bits as units 8 bits (byte) = 256 different messages8 bits (byte) = 256 different messages

Bits As CodesBits As Codes

ASCII – American Standard Code for Information Interchange

Most widely used code, represents each character as a unique 8-bit code.

Bits as InstructionBits as Instruction

The computer stores instructions as The computer stores instructions as collections of bits. For instance, collections of bits. For instance, 01101010 might instruct the computer to 01101010 might instruct the computer to add two numbers.add two numbers.

Other bit instructions might include where Other bit instructions might include where to find numbers stored in memory or to find numbers stored in memory or where to store them.where to store them.

Bits, Bytes, and BuzzwordsBits, Bytes, and Buzzwords

ByteByte Kilobyte (KB)Kilobyte (KB) Megabytes (MB)Megabytes (MB) Gigabytes (GB)Gigabytes (GB) Terabytes (TB)Terabytes (TB)

= 8 bits= 8 bits

≈≈ 1 Thousand Bytes1 Thousand Bytes

≈≈ 1 Million Bytes1 Million Bytes

≈≈ 1 Billion Bytes1 Billion Bytes

≈≈ 1 Trillion Bytes1 Trillion Bytes

Terms used to describe file size or memory size:

The logic machineThe logic machine

How do we build a computer that doesn’t need to be How do we build a computer that doesn’t need to be rewired each time we want to perform a different task?rewired each time we want to perform a different task?

Connect the components in such a way that the Connect the components in such a way that the program itself controls the “rewiring” by signaling the program itself controls the “rewiring” by signaling the hardware to switch the components on and off in the hardware to switch the components on and off in the proper sequenceproper sequence

Logic GatesLogic Gates

Using switches, we can reproduce the logical Using switches, we can reproduce the logical operatorsoperators ANDAND OROR NOTNOT

0 = false = off0 = false = off

1 = true = on1 = true = on

ANDAND

PP QQ PQPQ

00 00 00

00 11 00

11 00 00

11 11 11

AND is written like a

multiply

OROR

PP QQ P+QP+Q

00 00 00

00 11 11

11 00 11

11 11 11

OR is written like anadditio

n

NOTNOT

PP P’P’

00 11

11 00

NOT is written with an ’ after

the letter

Simple Truth TableSimple Truth Table

PP QQ PQ + P’Q’PQ + P’Q’

(result)(result)

00 00 11

00 11 00

11 00 00

11 11 11

“if both P and Q are the same,

then the result is true”

Example: Example: check to see if P and Q are equalcheck to see if P and Q are equal

Step 1: build Truth TableStep 1: build Truth Table The truth table for The truth table for “P and Q are equal”“P and Q are equal” looks like: looks like:

PP QQ ResultResult

00 00 11

00 11 00

11 00 00

11 11 11

P = 0, Q = 0 they are equal

so result is true (1)

P = 1, Q = 1 they are equal, so result is true

(1)

Step 2:Step 2:

Build an AND statement for each line where Result = 1Build an AND statement for each line where Result = 1

PP QQ ResultResult

00 00 11

11 11 11 P AND Q = PQ

P’ AND Q’ = P’Q’

the ’ means NOT… so P’

means that P is off/0

Step 3:Step 3:

Join each line with OR-statementsJoin each line with OR-statements

P’Q’

PQOR

result = P’Q’ + PQ

Example 2:Example 2:

PP QQ SS

00 00 11

00 11 00

11 00 11

11 11 11

Step 1: Build Truth Table … already done for us

P’Q’

PQ’

PQ

Step 2: Build equation terms using ANDs

PP QQ SS

00 00 11

00 11 00

11 00 11

11 11 11

S = P’Q’ + PQ’ + PQ

P’Q’

PQ’

PQ

Step 3: Build equation by joining terms from step 2 with ORs

Drawing circuitsDrawing circuits

GatesGates

ANDAND == ** = =

OROR == ++ ==

NOTNOT = = ’ ’ ==

Two inputs

One output

Two inputs

One output

One output

One input

Gates to switchesGates to switches

Logical gates can be converted to physical Logical gates can be converted to physical switches that operate exactly as expectedswitches that operate exactly as expected

We can combine gates to act like our statements We can combine gates to act like our statements from the truth tables since we have a gate for from the truth tables since we have a gate for each of AND, OR, NOTeach of AND, OR, NOT

Building CircuitsBuilding Circuits

We build the circuit in the exact same We build the circuit in the exact same order as we build the equationorder as we build the equation figure out the inputsfigure out the inputs do all the NOTsdo all the NOTs next all the ANDSnext all the ANDS lastly all the ORslastly all the ORs

ExampleExample

Result = PQ + P’Q’Result = PQ + P’Q’

Step A: Inputs

P

Q

One input (light switch) for

each letter in the equation

Step B: NOTsStep B: NOTs

Result = PQ + P’Q’

P

Q

P’

Q’

P

Q

Step C: ANDsStep C: ANDs

Result = PQ + P’Q’

P

Q

Remember AND is the same as a

multiply

P

Q

PQ

P’

Q’

P’Q’

Step D: ORsStep D: ORs

Result = PQ + P’Q’

P

Q

Remember OR is the same as addition

The light will light up when the

inputs are both the same, as

described in the truth table

PQ

P’Q’

PQ + P’Q’

ExampleExample3 inputs, light-up if exactly 2 inputs are true3 inputs, light-up if exactly 2 inputs are true

XX YY ZZ ResultResult

00 00 00 00

00 00 11 00

00 11 00 00

00 11 11 11

11 00 00 00

11 00 11 11

11 11 00 11

11 11 11 00

Step 1: Build Truth Table

XX YY ZZ ResultResult

00 00 00 00

00 00 11 00

00 11 00 00

00 11 11 11

11 00 00 00

11 00 11 11

11 11 00 11

11 11 11 00

Step 2: build terms with ANDs (where result is true)

X’YZ

XY’Z

XYZ’

Step 3: Build equation by joining terms with ORs

result = X’YZ + XY’Z + XYZ’

Step 4: Build circuitStep 4: Build circuit

Step A: InputsStep A: Inputs

result = X’YZ + XY’Z + XYZ’

X

Y

Z

Step B: NOTsStep B: NOTs

result = X’YZ + XY’Z + XYZ’

X

Y

Z

X’

Y’

Z’

Step C: ANDsStep C: ANDs

result = X’YZ + XY’Z + XYZ’

X

Y

Z

X’

YX’Y

Y’

XXY’

Y

XXY

ZX’YZ

ZXY’Z

Z’XYZ’

result = X’YZ + XY’Z + XYZ’

X

Y

Z

X’YZ

XY’Z

XYZ’

result = X’YZ + XY’Z + XYZ’

X

Y

Z

X’YZ

XY’Z

XYZ’

X’YZ + XY’Z

X’YZ + XY’Z+ XYZ’

Using Loggo to combine gatesUsing Loggo to combine gates

Go to the class homepage and look for the Go to the class homepage and look for the LoggoLoggo applet in the Miscellaneous sectionapplet in the Miscellaneous section

Try implementing different equations to see if Try implementing different equations to see if they match the truth tablesthey match the truth tables

Corresponding ReadingsCorresponding Readings

Chapter 2Chapter 2 Chapter 3Chapter 3

Vocabulary/definitionsVocabulary/definitions Truth tables / circuitsTruth tables / circuits

From a description, write truth tableFrom a description, write truth table From truth table, write equationFrom truth table, write equation From equation, build circuitFrom equation, build circuit

To Know – Module 5To Know – Module 5