Modules 3-7
What does ALU stand for and what does it do?
Arithmetic and Logic Unit
Performs arithmetic and logic operations
Examples of Arithmetic Operations on Data
Add
Subtract
Multiply
Examples of Logical Operations on Data
Check if equal
Bitwise-or
Register
Temporary storage location in the processor
ALU reads operands from _______.
Registers
________ are also sent to the ALU to select what operation to perform.
Control Signals
Control signals are provided by ______ and depend on the ______ executed.
Processor
Instruction currently being executed
ALU writes the result of an operation to a ______.
Register
ALU can set _____ which provide additional info about the operation’s result (e.g. overflow occurred). _____ values are also stored in _______.
Flag/s
Registers
Memory Characteristics
Location
Capacity
Unit of Transfer
Method of Accessing
Performance
Physical Type
Physical Characteristics
Organization
Location
Whether memory is internal or external
Internal Memory
Refers to devices like main memory and cache
External Memory
Peripherals like disk drives, accessible to the process via I/O controllers
Word
Natural unit of organization of memory
Size
Number of bits used to represent an integer or length of an instruction
In some systems, the _____ is the word.
Addressable Unit
Formula for length in bits of address (A) and number of addressable units (N)
Log2 (N) = A
Unit of Transfer
How much data can be read out of or written into memory at a time
Unit of Transfer for Internal Memory
Number of electrical lines into and out of memory module (64, 128 or 256 bits)
* Not necessarily equal to an addressable unit
Unit of Transfer for External Memory
Block, a significantly larger unit than a word
4 methods of accessing data
Sequential
Direct
Random
Associative
Sequential Access
Access must be made in specific linear sequence
Stored addressing for distinguishing records and helping in data retrieval
Tapes (units for tape drives)
In sequential access, memory is organized into units of data called ___.
Records
How does sequential access work?
Shared read-write mechanism moved from current location to desired location, passing & rejecting intermediate records
In sequential access, ____ an arbitrary record is highly variable
Time to access
Direct Access
Disks (disks in hard disk drive)
Uses shared read-write mechanism
But individual blocks/records have unique address based on physical location
How does direct access work?
First to reach general vicinity
Then use sequential searching, counting or waiting to reach desired location
The basic element of a semiconductor memory is the ___________ which stores a bit
Memory cell
Examples of Random Access
Main memory
Some caches
SSDs
Access time of random access is ____ and is ______ of the sequence prior the accesses
Constant
Independent
Examples of Associative
Some caches
How does Associative work?
Compares desired bit locations in a word for a specified match (does this for all words simultaneously)
In associative, data is retrieved based on _______ instead of actual address
a portion of its contents
3 parameters that measure performance
Access Time
Memory Cycle Time
Transfer Rate
Access Time is also known as ___?
Latency
For access time of random-access memory, this is the time from _______ to ________.
The instant that an address is presented to memory
The instant that data is stored or made available for use
For access time of non-random-access memory, this is the time it takes to ___.
Position the read-write mechanism at the desired location
Memory cycle time
Access time + any additional time required before a second access can start
Data that is _______ needs additional _____ time to _____
Read destructively
Memory cycle time
Regenerate data
Memory cycle time primarily applies to _______ and is concerns with the _____ not the ______.
Random-access memory
System bus
Processor
Transfer Rate
Rate at which data can be read from or written to a memory unit
For random-access memory, transfer rate is equal to the ______
Reciprocal of memory cycle time
destructively
Data in DRAM is read ____________; reading from a cell will discharge the capacitor.
Transfer Rate Formula
Tn = Ta + (n/R)
Tn average read or write time in n bits
Ta average access time
R transfer rate in bits per sec (bps)
Physical Types of Memories
Semiconductor memory (EX. RAM, solid-state)
Magnetic surface memory (EX. Disks, tapes)
Optical (EX. Blu-ray)
Magneto-optical (EX. Sony MiniDiscs)
Physical characteristics of data storage
Determine what can happen to the data
Read-only Memory (ROM)
Nonvolatile
Semiconductor memory
Has permanent pattern of data that can’t be changed
Read-mostly Memory
Useful when read operations are more used than write operations
But needs nonvolatile storage
Main memory is composed of a collection of ____________.
DRAM chips
A number of chips can be grouped together to form a ___________.
memory bank
Dynamic RAM (DRAM)
Basic building block of main memory
Prefetch Buffer
cache located on the SDRAM chip
Physical characteristics
______________ of data storage determine what can happen to the data
Volatile Memory
In ____, data decays naturally or is lost when electrical power is switched off
nonvolatile
In ________ memory, recorded data remains without deterioration until deliberately change;
No electrical power is needed to retain data
In __________ memory, memory, data cannot be altered except by destroying the storage unit
nonerasable
Organization
Physical arrangement of bits to form words
operational code (opcode)
Part of every instruction in machine language
Tells the hardware what operation needs to be performed with this instruction
A string of bits very relevant to the decode step
7 opcode categories
Data transfer
Arithmetic
Logical
Conversion
I/O
System control
Transfer of control
4 single-operand instructions
absolute, negate, increment, decrement
Bitwise operations are often referred to as “____________” that are based on Boolean operations
bit twiddling
Bitwise Operations
Most machines have operations for manipulating individual bits of a word or addressable units
cyclic shift
Rotate is also known as “_______________”.
For internal memory, capacity is typically expressed in ________.
bytes (8 bits) or words (8, 16, 32 or 64 bits)
For external memory, capacity is typically expressed in ________.
bytes
3 different physical characteristics
volatile, nonvolatile, nonerasable
Between CISC and RISC, which one has simpler functionality but longer code?
RISC
Register
is a temporary storage location within the processor
Endianness
refers to byte ordering in a multibyte scalar value
Big Endian
In __________, the most significant byte is stored in the lowest numerical address
Little Endian
In __________, the most significant byte is stored in the highest numerical address
Semiconductor memory can be ______ or ______
volatile or nonvolatile
Organization is the same as endianness. True or False?
FALSE
Semiconductor memory cells share certain properties
2 stable (or semistable) states to represent binary 1 and 0
Can be written into (at least once) to set the state
Can be read to "sense" the state
Random-access memory (RAM)
Most common type of semiconductor memory
Possible to read data from and write new data into RAM easily and quickly
In Random-Access Memory, Reading and writing is achieved through _____.
electrical signals
Random-Access Memory is a ______ storage.
Temporary storage
Since it is volatile and must be provided with a constant power supply
2 Traditional forms of Random-Access Memory used in computers
DRAM and SRAM
DRAM
Dynamic RAM
Dynamic RAM is made with ________ that ______
cells that store data as charge on capacitors
Presence or absence of charge in capacitor is interpreted as ___ or ___.
Binary 1 or 0
DRAM requires ______ to maintain data storage
periodic charge refreshing since capacitors naturally tend to discharge even with continuous power applied, so it’s "dynamic"
What are the following parts of the DRAM covered in yellow?
Access FET
Explicit storage capacitor
Data in DRAM is read ______.
Destructively
Reading from a cell will discharge the capacitor
Data must be restored as part of completing the read operation
SRAM
Static RAM
Static RAM
a digital device that uses the same logic elements in the processor
How are binary values stored in Static RAM
Using traditional flip-flop logic-gate configurations
SRAM will hold data as long as _____.
power is supplied to it
What are the parts of the Static RAM covered in yellow
static bistable storage element
word line
bit
access FET
DRAM vs SRAM
Both are volatile
Dynamic memory cell is simpler and smaller than a Static memory cell
DRAM and SRAM, Which is cheaper? Which provides more storage given the same physical space occupied?
DRAM is cheaper and less transistor so it occupies less space (smaller)
DRAM - main memory
SRAM - cache
True
Cheaper DRAM cell, ____ memory, ______ cost for refresh circuitry, _______ of DRAM cell
Larger memories
Fixed cost of the refresh circuitry
smaller variable cost of DRAM cell
Which one is faster, SRAM or DRAM?
SRAMs are somewhat faster than DRAMs
SRAM doesn't require a refresh cycle during a read operation
Can you write new data in Read-only memory?
normally not possible
Read-mostly Memory is not a variation on read-only memory
False
Types of ROM
Read-Only Memory (ROM)
Programmable ROM
Erasable Programmable ROM
Electrically Erasable Programmable ROM
Flash Memory
How is a ROM created?
Like any other integrated circuit chip, with the data wired into the chip during fabrication process
In Read-Only Memory, what happens if a bit is wrong?
If even one bit is wrong, the entire batch of affected ROMs must be discarded
What is the advantage of Read-Only Memory (ROM) when it's part of main memory?
no need to load data from a secondary storage device since data is already permanently stored in ROM