Top Banner
Hardware
49

Design model for a computer Named after John von Neuman Instructions that tell the computer what to do are stored in memory Stored program Memory.

Dec 28, 2015

Download

Documents

Robyn Francis
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Hardware

Page 2: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Von Neuman Architecture Design model for a

computer Named after John

von Neuman Instructions that

tell the computer what to do are stored in memory

Stored program

Memory

CPU

Input Output

Page 3: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Memory

The working memory of the computer

Where program and data are stored RAM ROM Cache Flash Memory

Volatile and non-volatile memory

Page 4: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Memory Organization

You can think of memory as consisting of a number of boxes

Each box can hold a number Contents

Each box is numbered Address

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

Page 5: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Bit

A bit is the basic unit of information in computing

A bit can be in one of two distinct states. In other words it can be used to represent two distinct things

Because one bit can only represent two distinct values, computers typically work with more than one bit at a time. Much like a single digit can only represent 10 things

and we typically use numbers with more than one digit

Page 6: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Combining Bits

2 states (0 or 1 )

4 states (00, 01, 10 or 11 )

8 states (the 4 from before – twice)

16 states (the 8 from before – twice)

32 states (2 x 2 x 2 x 2 x 2)

64 states (26)

Page 7: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Memory Sizes

Page 8: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Central Processing Unit (CPU) “Brain” of the

computer

Can execute a fixed number of instructions Instructions are

numbered Instructions are very

simple

Page 9: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

CPU Architecture

A CPU usually has registers Memory locations in

the CPU Small number of them Usually very fast

One register is called the program counter (PC) The PC stores the

address of the next instruction to execute

PC

R1

R2

Page 10: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Sample Instruction Set

Number

Description

49 Move content of R1 to specified memory location

50 Move content of R2 to specified memory location

65 Move contents of specified memory location to R1

66 Move contents of specified memory location to R2

87 Add contents of R1 to R2 (result stored in R2)

91 Move contents of R1 to R2

92 Move contents of R2 to R1

211 Send contents of R1 to output

219 Input number store in register R1

255 Stop execution

Page 11: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Your First Program

Instruction

219

91

219

87

92

211

255

Input number into R1

Move R1 to R2

Input number into R1

Add R1 to R2

Move R2 to R1

Output number in R1

Halt

Page 12: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Fetch Execute Cycle

The processor runs what is known as the fetch-execute cycle

1. Fetch instruction whose address is in the PC

2. Add one to the PC3. Execute the instruction4. Go back to step 1

Page 13: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 0

R1: 0

R2: 0

IR: 0

Page 14: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 0

R1: 0

R2: 0

IR: 219

Page 15: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 1

R1: 0

R2: 0

IR: 219

Page 16: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 1

R1: 24

R2: 0

IR: 219

Page 17: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 1

R1: 24

R2: 0

IR: 91

Page 18: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 2

R1: 24

R2: 0

IR: 91

Page 19: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 2

R1: 24

R2: 24

IR: 91

Page 20: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 2

R1: 24

R2: 24

IR: 219

Page 21: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 3

R1: 24

R2: 24

IR: 219

Page 22: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 3

R1: 35

R2: 24

IR: 219

Page 23: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 3

R1: 35

R2: 24

IR: 87

Page 24: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 4

R1: 35

R2: 24

IR: 87

Page 25: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 4

R1: 35

R2: 59

IR: 87

Page 26: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 4

R1: 35

R2: 59

IR: 92

Page 27: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 5

R1: 35

R2: 59

IR: 92

Page 28: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 5

R1: 59

R2: 59

IR: 92

Page 29: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 5

R1: 59

R2: 59

IR: 211

Page 30: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 6

R1: 59

R2: 59

IR: 211

59

Page 31: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 6

R1: 59

R2: 59

IR: 255

Page 32: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Running our Program

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

PC: 7

R1: 59

R2: 59

IR: 255

HALT!!

Page 33: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Programming

What we just did Define a problem Prepare sequence of instructions for the

computer to execute

What do you think? Want to do this for a living?

Page 34: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Did you Realize?

Be honest, did you realize this was a program?

In memory a program looks just like numbers

Number can be manipulated!!

What happens if I add one to memory location 1 and run the program?

Address Contents

0 219

