introduction to computer architecture. what is binary? we use the decimal (base 10) number system...

19
Introduction to Computer Architecture

Upload: ashley-underwood

Post on 03-Jan-2016

251 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Introduction to Computer Architecture

Page 2: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

What is binary?

We use the decimal (base 10) number system

Binary is the base 2 number system Ten different numbers are used in

base 10. How many are used in base 2?

Page 3: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Bits & Bytes

kilo, mega, and giga are different in binary!

bit (b) – binary digit

Byte (B) – 8 binary digits

KiloByte (KB) – 210 bytes

MegaByte (MB) – 220 bytes

GigaByte (GB) – 230 bytes

Page 4: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Storage Scam!

Example: iPod Nano 8GB

Page 5: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

What is computer architecture?

What does “architecture” mean? Layout and interactions of a computer

system What is a computer system? Input Process Output Can a computer system be more than

one computer? Think of an example...

Page 6: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Major Components of a Computer

Central Processing Unit (CPU) Random Access Memory (RAM) Hard Drive / Disk

Page 7: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Central Processing Unit (CPU)

Also called the “chip” or “processor”

The brain of the computer Major components:

Arithmetic Logic Unit (ALU) calculator

Control unit controls the calculator

Communication bus systems

What’s a bus?!?

Control Unit

ALU

Memory

Address Bus

Data Bus

Page 8: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Fetch-Execute Cycle (Machine Instruction Cycle)

1. Fetch instruction from memory

2. Decode instruction in control unit

3. Execute instruction (data may be fetched from memory)

4. Store results if necessary5. Repeat!

Control Unit

ALU

Memory

Address Bus

Data Bus

Page 9: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

ON-OFF-ON-ON

1 0 1 1

Several ways to remember the state of a switch: Electrical – RAM, flash memory, ROM Magnetic – Hard drives, magnetic tapes Optical – CDs, DVDs

Page 10: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Primary Memory

Memory level CPU accesses closest RAM ~ Random Access Memory

Volatile storage (data is NOT saved when computer is off)

Used to store everything (OS, programs, etc.) while computer is on

ROM ~ Read-Only Memory Non-volatile storage Often holds the computer’s BIOS (Basic

Input/Output System) when computer first loads

Page 11: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

What does memory look like?

Memory ~ RAM Looks like a table Address and Data Address is the location Data is the actual value Memory stores both

data and assembly instructions

Address Data

0 36

1 3765

2 786

3 356

4 252

5 67980

6 2355

7 4234

8 3466

Page 12: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Registers

Temporary storage containers used inside the CPU

Extremely fast MAR ~ Memory Address Register

Holds the address of where you are fetching from MDR ~ Memory Data Register

Holds the data that was fetched from memory Many other registers too (for all CPU

calculations)

Page 13: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Fetch-Execute Cycle (Machine Instruction Cycle)

1. Fetch instruction from memory

2. Decode instruction in control unit

3. Execute instruction (data may be fetched from memory)

4. Store results if necessary5. Repeat!

Control Unit

ALU

Memory

Address Bus

Data Bus

Page 14: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Fetch-Execute Animation

http://www.hartismere.com/staticvle/ictskills/FetchExecute.swf

Page 15: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Memory Hierarchy

Page 16: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Cache

Slower than registers Faster than RAM Located in front of main

RAM Different levels of cache Level1 (L1) and Level2

(L2) Size is usually around 1

MB

Page 17: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Virtual Memory

What if a program is too big for RAM? If a program is too big for memory

(RAM), then we start using the hard drive (disk) to store data

Prevents the computer from stalling/crashing (BUT IT IS SLOW)

Page 18: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

Hard Drives

• Persistent storage• Non-volatile storage• Why do we need it?• Other types of persistent

storage?

Page 19: Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers

CD/DVD/BluRays Lands and pits used to represent binary Optical medium - lasers and refraction used to read lands

and pits http://electronics.howstuffworks.com/cd4.htm