STAT 400
Fall 2011
Homework #6
(10 points)
(due Friday, October 14th, by 3:00 p.m.)
No credit will be given without supporting work.
1. The fill problem is important in many industries, such as those
STAT 400
Fall 2011
Homework #3
(10 points)
(due Friday, September 16, by 3:00 p.m.)
No credit will be given without supporting work.
1.
Homer Simpson is going to Moes Bar for some Flaming Moes. Let X
STAT 400
Spring 2011
Homework #8
(due Thursday, March 17, by 4:30 p.m.)
No credit will be given without supporting work.
1.
Dick and Jane have agreed to meet for lunch between noon (0:00 p.m.) and
1:0
STAT 400 / MATH 463
Fall 2011
Homework #1
(due Friday, September 2, by 3:00 p.m.)
1.
Suppose that P(A) = 0.60, P(B) = 0.40, P(A B) = 0.30.
What is the probability that
a)
either A occurs or B occurs
STAT 400
Fall 2011
Homework #2
(10 points)
(due Friday, September 9, by 3:00 p.m.)
No credit will be given without supporting work.
1.
Bob is applying for a job with five companies. At the first compa
Random access memory
Sequential circuits all depend upon the presence of memory.
A flip-flop can store one bit of information.
A register can store a single word, typically 32-64 bits.
Random access
Datapaths
For the rest of the semester, well focus on computer architecture: how
to assemble the combinational and sequential components weve studied
so far into a complete computer.
Today, well start
Instruction set architectures
Last time we built a simple, but complete, datapath.
The datapath is ultimately controlled by a programmer, so today well
look at several aspects of this programming in m
Instruction encoding
Weve already seen some important aspects of processor design.
A datapath contains an ALU, registers and memory.
Programmers and compilers use instruction sets to issue commands.
CS 341
Programming Language Design and Implementation
Spring 2016
HW #2:
CTA L Ridership Analysis
Complete By: Wednesday, January 27th @ 11:59pm
Assignment: modern C+ program to perform analysis
Polic
Example
Suppose that R0 contains the base address of an
array of an array of n bytes
Translate this code into assembly
int sum = 0;
for (int i = 0; i < n; i+)
sum += A[i];
1
Example
int R3 = 0;
for (R
Registers
Today well see another common sequential device: registers.
Theyre a good example of sequential analysis and design.
They are also frequently used in building larger sequential circuits.
R
Flip-Flops
Last time, we saw how latches can be used as memory in a circuit.
Latches introduce new problems:
We need to know when to enable a latch.
We also need to quickly disable a latch.
In othe
Arithmetic-logic units
An arithmetic-logic unit, or ALU, performs many different arithmetic
and logic operations. The ALU is the heart of a processoryou could
say that everything else in the CPU is th
Negative Numbers and Subtraction
The adders we designed can add only non-negative numbers
If we can represent negative numbers, then subtraction is just
the ability to add two numbers (one of which m
Addition and multiplication
Arithmetic is the most basic thing you can do with a computer, but its
not as easy as you might expect!
These next few lectures focus on addition, subtraction, multiplicati
Multiplexers
Today, well study multiplexers, which are just as commonly used as the
decoders we presented last time. Again,
These serve as examples for circuit analysis and modular design.
Multiplex
Decoders
Now, well look at some commonly used circuits: decoders and
multiplexers.
These serve as examples of the circuit analysis and design
techniques from last lecture.
They can be used to implem
Additional gates
Weve already seen all the basic Boolean operations and the associated
primitive logic gates.
There are a few additional gates that are often used in logic design.
They are all equiva
Karnaugh Maps
1
Karnaugh maps
Last time we saw applications of Boolean logic to circuit design.
The basic Boolean operations are AND, OR and NOT.
These operations can be combined to form complex exp
Addition and multiplication
Arithmetic is the most basic thing you can do with a computer, but it's not as easy as you might expect! These next few lectures focus on addition, subtraction, multiplic
Negative Numbers and Subtraction
The adders we designed can add only nonnegative numbers If we can represent negative numbers, then subtraction is "just" the ability to add two numbers (one of which
Arithmetic-logic units
An arithmeticlogic unit, or ALU, performs many different arithmetic and logic operations. The ALU is the "heart" of a processor-you could say that everything else in the CPU i
Review: Tree search
Initialize the frontier using the starting state
While the frontier is not empty
Choose a frontier node to expand according to search strategy
and take it off the frontier
If t
MIPS Load & Stores
Todays lecture
MIPS Load & Stores
Data Memory
Load and Store Instructions
Encoding
How are they implemented?
State the central concept of computing
What happens when the regist
What does this C code do?
intfoo(char*s)cfw_
intL=0;
while(*s+)cfw_
+L;
returnL;
Pointers, the Spiral Rule, and Structs
How to read C type declarations
C Strings
ASCII and null-termination
Array
MIPS Load & Stores
Todays lecture
MIPS Load & Stores
Data Memory
Load and Store Instructions
Encoding
How are they implemented?
State the central concept of computing
What happens when the regist
MIPS assembly
programming:
Todays lecture
Exam 3 Structure
Review the Datapath
Trace a couple of instructions
Assembly programming
Register names
How is it implemented?
Branches
Loops
If/then
CS 341
Programming Language Design and Implementation
Spring 2016
HW #3:
CTA L Ridership Analysis, Part 2
Complete By: Tuesday, February 9th @ 11:59pm
Assignment: modern C+ program to perform analysis
CS 341
Programming Language Design and Implementation
Spring 2016
Homework #4
Complete By:
Assignment:
Policy:
Submission:
Wednesday, February 17th @ 11:59pm
completion of following exercise (parts 1-