Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter Two Hardware Basics: Inside the Box ©1999 Addison Wesley Longman2.2 Chapter Outline What Computers Do A Bit About Bits The Computer’s Core: CPU.

Similar presentations


Presentation on theme: "Chapter Two Hardware Basics: Inside the Box ©1999 Addison Wesley Longman2.2 Chapter Outline What Computers Do A Bit About Bits The Computer’s Core: CPU."— Presentation transcript:

1

2 Chapter Two Hardware Basics: Inside the Box

3 ©1999 Addison Wesley Longman2.2 Chapter Outline What Computers Do A Bit About Bits The Computer’s Core: CPU and Memory

4 ©1999 Addison Wesley Longman2.3 What Computers Do Four basic functions of computers include: –Receive input –Process information –Produce output –Store information

5 ©1999 Addison Wesley Longman2.4 Input Devices Computers accept information from the outside world. The keyboard is the most common input device. Pointing devices like the mouse also receive input.

6 ©1999 Addison Wesley Longman2.5 Process Information The processor, or central processing unit (CPU), processes information, and performs all the necessary arithmetic calculations. The CPU is like the “brain” of the computer.

7 ©1999 Addison Wesley Longman2.6 Output Devices Computers produce information and send it to the outside world. A video monitor is a common output device. Printers also produce output.

8 ©1999 Addison Wesley Longman2.7 Store Information Memory and storage devices are used to store information. Primary storage is the computer’s main memory. Secondary storage uses disks or other media. Primary storage Secondary storage

9 ©1999 Addison Wesley Longman2.8 A Bit About Bits A bit (binary digit) –is the smallest unit of information –can have two values - 1 and 0. Binary digits, or bits, can represent numbers, codes, or instructions. OnOff

10 ©1999 Addison Wesley Longman2.9 Bits as Numbers Binary number system - a system that denotes all numbers and combinations of two digits. The binary system uses two digits to represent the numbers 0 and 1.

11 ©1999 Addison Wesley Longman2.10 Number System (I) decimal system ( base 10 ) octal system ( base 8 ) binary system ( base 2 )

12 ©1999 Addison Wesley Longman2.11 Number System (II) decimal octal binary 0 00000 1 10001 2 20010 3 30011 4 40100 5 50101 6 60110 7 70111 8101000 9111001 10121010

13 ©1999 Addison Wesley Longman2.12 To Represent Negative Numbers biased sign magnitude 1’s complement 2’s complement

14 ©1999 Addison Wesley Longman2.13 Biased Numbers decimalBCDbiased 0000-4 1001-3 2010-2 3011-1 41000 51011 61102 71113

15 ©1999 Addison Wesley Longman2.14 Sign Magnitude Numbers sign magnitude -3 1 11 -2 1 10 -1 1 01 -0 1 00 0 0 00 1 0 01 2 0 10 3 0 11

16 ©1999 Addison Wesley Longman2.15 1‘s Complement Numbers -3100 -2101 -1110 -0111 0000 1001 2010 3011

17 ©1999 Addison Wesley Longman2.16 2‘s Complement Numbers -4100 -3101 -2110 -1111 0000 1001 2010 3011

18 ©1999 Addison Wesley Longman2.17 1‘s Complement Addition BCD addition carry end around result always correct when two operands have different sign overflow when two positive operands add to a negative result underflow when two negative operands add to a positive result

19 ©1999 Addison Wesley Longman2.18 2‘s complement Addition BCD addition carry dropped result always correct when two operands have different sign overflow when two positive operands add to a negative result underflow when two negative operands add to a positive result

20 ©1999 Addison Wesley Longman2.19 Floating Point Representation = 12345 * 10 -2 = 1234.5 * 10 -1 = 123.45 = 12.345 * 10 1 = 1.2345 * 10 2 = 0.12345 * 10 3 — normalized form = 0.012345 * 10 4 … 21.75 = 10101.11 = 0.1010111 * 2 5

21 ©1999 Addison Wesley Longman2.20 PDP-11, VAX-11 Floating Point Representation precision 1/2 24 ~ 1/10 7 range 2 127 ~ 10 38 0 10000101 01011100…….0 8 bits 23 bits mantissa sign

22 ©1999 Addison Wesley Longman2.21 IBM360/370 Floating Point Representation 21.75 = 10101.11 B = 15.C H =.15C * 16 2 precision 1/2 21 ~ 1/10 6 range 16 63 = 2 252 ~ 10 78 0 1000010 0001 0101 1100 0000 0000 0000 4 2 1 5 C 0 0 0

