CSE 1520 Computer Use: Fundamentals - PowerPoint PPT Presentation

About This Presentation
Title:

CSE 1520 Computer Use: Fundamentals

Description:

* CD-DA: compact disk-digital audio CD-R: compact disk-recordable; the contents of a CD-R cannot be changed after data is recorded on it. – PowerPoint PPT presentation

Number of Views:119
Avg rating:3.0/5.0
Slides: 35
Provided by: hof114
Category:

less

Transcript and Presenter's Notes

Title: CSE 1520 Computer Use: Fundamentals


1
  • Week 8 Computing Components
  • READING Chapter 5

2
Sizes in Perspective
EECS 1520 -- Computer Use Fundamentals
  • Time (e.g. ns, ms) is expressed in multiples of
    seconds in decimal notation
  • Storage capacity (e.g. 1 byte, 16 bits) is
    expressed in multiples of bytes in binary
    notation (i.e. base 2)

3
Stored-Program Concept
EECS 1520 -- Computer Use Fundamentals
Von Neumann Architecture
Arithmetic and logic operations on data
Holds both data and instructions
4
Stored-Program Concept
EECS 1520 -- Computer Use Fundamentals
Arithmetic/Logic Unit (ALU)
  • The Arithmetic/Logic Unit (ALU) performs basic
    arithmetic operations such as adding,
    subtracting, etc.
  • It also performs logical operations such as AND,
    OR, etc
  • Most modern ALUs have a small number of special
    storage units called registers.
  • These registers usually contain one word (i.e. 16
    bits)
  • They are used to store information that is needed
    again immediately

5
Stored-Program Concept
EECS 1520 -- Computer Use Fundamentals
Control Unit
  • The Control Unit in charge of the
    fetch-decode-execute cycle
  • There are 2 registers in the control unit
  • Instruction register (IR) contains the
    instruction that is being executed
  • Program counter (PC) contains the address of the
    next instruction to be executed
  • The ALU and Control Unit comprise the Central
    Processing Unit or CPU

6
Stored-Program Concept
EECS 1520 -- Computer Use Fundamentals
Memory
  • Memory is a collection of cells, each with a
    unique physical address
  • Each memory cell contains an instruction
  • Each instruction consists of an operation code
    (or called op-code)

7
Stored-Program Concept
EECS 1520 -- Computer Use Fundamentals
Memory RAM and ROM
  • Random access memory (RAM)
  • inherit in the idea of being able to access each
    memory location
  • ability to change the contents of each location
  • Read only memory (ROM)
  • The contents in locations in ROM cannot be
    changed
  • Their contents are permanent and cannot be
    altered by a stored operation
  • RAM is volatile and ROM is not
  • - means RAM does not retain its bit
    configuration when the power is off
  • - bit patterns in ROM are permanent, it is used
    to store the instructions that the computer
    needs to start itself

8
Stored-Program Concept
EECS 1520 -- Computer Use Fundamentals
Flow of Information
  • A simplified view of the flow of information
    through the parts of a von Neumann machine.
  • The parts are connected to one another by a
    collection of wires called bus.

9
Stored-Program Concept
EECS 1520 -- Computer Use Fundamentals
Fetch - Decode - Execute Cycle
  • 1. fetch next instructions,
  • 2. decode instruction (extract op code, operand
    address),
  • 3. get data,
  • 4. execute instruction,
  • 5. advance program counter

Fetch the next instruction
Execute the instruction
Decode the instruction
10
Stored-Program Concept
EECS 1520 -- Computer Use Fundamentals
Fetch-(Decode)-Execute Cycle
  • In general, the faster the computer can get
    through 1 fetch-decode-execute cycle, the faster
    it will perform
  • Cycle times are measured in GHz these days
    (i.e. a billion cycles per second)

