CSE 220
Practice Problems #7 - SOLUTIONS
Problem 1: Given the bit pattern: 1010 1100 1011 0101 0011 0000 0011 1000, what value does it
represent, assuming that it is,
(a) a two's complement integer?
(b) an unsigned integer?
(c) a single precision floating
CSE220
Practice Problems #5
Problem 1: For the following instructions:
sw $4, -100 ($16)
add $1, $2, $3
beq $5, $7, -20
a. What is the 32-bit binary value of each instruction? Use the table in Appendix B of the textbook
to determine opcodes.
b. Highlight
CSE220
Practice Problems #1
Problem 1: For the following functions:
F (x, y, z) = xyz + xy z + x y z
G(x, y, z) = (x + y)(x + z)(x + z)
a) How many literals in each expression? How many terms?
b) Create the truth table.
c) Name the minterms ( m(?) and ma
CSE220
Practice Problems #6
Solutions
Problem 1: When estimating the performance of the single-cycle datapath we assumed that only the
major functional units had any delay (ie, mux, control unit, PC access, sign extension unit, all other
combinatorial log
CS220 Spring 2015
Practice Problems #8 Solutions
Problem 1: Assuming the following timings for the components of the datapath. All other components have no
delay.
Data/Instruction Memory Read: 200ps
Adders: 80ps
Data Memory Write: 100ps
ALUs:
CSE220
Practice Problems #6
Problem 1: When estimating the performance of the single-cycle datapath we assumed that only the
major functional units had any delay (ie, mux, control unit, PC access, sign extension unit, all other
combinatorial logic and wir
CSE 220
Practice Problems # 7
(No Quiz)
Problem 1: Given the bit pattern: 1010 1100 1011 0101 0011 0000 0011 1000, what value does it
represent, assuming that it is,
(a) a two's complement integer?
(b) an unsigned integer?
(c) a single precision floating-
CSE220
Spring 2014 Practice Midterm #1
1.
(Show all work) Convert the following binary number 010011101011 to:
(a) Decimal
(b) Octal (base 8)
(c) Hexadecimal (base 16)
(d) Base 5
2. Convert 4.9 in decimal to a number in base 3. Stop after pattern starts r
CSE220 Fall 2014 - Homework 1
Due Friday 9/19/2014 @ 6pm
The goal of this homework is to become f amiliar with basic MIPS instructions and syscalls. You should be able
to interpret pieces of binary data as dif f erent numerical f ormats: signed-magnitude,
CSE220
Practice Problems #3
Problem 1: Design a black box that has a 3-bit input x, and a 3-bit output y. The function of the
unit is y = (5x) % 8.
a) Create the truth table.
b) Implement each output with the minimal gate logic in NAND-NAND and NOR-NOR.
c
CSE220
Practice Problems #2
Solutions
Problem 1: For the following functions:
F (x, y, z) = xyz + xy z + x y z
G(x, y, z) = (x + y)(x + z)(x + z)
a) How many literals in each expression? How many terms?
b) Create the truth table.
c) Name the minterms ( m
CSE220
Practice Problems #4
Solutions
Problem 1: Universal Set. Show that the following groups of gates are universal sets by using the set
of gates to build AND, OR and NOT gates.
(a) cfw_NAND
(b) cfw_NOR
(c) cfw_2-input (1-bit selector) multiplexors
(d)
CSE220
Practice Problems #5
Solutions
Problem 1: For the following instructions:
sw $4, -100 ($16)
add $1, $2, $3
beq $5, $7, -20
a. What is the 32-bit binary value of each instruction? Use the table in Appendix B of the textbook
to determine opcodes.
Sol
CSE 220: Systems Fundamentals I
First Name:
SBU ID#:
Quiz #1 Version A
Stony Brook University Spring 2016
Last Name:
Recitation Section #:
Score:
/ 15
1. [3 pts] Convert 6248 to hexadecimal. You must show all work to receive full credit. Circle your final
CSE220 - Branching, & Control Structures in MIPS
Branch instructions allow for the changing of the flow of the program. Without them, the program will
continue in a straight line of execution.
Two types of branch instructions
o Conditional branches
o Unco
CSE220 Lecture 9
Combinatorial Digital Logic
Digital Logic is how all instructions and calculations are implemented.
o Underlying representation of storage, memory, calculations, etc.
o Study to understand how control logic, registers, actually function.
CSE220 Lec 17-18
MIPS Instruction Set Architecture & Datapath
We have studied how to build various building blocks, such as the ALU.
Next we will examine how to connect these building blocks together to build a working
processor and how to control the mov
CSE220 Spring 2016 - Homework 3
Due Saturday 04/09/2016 @ 11:59pm
Updates after original release of homework
document are in green font.
The f ocus of this homework is to learn about reading data f rom f iles, memory
org anization, and multi-dimensional a
CSE220 Lecture 8
Function and Procedure Calls in MIPS
Functions allow for more structured programs, code reuse, and makes code easier to understand and
maintain.
Function Call Steps
There are 6 steps to calling a function in MIPS.
1.
2.
3.
4.
5.
6.
Place
CSE220 - Logical Operations
New Perspective: View contents of register as 32 raw bits rather than as a single 32-bit number
Since registers are composed of 32 bits, we may want to access individual bits (or groups of bits) rather
than the whole.
Two new c
CSE 220 Spring 2016 Quiz #4 Version A
Solutions
ID
Name
Score
Problem 1: (5 pts) Highlight/mark the datapath used by the beq instruction when the branch is taken.
Problem 2: (5 pts) Calculate the critical path delay for the beq instruction using the follo
LectureNotesforProf.WongsLecture4&5(2/4&2/9)are
basedonProf.McDonnellsLecture
Computer Instructions
CSE 220:
Recall that a computers architecture is the programmer's
view of a computer
The architecture is defined, in part, by its instruction set
These
CSE220 Lecture 14
Arithmetic Logic Unit (ALU)
A major component of a processor.
Arithmetic part does addition and subtraction of two numbers.
Logical part calculates bitwise AND & OR of two values.
How does it subtract? Uses adder.
A B = A + 2s complement
CSE220 Spring 2016 - Homework 4
Due Friday 4/29/2016 @ 11:59pm
In this assig nment, you will implement several recursive f unctions in MIPS. In each case, the
hig h-level source code is provided. You MUST implement all the f unctions in the assignment
usi
Pipelining Basics
CSE 220:
What we have seen so far in the single-cycle and multicycle
CPUs is a very simplified approach to the execution of MIPS
instructions
We fetch an instruction, decode it, and execute it
completely before starting another instruc
Multicycle Processors
CSE 220:
The single-cycle processor has three major weaknesses:
1. The clock cycle must be long enough to support the
slowest instruction (lw), but most operations are faster
System Fundamentals I
2. It requires three adders, which
Microarchitecture
CSE 220:
For most of the remainder of the semester we will look at
different ways to piece together a MIPS CPU
We will study microarchitecture, which is how an
architecture is actually implemented in the hardware
A particular architec
Digital Abstraction
Most physical variables are continuous
Temperature
Voltage on a wire
Frequency of an oscillation
Position of a mass
Although voltage, charge and other electrical quantities are
continuous in nature, modern computers are all digit
Timing of Circuits
CSE 220:
Electricity does not flow through a circuit instantaneously
There are delays as signals travel down wires and through
gates and combinational units
There is a delay between a
change in the output to a
gate and the subsequent