MIPS Programming
Arrays
Writing Procedures:
Calling Convention
Memory Setup in C/Java
C+: int *intarray = new int[10];
Java: int[] intarray = new int[10];
What does this do? What does the memory look
like?
Where is intarray[5] located? intarray + 20

Program Memory
MIPS memory operations
Getting Variable Addresses
Advanced structures
Registers vs Memory
Registers are fast, temporary memory
Everything residing in a register has a real
home in memory (with an associated address)
Variables live in mem

CS 30 KICKOFF
Dr. Franklin
Todays Schedule
Why are you here?
Roll / Waiting List
Syllabus
Introduction
History
Basic concepts
Counting to 1023 on your fingers!
Computer
Systems
Application (ex: browser)
Compiler
Software
Hardware
Assembler
Operating
Syste

CS30 Lecture 1
How high can you count on your fingers?
10?
I can count to 1023.
This is because the representation you learn as a child is very inefficient.
Ten show the two different ways of saying the number 2.
Then show the number 505. How much is the

Lab2 problems:
Remember to solve these individually, working with your partner only when
you get stuck, and seeking help from the TA only when you are both stuck.
You may NOT use any calculators.
Conversions:
1. Convert the hex number 0xbee into:
a) binar

HW 6
CS 64
Put in a flip-flop / latch / timing question!
1. Draw the finite state diagram, but do not draw the truth
table or determine the logic, for the following traffic light:
The traffic light has four sensors, two for cars and two for
pedestrians.
S

HW 6
Due Friday, May 22nd, 4:45pm in the homework box
K-map simplification
For each problem:
a) Write out the truth table
b) Use a K-map to simplify the above equation
c) Write out the final equation
1. Determine the logic for the overflow bit on an adder

HW 7
CS 30
Due Friday, June 4th, 4:45pm in the HW box
1. Draw the finite state diagram, but do not draw the truth
table or determine the logic, for the following traffic light:
The traffic light has four sensors, two for cars and two for
pedestrians.
Sens

HW 6
Due Friday, May 22nd, 4:45pm in the homework box
K-map simplification
For each problem:
a) Write out the truth table
b) Use a K-map to simplify the above equation
c) Write out the final equation
1. Determine the logic for the overflow bit on an adder

HW 5
Due at the beginning of lab when attendance is checked.
1) Use DeMorgan's law to compute the complement of the
following Boolean expressions:
a) (AB+CD)
b) AB!C + B(!C+A!D)
c) !X + Y
d) X(!Y + Y!Z)
e) X(Y + Z!W + !VS)
2)Simplification
For each proble

HW 5
Due Wednesday, May 19th, at lab. If you have a conflict with
lab, turn it into class on Tuesday or send it with a friend to
lab.
1) Use DeMorgan's law to compute the complement of the
following Boolean expressions:
a) A(B+CD)
b) ABC + B(!C+!D)
c) !X

HW 5
Due Friday, May 8th, 4:45pm in the homework box
1) Boolean simplification
f(A,B,C,D) = (AD + /AC)(/B(C + B/D)
a) Draw the circuit using AND, OR, and NOT gates
b) Using boolean algebra, minimize the equation
c) Draw the resulting circuit
2) Use DeMorg

CS 30
HW3 - First Assembly Program
Goal:
Perform user input / output with assembly
Perform mathematical calculations
Your assignment this week is to write an assembly program that takes
some user input, performs various mathematical manipulations, and

CS 30
HW #2 - Binary representation
Conversions:
1. Convert the decimal number 55 into:
a) binary:
b) hex:
c) octal:
2
a) What decimal number does this unsigned binary number represent:
1111 1111 1111 1111 1111 1111 1011 1101
b) What decimal number does t

CS 64
HW2 - Second Assembly Program
Goal:
Perform user input / output with assembly
Use branches in assembly
In this assignment, in order to exercise the branches in MIPS, you
will ask the user for four numbers and print out the largest and the
smalle

CS 64
HW2 - First Assembly Program
Goal:
Perform user input / output with assembly
Perform mathematical calculations
Your assignment this week is to write an assembly program that takes
some user input, performs various mathematical manipulations, and

CS 30
HW #2 - Binary representation
Conversions:
1. Convert the decimal number 55 into:
a) binary:
0b110111
b) hex:
0x37
c) octal:
0o67
2
a) What decimal number does this unsigned binary number represent:
1111 1111 1111 1111 1111 1111 1011 1101
0xffffffbd

CS 30
HW #1 - Binary representation
Conversions:
1. Convert the decimal number 55 into:
a) binary:
b) hex:
c) octal:
2
a) What decimal number does this unsigned binary number represent:
1111 1111 1011 1101
b) What decimal number does this two's complemen