23 ©1999 Addison Wesley Longman2.22 Bits as Codes ASCII - American Standard Code for Information Interchange - most widely used code, represents each character as a unique 8-bit code.

24 ©1999 Addison Wesley Longman2.23 Code & Character Sets ASCII ( American Standard Code for Information Interchange ) — 7 bit 0123456789ABCDEF 0 | 1 | 2 |!“#$%&`()*+-,./ 3 |0123456789 4 |@ABCDEFGHIJKLMNO 5 |PQRSTUVWXYZ 6 |abcdefghIjklmno 7 |pqrstuvwxyz

25 ©1999 Addison Wesley Longman2.24 Code & Character Sets (IV) EBCDIC ( extended BCD for information exchange code ) — 8 bit 0123456789ABCDEF 8|abcdefghi 9|jklmnopqr A|stuvwxyz B| C|ABCDEFGHI D|JKLMNOPQR E|STUVWXYZ F|0123456789

26 ©1999 Addison Wesley Longman2.25 Chinese Characters Big-52 byte( 16 bit )13461 字 CNS116433 byte( 24 bit )48222 字

27 ©1999 Addison Wesley Longman2.26 File & Record files –program file –data file Record –field –sub-field

28 ©1999 Addison Wesley Longman2.27 Type of Data numerical –integer, real, double precision, complex, … non-numerical –character string, boolean

29 ©1999 Addison Wesley Longman2.28 Bits as Instructions The computer stores programs as collections of bits. For instance, 01101010 might instruct the computer to add two numbers.(OP code) Other bit instructions might include where to find numbers stored in memory or where to store them.(operands)

30 ©1999 Addison Wesley Longman2.29 Bits, Bytes, and Buzzwords Common terms might describe file size or memory size: Bit: smallest unit of information Byte: a grouping of eight bits of information K: (kilobyte); about 1,000 bytes of information - technically 1024 bytes equals 1K of storage.

31 ©1999 Addison Wesley Longman2.30 Bits, Bytes, and Buzzwords MB: (megabyte); about 1 million bytes of information GB: (gigabyte); about 1 billion bytes of information TB: (terabyte); about 1 million megabytes of information

32 ©1999 Addison Wesley Longman2.31 The Computer’s Core: The CPU and Memory The transformations are performed by the CPU - the central processing unit or processor. The microprocessor, which is a silicon chip, is located on the motherboard.

33 ©1999 Addison Wesley Longman2.32 The Computer’s Core: The CPU and Memory When you purchase a computer, the selection of the CPU is a very important choice. There are two factors that are very important to computer users are: - Compatibility - Speed

34 ©1999 Addison Wesley Longman2.33 Compatibility Not all software is compatible with any given CPU. Each computer has a unique instruction set - a vocabulary of instructions the processor can execute. New microprocessors can usually run older software, but new software is not usually compatible with old microprocessors.

35 ©1999 Addison Wesley Longman2.34 Speed The computer’s speed is measured by the speed of its internal clock - a device to synchronize the electric pulses. Speed is measured in units called megahertz (mHz).

36 ©1999 Addison Wesley Longman2.35 Speed The architecture of a computer determines its speed. CISC - complex computer instructions set computer RISC - reduced instruction set computer

37 ©1999 Addison Wesley Longman2.36 CPU family CISC –Intel X86, Pentium –Motorola 680x0 RISC –PowerPC, MIPS, SPARC, Alpha

38 ©1999 Addison Wesley Longman2.37 Primary Storage: The Computer’s Memory RAM (random access memory): –is the most common type of primary storage, or computer memory. –used to store program instructions and data temporarily –unique addresses and can store in any location –can quickly retrieve information –will not remain if power goes off (volatile).

39 ©1999 Addison Wesley Longman2.38 Primary Storage: The Computer’s Memory ROM (read-only memory): –information is stored permanently on a chip. –contains startup instructions and other permanent data.

40 ©1999 Addison Wesley Longman2.39 Buses, Ports, and Peripherals Information travels between components through groups of wires called buses.

41 ©1999 Addison Wesley Longman2.40 Buses, Ports, and Peripherals Peripherals: –are external devices for receiving input or producing output (keyboard, monitor, and mouse). –communicate with other parts of the system.

42 ©1999 Addison Wesley Longman2.41 Buses, Ports, and Peripherals –provide attachment and communication with external devices by means of: slots (for internal attachment) ports (for external attachments)


Download ppt "Chapter Two Hardware Basics: Inside the Box ©1999 Addison Wesley Longman2.2 Chapter Outline What Computers Do A Bit About Bits The Computer’s Core: CPU."

Similar presentations


Ads by Google