Problem 1 Read the MIPS code and answer the following questions.
(a) What does function f1 do?
Ans: Find the first i such that A[i]-B[i] < C[i]
(b) What will f1 return in $v0?
Ans. 3
main:
.text
.globl main
la $a0,
la $a1,
la $a2,
li $a3,
jal f1
A
B
C
10
1. Design a simplified MIPS processor that supports only beq and sw. You may ask them to
draw on this figure:
The answer is the following.
2. Design a simplified MIPS processor that supports only addi and lw. You may ask them to
draw on this figure, and s
Design a circuit that has two inputs, clk and X, and produces one output O. X may change every
clock cycle, and the change happens at the falling edge. The circuit samples the input at every
rising edge of the clock. If the input is 1, consider as read a
In this recitation, the goal is to let the students get familiar with both sequential circuit design
and Verilog. You may first help the students with their problems with the Verilog simulator. All
students are supposed to be able to run the simulator, an
In this recitation, you may help the students with some more advanced combinatorial circuit
design:
1. You may ask them to design a 4-bit encoder, which takes four bit inputs and output two bits.
If the input bits are 1xxx, the output is 11. If the input
In this recitation, please help the students with the K-map. This is a very good link I found on the
web about the K-map:
http:/www.ee.surrey.ac.uk/Projects/Labview/minimisation/karrules.html
so please go over this with the students first. Then, ask them
In the lecture I will discuss how to write the basic main loop for an embedded controller. Based
on the TV.asm given in the lecture downloadable from the slides, write a process_input function
that responds to `m, `h, `q (ascii code 109, 104, 112, respect
This week, please still try to make sure that every student is able to run SPIM and knows how to
debug with it. In there are additional time, please ask them to write a complete program in
which two floating point arrays, arry0 and arry1 are given, each w
This week, please mainly help the students with how to run codes with SPIM.
1. Use any editor to write the source file.
2. Run PCSpim or QtSpim, load the source file.
3. F10 to step through the code.
Please make sure that every student is able to run SPIM
In this recitation, please mainly help the students in understanding MIPS functions. Help them
with jal, jr first, then help them with the stack. Explain the basic concepts to them.
Then ask the students to write code to implement a function to find the n
1. Ask the students to write code to find the location of the maximum element in an array with
10 positive elements. Try to explain the basic concepts of memory access, shift, loop and
branch to them.
One of the possible implementations is follows:
# find
1. Find the single precision floating number representation of the following decimal numbers:
(a) 1.125
(b) 6.53125
(c) -5.546875
[answer.] (a ) From the last problem, we know that the binary scientific representation of 1.125
is 1.001. So, sign bit is 0,
1. Find the decimal representation of the following binary numbers (regarded as unsigned
integers)
(a) 110010
(b) 101100
(c) 111101
[50, 44, 61]
2. Find the binary representation in 6 bits of the following decimal integers:
(a) 28
(b) 45
(c) 62
[011100, 1
Assignment #6 Digital Logic Design II Sequential Logic
CDA 3100, Computer Organization I
Problem 1 (50 points) Design a circuit that has an input clk, and an output Q which has three
bits. At the rising edge of the clk, the unsigned binary number repr
Assignment #5 Digital Logic Design I Combinational Logic
CDA 3100, Computer Organization I
Problem 1 (40 points) Design a circuit that takes three bits X2, X1, X0, as input, and output one
bit O as output. O is 1 if and only if 1<=X<=3 when X=(X2, X1,
Homework Assignment #2 MIPS Instructions
CDA 3100, Computer Organization I
Submission: A hard copy required.
Problem 1 (30 points) Exercise 2.4.1(p. 182).
The following problems deal with translating from C to MIPS. Assume that the variables
f,g,h,i,
Homework Assignment #1 Number Representations
The purpose of this assignment is to let you be familiar and become comfortable with binary
representations which are used heavily in computer organization.
Problem 1 (30 points, 10 points each) Convert th