HOMEWORK ASSIGNMENTS
Spring 2012
Last update: 20 April 2012
Due dates will be assigned as the semester progresses.
Programming Assignment 0: (2/7)
Turn in the source code listing and output of a program that
will print out your name (last name first then a comma then
your first name) and your UTD e-mail address on the next line.
(Note that if you do not read your UTD e-mail
you better take the small effort to set up the transfer of
your UTD e-mail to the e-mail address you do read regularly!)
This is for me to take role and to see that you have been able to
install PCSPIM on your system.
See (P) page 26 for a program to modify.
Lab Assignment 1:
(2/21)
Lab Assignment 2:
(2/28)
Lab Assignment 3:
(3/06)
Lab Assignment 4:
(3/20)
Look at the laboratory assignments that Dr. Dodge has on his web site!
http://www.utdallas.edu/~dodge/EE2310
We will follow the first four of his assignments in ECSS4.622.
The programming assignments will differ in quantity and quality (see below).
Digital Assignment 1:
(2/14)
Homework #2 of Dr. Dodge (Digital Logic Circuits and Simplifying Logic with Karnaugh Maps)
Digital NON-Assignment 2:
(do not turn in)
Work homework #3 of Dr. Dodge (Simple Flip-Flops and Timing Diagrams)
on your own and then check his answers.
Digital NON-Assignment 3:
(do not turn in)
Work homework #4 of Dr. Dodge (Complex Flip-Flops and Sequential Logic)
on your own and then check his answers.
Programming Assignment 1:
(2/16)
Write a SPIM program to do multiplication on a MIPS
processor without using the multiplication unit. You
are to do it by repeated addition as if there was no
multiplication built in (as early processors like the
Z80).
Your program should (1) prompt for the two integers,
(2) echo them (with labels), (3) do the processing, and (4) print
out the labeled answer. Call your program
nnn.s
where "nnn" stands for the first three letters of your
last name (if you have that many).
e-mail the program to me as an attachment with the above name.
Programming Assignment 2:
(3/01)
Write a SPIM program to demonstrate problem 4 on page 50 of P.
Your program should
(1) Prompt for a sentence with all its punctuation and different cases.
(2) Echo the input.
(3) Modify the sentence to remove all punctuation, spaces, or special characters.
(4) Further modify the sentence to put all letters in upper case.
(5) Test to see if the modified string is a palindrome.
(6) Print out the modified string and state whether or not it is a palindrome.
Call your program
nnn2.s
where "nnn" again stands for the first three letters of your
last name (if you have that many).
e-mail the program to me as an attachment with the above name.
My code: palindrome.s
Programming Assignment 3:
(3/22)
Write a SPIM program which will take as input an integer
(N) and produce as output string consisting of the digits
of the number N. For example, with input 123 the
output should be One Two Three.
Your program should
(1) Prompt for a positive number (checking that it is positive).
(2) Echo the input.
(3) Form a string consisting of the words "one", "two", etc. that
give the digits of the number.
(4) Print out the string of digits.
Call your program
nnn3.s
where "nnn" again stands for the first three letters of your
last name.
e-mail the program to me as an attachment with the above name.
My code: digits.s
Programming Assignment 4:
(4/12)
Based on the
fileio.s
program,
write a SPIM program which will essentially solve problem
6 of Chapter 6.
Your program should
(1) Prompt for a complete file name. [Note: Probably should be in
the same directory as the program.]
(2) Echo the input.
(3) Test to see if a file by that name already exists. If it does,
query the user to see if destruction of the old file is desired.
If so, continue to the next step. Otherwise, give the user another
chance to create a new file with a different name.
(4) If the file does not exist or the user approves of
destroying the old file, create it and put the name of the file
in it and echo it as in the example program.
Call your program
nnn4.s
where "nnn" again stands for the first three letters of your
last name.
e-mail the program to me as an attachment with the above name.