Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a...

10
Computer Systems Chapter 1 Pages 2 - 16

Transcript of Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a...

Page 1: Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.

Computer SystemsChapter 1

Pages 2 - 16

Page 2: Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.

Hardware-physical pieces

• Key hardware components in a computer system: The physical parts.

– Central processing unit – executes – Input/output devices– Main memory-holds software while being

processed by CPU– Secondary memory devices-Stores software until

deleted from system

Page 3: Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.

Software

Two types: System software and applications. Software is the actually programs we will run on the computer.

• System programs – Operating System– Provides user interface (GUI)– Manages computer resources

• Application – programs designed for purpose: education, financial, medical games.

Page 4: Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.

Digital Information• A computer stores information digitally as binary numbers.

– numbers– text– graphics and images– video– audio– program instructions

• In some way, all information is digitized - broken down into pieces and represented as numbers

Page 5: Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.

Binary Numbers

• Binary number system has only two digits

– 0 and 1.

• A single binary digit (0 or 1) is called a bit

• A single bit can represent two possible states, like a light bulb that is either on (1) or off (0) These combinations of bits make up letters, symbols, numbers.

• Binary is Base 2 number system

• so there are 2N permutations of N bits

Page 6: Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.

6

Bit PermutationsTherefore, N bits are needed to represent 2N unique items

21 = 2 items

22 = 4 items

23 = 8 items

24 = 16 items

25 = 32 items

1 bit ?

2 bits ?

3 bits ?

4 bits ?

5 bits ?

6 bits ?

7 bits ?

8 bits ?

How manyitems can be

represented by

26 = 64 items

27 = 128 items

28 = 256 items

Page 7: Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.

7

Bit Permutations

1 bit01

2 bits00011011

3 bits000001010011100101110111

4 bits00000001001000110100010101100111

10001001101010111100110111101111

Each additional bit doubles the number of possible permutationsAll the different combinations possible of 0s or 1s.

Question: 3 bits can represent how much data? 823

Page 8: Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.

Convert from decimal to binary

31610

• To convert from decimal to binary use the greedy algorithm. Start with the first power of two less than or equal to the decimal number and turn that bit to 1. Then subtract the power of two from the decimal number and continue until done

256 (28) 1 (316-256 = 60) 128 (27) 064 (26) 0 32 (25) 1 (60-32 = 28)16 (24) 1 (28-16 = 12)8 (23) 1 (12-8 = 4)4 (22) 1 (4-4 = 0)2 (21) 01 (20) 0

1001111002 is 31610

256 128 64 32 16 8 4 2 1

1 0 0 1 1 1 1 0 0

2728 26 25 24 23 22 21 20

Bits in computer memory are organized into bytes. Each byte has 8 bits. The first 8 values in powers of 2 are 1, 2, 4, 8, 16, 32, 64, 128. So you can store the values 0 to 255 in 1 byte (8 bits).

Base 2 number system chart

Page 9: Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.

• Convert from binary to decimal• The decimal value of a binary number can be calculated by multiplying the

digit by the value of each place and adding the results for each digit.

256 128 64 32 16 8 4 2 1

1 0 0 1 1 1 1 0 0

2728 26 25 24 23 22 21 20

(1)(28) + (1) (25) + (1)(24) + (1)(23) + (1)(22) + (0)(21) + (0)(20)

256 + 32 + 16 + 8 + 4 + 0 + 0 = 316

Page 10: Computer Systems Chapter 1 Pages 2 - 16. Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.

10

Storage Capacity• Every memory device has a storage capacity, indicating the number of

bytes it can hold

• Capacities are expressed in various units:

KB 210 = 1024

MB 220 (over 1 million)

GB 230 (over 1 billion)

TB 240 (over 1 trillion)

Unit Symbol Number of Bytes

kilobyte

megabyte

gigabyte

terabyte