11
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
Lets look at a small computer program
  • The generic CPU consists of 5 registers
  • 1. Program Counter (PC)
  • 2. Instruction Register (IR)
  • 3. Memory Address Register (MAR)
  • 4. Memory Data Register (MDR)
  • 5. Accumulator (A or Acc)

12
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
  • The generic CPU consists of 5 registers
  • 1. Program Counter (PC)
  • 2. Instruction Register (IR)
  • 3. Memory Address Register (MAR)
  • 4. Memory Data Register (MDR)
  • 5. Accumulator (A or Acc)
  • FETCH address of next instruction is transferred
    from PC to MAR and the instruction is located in
    the memory

13
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
  • The generic CPU consists of 5 registers
  • 1. Program Counter (PC)
  • 2. Instruction Register (IR)
  • 3. Memory Address Register (MAR)
  • 4. Memory Data Register (MDR)
  • 5. Accumulator (A or Acc)
  • FETCH instruction is copied from memory to the
    MDR

14
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
  • The generic CPU consists of 5 registers
  • 1. Program Counter (PC)
  • 2. Instruction Register (IR)
  • 3. Memory Address Register (MAR)
  • 4. Memory Data Register (MDR)
  • 5. Accumulator (A or Acc)
  • DECODE instruction

15
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
  • The generic CPU consists of 5 registers
  • 1. Program Counter (PC)
  • 2. Instruction Register (IR)
  • 3. Memory Address Register (MAR)
  • 4. Memory Data Register (MDR)
  • 5. Accumulator (A or Acc)
  • EXECUTE control unit sends signals to
    appropriate devices to carry out execution of the
    instruction

16
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
  • The generic CPU consists of 5 registers
  • 1. Program Counter (PC) 5 bits
  • 2. Instruction Register (IR) 8 bits
  • 3. Memory Address Register (MAR) 5 bits
  • 4. Memory Data Register (MDR) 8 bits
  • 5. Accumulator (A or Acc)

17
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
Example instruction format 3-bit op code,
5-bit address
  • 3-bit op code gives us 23 8 possible
    instructions
  • Instructions and their op codes
  • 000 HALT (HLT)
  • 001 LOAD (LDA)
  • 010 STORE (STA)
  • 011 ADD (ADD)
  • 100 SUBTRACT (SUB)
  • 101 BRANCH (BR)
  • 110 BRANCH ON ZERO (BRZ)
  • 111 BRANCH ON POSITIVE (BRP)

18
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
Example of an instruction LOAD Instruction
(LDA) within a cycle
  • Steps

