Under the Hood Copyright 2011 Pearson Education, Inc.

Under the Hood Copyright  2011 Pearson Education, Inc.

Under the Hood Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Electrical Switches The system unit contains the CPU The CPU uses a large number of switches Two states: 1 or 0 (on or off) Binary language consists of two numbers: 1 or 0 These switches are used to Lock process data Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall

2 Early Computer Switches Vacuum tubes Allow or block the flow of electrical current Take up a large amount of space Generate heat and burn out frequently Impractical due to size and reliability issues Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 3 Transistors Transistors Electrical switches built of layers of silicon Early transistors were built in separate units

as small metal rods Each rod was a small on/off switch Smaller and faster than vacuum tubes Produced less heat Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 4 Integrated Circuits Made of semiconductor material, silicon Contain huge number of transistors, resistors, capacitors, and diodes Small size, only inch in diameter Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 5

Microprocessors Chip that contains CPU Intel 4004 First complete microprocessor on a single integrated circuit Built in 1971 Contained 2,300 transistors Current CPUs contain more than 500 million transistors Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 6 Base 10 Number System Organized plan for representing a number Base 10 or decimal notation Uses 10 digits (09)

System used to represent all of the numeric values we use each day 103 1,000s place 102 101 100s place 10s place 6 * 1,000 + 9 * 100 + 5 * 10 + Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 100 1s place (6,000 + 900 +

50 + 4) = 6,954 4*1 7 Base 2 Number System Base 2 or binary Uses two digits (1,0) Computers use binary because each switch can be in one of two positions: on or off. 23 22 21 20

8s place 4s place 2s place 1s place 1 0 1 1 Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall (8 + 0 + 2 + 1) = 11

8 Hexadecimal Notation: Base 16 Base 16 (09, AF) Character representation Base 10 0 1 2 3 4 5 6

7 8 9 10 11 12 13 14 15 Base 16

0 1 2 3 4 5 6 7 8 9

A B C D E F 163 162 161 160

4,096s place 256s place 16s place 1s place 1 A 4 1 * 4,096 + 10 * 256 + 4 * 16 + 4,096 + 2,560 + 64 + 6,723 Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall

3 3*1 3 Hex 1A43 = 6,723 in Base 10 9 ASCII American Standard Code for Information Interchange Pronounced As-key Represents each letter or character as an 8-bit (or 1-byte) binary code. ASCII Code Represents This Symbol

ASCII Code Represents This Symbol 01000001 01000010 01000011 01011010 00100001 00100010 A B C Z !

01100001 01100010 01100011 00100011 00100100 00100101 a b c # $ % Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 10 EBCDIC and Unicode

EBCDIC Used by older mainframe computers Unicode Uses 16 bits (2 bytes) Multilanguage support Currently assigns more than 96,000 unique character symbols Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 11 Decimal Numbers Floating-point standard established by IEEE 32-bit (4-byte) system First bit (sign bit) indicates positive or negative Next 8 bits indicate magnitude (hundreds,

millions, etc.) Remaining 23 bits store number Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 12 CPU Machine Cycle All CPUs must perform a series of similar steps: Fetch Decode Execute Store Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 13

System Clock Moves CPU from one stage of the machine cycle to the next Acts as a metronome, keeping a steady beat or tick Ticks, known as the clock cycle, set the pace Pace, known as clock speed, is measured in hertz (Hz) Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 14 Control Unit Manages switches inside the CPU Remembers Sequence of processing stages How switches are set for each stage Uses beat of system clock to move switch

to correct on or off setting for each stage Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 15 Stage 1: The Fetch Stage Data and program instructions stored in various areas of the computer Data moved from storage to RAM CPU accesses RAM and moves data into registers Cache memory Stores recent or frequently used instructions Faster to access than RAM Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 16 Cache Memory

Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 17 Stage 2: The Decode Stage The CPUs control unit decodes a programs instructions into commands Instruction set The collection of commands a CPU can interpret Written in assembly language for programmers. Assembly language is translated into machine language for the CPU Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 18 Stage 3: The Execute Stage

Arithmetic logic unit (ALU) performs Mathematical operations Addition Subtraction Multiplication Division Test comparisons (<, >, =) Logical OR, AND, and NOT operations Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 19 Stage 4: The Store Stage

Results produced by the ALU in Stage 3 are stored in the registers Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 20 Moores Law The number of transistors on a processor doubles every 18 months The first 8086 chip had 29,000 transistors and ran at 5 MHz Todays Penryn chip for notebook computers has 820 million transistors and runs at 2.6 GHz Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 21

Pipelining Boosts CPU performance CPU works on more than one stage or instruction at a time Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 22 Multiple Processing Multiple processors or computers work on a problem simultaneously Dual- or multicore: Multiple processors in one computer Parallel processing: Multiple computers working on one problem Problem must be able to be divided into a set of independent tasks Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall

23 DNA Computers Use DNA molecules and special enzymes instead of silicon chips 330 trillion operations per second 100,000 times faster than current silicon-based computers No practical applications yet Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall 24

Recently Viewed Presentations