Slides from Chapter 1

Download Report

Transcript Slides from Chapter 1

DRAM capacity

1000M ~2004 1000 256M 512M 100 10 1 0.1

64K 256K 1M 4M 16M 64M 15K 0.01

0.001

1976 1978 1980 1982 1984 1986 1988 1990 1992 1994 1996 1998 2000

Hardware Computer Organization for the Software Professional Arnold S. Berger

1

Abstract view of a computer

Hardware Computer Organization for the Software Professional Arnold S. Berger

2

Abstraction layers

Hardware Computer Organization for the Software Professional Arnold S. Berger

3

Memory hierarchy

• • • There is a hierarchy of memory In order to maximize processor throughput, the fastest memory is closest to the processor Also the most expensive Notice: The exponential rise in capacity with each layer

CPU Primary Cache 2K- 1,024K byte (<1ns) Bus Interface Unit

The exponential rise in access time in each layer

Secondary Cache 256K - 4MByte (10ns) Main Memory 1M – 2 Gbyte (30 ns) Hard Disk 40 - 250 GByte ( 100,000 ) ns Tape Backup 50G - 10TByte (seconds) Internet All knowledge/Forever

Hardware Computer Organization for the Software Professional Arnold S. Berger

4

Hard disk drive

Hardware Computer Organization for the Software Professional Arnold S. Berger

5

Representing a number as a voltage

Represent the data value as a voltage or current along a single electrical conductor (signal trace) or wire 24.56345

RADIO SHACK 24.56345 V Direction of signal

• Problems: • Measuring large numbers is difficult, slow and expensive • How do you represent +/- 32,673,102,093?

Zero volts (ground)

Hardware Computer Organization for the Software Professional Arnold S. Berger

6

Parallel transmission of 0 to 9

2 4 5 6 3 4 5

Represent the data value as a voltage or current along multiple electrical conductors

Let each wire represent one decade of the number

Only need to divide up the voltage on each wire into 10 steps

0 V to 9 volts

Can have considerable “slop” between values before it causes problems 4.2 RADIO SHACK Zero volts (ground)

Hardware Computer Organization for the Software Professional Arnold S. Berger

7

Binary data transmission

Represent the data value as a voltage or current along multiple, parallel, electrical conductors

Let each wire represent one power of 2 of the number ( 2 0 through 2 N )

Only need to divide up the voltage on each wire into 2 possible steps

0 V “no volts” or “some volts” greater than zero (on or off )

Can have lots of “slop” between values 2 9 2 10 2 11 2 12 2 13 2 14 2 15 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8

Hardware Computer Organization for the Software Professional Arnold S. Berger

on off on off off on on on off off off on on on on off 8 1 0 1 0 0 1 1 1 0 0 0 1 1 1 1 0

A simple AND circuit

• • • Digital computers force us to deal with number systems other than decimal ALL digital computers are collections of switches made from transistors A switch is ON or OFF A binary (digital) system lends itself to using electronic on/off switching Principles of Logic (a branch of Philosophy ) are useful to describe the digital circuits in computers True/False, 1/0, On/OFF, High/Low all describe the same possible states of a digital system An electrical circuit, with ordinary switches, is a convenient display

on/off switch A B C + C = A and B Battery Symbol Light bulb (load)

Hardware Computer Organization for the Software Professional Arnold S. Berger

9

Decimal representation

• • • Writing a number is the same in all number systems Each column of the number represents the base that the number is raised to Example: 65,536 = 2

16 10

10 4 10 3 10 2 10 1 10 0 6 5 5 3 6

Notice how each column is weighted by the value of the base raised to the power

+ 6 x 10 0 = 6 3 x 10 1 = 30 5 x 10 2 = 500 5 x 10 3 = 5000 6 x 10 4 = 60000 = 65536

Hardware Computer Organization for the Software Professional Arnold S. Berger

10

Binary numbers

• • Just like decimal numbers, binary numbers are represented as the power of the base: Example: 10101100

B Bases of Hex and Octal 128 64 32 16 8 4 2 1 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 0 1 0 1 1 0 0 1 x 2 7 0 x 2 6 1 x 2 5 0 x 2 4 1 x 2 3 1 x 2 2 0 x 2 1 0 x 2 0 = 128 = 0 = 32 = 0 = 8 = 4 = 0 = 0 10 172

Hardware Computer Organization for the Software Professional Arnold S. Berger

11

Binary and octal numbers

• • Let’s look at our example again: Notice that because 8 = 2

3

we can easily convert binary to octal Just group columns of three and treat as binary within a column to get octal number from 0 to 7

8 2 8 1 8 0 128 64 32 16 8 4 2 1 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 2 6 (2 1 2 0 ) 2 3 ( 2 2 2 1 2 0 ) 2 0 ( 2 2 2 1 2 0 ) 1 0 1 0 1 1 0 0 0 thru 192 0 thru 56 0 thru 7 4 x 8 0 5 x 8 1 2 x 8 2 = 4 = 40 = 128 172

Hardware Computer Organization for the Software Professional Arnold S. Berger

12

Binary and hex

• • Hexadecimal is the same principle as octal Hexadecimal is the most common number system in computer science Octal was common with minicomputers but is now a special function counting system Back to our example: 10 x 16 + 12 x 1 = 172 = AC (Hex)

16 1 16 0 128 64 32 16 8 4 2 1 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 2 4 (2 3 2 2 2 1 2 0 ) 2 0 ( 2 3 2 2 2 1 2 0 ) 1 0 1 0 1 1 0 0

Hardware Computer Organization for the Software Professional Arnold S. Berger

13

Bits, bytes, nibbles, words, etc.

Bit (1) D3 D0 Nibble (4) D7 D0 Byte (8) D15 D0 Word (16) D31 D63 D127 D0 Long (32) D0 Double (64) D0 VLIW (128)

Hardware Computer Organization for the Software Professional Arnold S. Berger

14

A Seven Segment Display using BCD

0000 0001 0010 0011 carry the one 0100 0101 0110 0111 1000 1001 0001

Hardware Computer Organization for the Software Professional Arnold S. Berger

0000 15