1 91

2 219

3 87

4 92

5 211

6 255

7 543

8 4632

9 212

10 1

Page 35: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Program as Data

Realizing that a program is data was a huge insight

It is possible to write programs that write programs

Ushered in programming languages

Page 36: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Processors Speeds

The processor speed is the speed in which the CPU can complete a certain amount of cycles per second. This is otherwise known as a Hertz. One Hertz means that one cycle can be completed in one second. A megahertz means that one million cycles can be completed in a

second. A gigahertz means that per second, the process can handle one billion

cycles.

The average processor speed today is on the order of 2 gigahertz.

The speed of a processor roughly corresponds to the number of instructions that can be executed in a fixed period of time.

Page 37: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Overclocking

Processors are designed to run at a specific speed, however, they are often designed to handle faster speeds

Overclocking refers to running your processor at a higher speed than it was designed for

System requires more power, generates more heat, and the lifespan of the processor is often shortened

Page 38: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Moore’s Law

Number of transistors on a chip doubles roughly every 2 years

Named after Gordon Moore one of the founders of Intel

Basically means we can expect performance to double every two years

Page 39: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Cores

It is now possible to place multiple CPUs, cores, on a single chip. For example a quad-core processor has 4 CPUs

Using such a chip allows a processor to do more than one thing at a time.

The software running on a multi-core chip must be written to take advantage of the cores.

Page 40: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Motherboard

A motherboard provides the electrical connections by which the other components of the system communicate.

A typical desktop computer has its microprocessor, main memory, and other essential components connected to the motherboard.

Page 41: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Graphics Cards

A video card, video adapter, graphics accelerator card, display adapter, or graphics card is an expansion card which generates output images to a display

Video hardware is often integrated into the motherboard, however all modern motherboards provide expansion ports to which a video card can be attached.

A dedicated graphics card has its own RAM and Processor specifically for processing video images.

Page 42: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Storage

Memory provides temporary storage for information. Most systems require some form of permanent storage.

Magnetic hard drives are probably the most common form of storage

Most systems also usually have 1 or 2 CD/DVD (optical) drives

Page 43: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Hard Disk Drive (HDD)

A hard disk drive is a non-volatile, random access storage device.

It contains rotating platters on which data is magnetically read and written to. Read write heads float on a film of air above the platters.

Introduced by IBM in 1956, hard disk drives have decreased in cost and physical size over the years while dramatically increasing in capacity.

Page 44: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

How Data is Stored

Data is stored on the surface of a platter in sectors and tracks.

Tracks are concentric circles

Sectors are pie-shaped wedges on a track

Page 45: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Performance

A typical desktop machine will have a hard disk with a capacity of between 250 and 500 gigabytes.

There are two ways to measure the performance of a hard disk: Data rate - The data rate is the number of bytes per

second that the drive can deliver to the CPU. Rates between 5 and 40 megabytes per second are common.

Seek time - The seek time is the amount of time between when the CPU requests a file and when the first byte of the file is sent to the CPU. Times between 10 and 20 milliseconds are common.

Page 46: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Capacity

Page 47: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Input/Output

Most computers provide a variety of connections for external devices USB, or Universal Serial Bus, is a hardware

bus standard that allows users to plug a peripheral device into a USB port and have it automatically configured and ready to use.

FireWire is Apple's name for the IEEE 1394 High Speed Serial Bus. It was initiated by Apple (in 1986) and developed by the IEEE P1394 Working Group.

Page 48: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Network

Virtually every computer has support for connecting to a network. The connection can either be wired or wireless A wired connection requires access to a

router or switch. A wireless connection requires access to

a wireless access point

Page 49: Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.

Wireless Networking

Wireless networks transmit at frequencies of 2.4 GHz or 5 GHz. The higher frequency allows the signal to carry more data.

Wireless networks use 802.11 networking standards, which come in several flavors: 802.11a transmits at 5 GHz and can move up to 54 megabits

of data per second. 802.11b is the slowest and least expensive standard. It can

handle up to 11 megabits of data per second. 802.11g transmits at 2.4 GHz like 802.11b, but it's a lot

faster -- it can handle up to 54 megabits of data per second. 802.11n is the newest standard that is widely available and

can achieve speeds as high as 140 megabits per second.