FETCH
PC MAR MDR IR IR address MAR MDR A PC
1 PC
DECODE
EXECUTE
19
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
Example of a small program
20
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
Example of a small program
Instructions
Address
21
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
Example of a small program
Instructions
Address
22
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
Example of a small program
Instructions
Address
Instructions and their op codes 000 HALT
(HLT) 001 LOAD (LDA) 010 STORE (STA)
011 ADD (ADD) 100 SUBTRACT (SUB)
101 BRANCH BR) 110 BRANCH ON ZERO (BRZ)
111 BRANCH ON POSITIVE (BRP)
The first 3 bits is the op code, so 001 means
LOAD The last 5 bits is the address, so this
instruction means LOAD the content in cell
address 01000
23
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
Example of a small program
Instructions
Address
Instructions and their op codes 000 HALT
(HLT) 001 LOAD (LDA) 010 STORE (STA)
011 ADD (ADD) 100 SUBTRACT (SUB)
101 BRANCH BR) 110 BRANCH ON ZERO (BRZ)
111 BRANCH ON POSITIVE (BRP)
The first 3 bits is the op code, so 011 means
ADD The last 5 bits is the address, so this
instruction means ADD the content in cell
address 01001
24
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
Example of a small program
Instructions
Address
Instructions and their op codes 000 HALT
(HLT) 001 LOAD (LDA) 010 STORE (STA)
011 ADD (ADD) 100 SUBTRACT (SUB)
101 BRANCH BR) 110 BRANCH ON ZERO (BRZ)
111 BRANCH ON POSITIVE (BRP)
The first 3 bits is the op code, so 010 means
STORE The last 5 bits is the address, so this
instruction means STORE the content in cell
address 01010
25
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
Example of a small program
Instructions
Address
Instructions and their op codes 000 HALT
(HLT) 001 LOAD (LDA) 010 STORE (STA)
011 ADD (ADD) 100 SUBTRACT (SUB)
101 BRANCH BR) 110 BRANCH ON ZERO (BRZ)
111 BRANCH ON POSITIVE (BRP)
The first 3 bits is the op code, so 000 means
HALT, which means the program stops at this point
26
Fetch-Decode-Execute Cycle
EECS 1520 -- Computer Use Fundamentals
Example of a small program
Instructions
Address
Instructions and their op codes 000 HALT
(HLT) 001 LOAD (LDA) 010 STORE (STA)
011 ADD (ADD) 100 SUBTRACT (SUB)
101 BRANCH BR) 110 BRANCH ON ZERO (BRZ)
111 BRANCH ON POSITIVE (BRP)
LOAD A
ADD B
STORE C
STOP
Label as A
DATA 5
DATA -3
Label as B
DATA
Label as C
27
Stored-Program Concept
EECS 1520 -- Computer Use Fundamentals
Von Neumann Architecture
28
Secondary Storage Devices
EECS 1520 -- Computer Use Fundamentals
  • Most of main memory is limited, it is essential
    that there be other types of storage devices
    where programs and data can be stored when they
    no longer being processed
  • These other types of storage devices are called
    secondary or auxiliary storage devices
  • Because data must be read from them and written
    to them, each secondary storage device is also an
    input and an output device

29
Secondary Storage Devices Magnetic Tape
EECS 1520 -- Computer Use Fundamentals
  • first truly mass auxiliary storage device
  • Serious drawback To access data in the middle of
    the tape, all the date before the piece of data
    that you want must be accessed and discarded

30
Secondary Storage Devices Magnetic Disks
EECS 1520 -- Computer Use Fundamentals
  • The surface of each disk is logically organized
    into tracks and sectors
  • Tracks are concentric circles around the surface
    of the disk
  • Each track is divided into sectors , each sector
    holds a block of information as a continuous
    sequence of bits

31
Secondary Storage Devices Magnetic Disks
EECS 1520 -- Computer Use Fundamentals
  • The read/write head in a disk drive is positioned
    on an arm that moves from one track to another.
  • An input/output instruction specifies the track
    and sector
  • When the read/write head is over the proper
    track, it waits until the appropriate sector is
    beneath the head it then accesses the block of
    information in that sector

32
Secondary Storage Devices Magnetic Disks
EECS 1520 -- Computer Use Fundamentals
  • seek time the time it takes for the read/write
    head to get into position over the specified
    track
  • latency (also called rotational delay) the time
    it takes for the specified sector to spin to the
    read/write head
  • access time the time it takes for a block to
    start being read
  • transfer rate the rate at which data moves from
    the disk to memory

33
Secondary Storage Devices Magnetic Disks
EECS 1520 -- Computer Use Fundamentals
  • Hard disk drive consists of several platters
    attached to a spindle that rotates
  • Each platter has its own read/write head. All of
    the tracks that line up under one another are
    called cylinder.

34
Secondary Storage Devices CDs, DVDs
EECS 1520 -- Computer Use Fundamentals
CD compact disk
  • CD-DA compact disk-digital audio
  • CD-R compact disk-recordable the contents
    of a CD-R cannot be changed after data is
    recorded on it. Data can be written once and
    read arbitrarily many times
  • CR-RW compact disk-rewritable meaning that
    it can have data recorded on it multiple times
  • Similarly, we also have DVD-R, DVD-RW
Write a Comment
User Comments (0)
About PowerShow.com