CS/ECE 552-1: Introduction to Computer Architecture
Spring 2005
Problem Set #0
Due: You don't need to turn it in
The main objective of this problem set is to give you an idea what background
you should have before taking this course. Since you are doing lots of
logic design for the homework and the project during this semester, it
is important for you to go over the basic idea that is covered by problem
1-3. If you have no idea about writing VHDL, start learning it by doing
problem 4. Good skill in VHDL makes your life easier when doing the project.
Problem 1
Complementary numbers form the basis of complementary
arithmetic, which is a powerful method often used in digital systems
for handling mathematical operations on signed numbers. In these systems,
negative numbers are represented as the complement of the corresponding
positive number. The radix complement [N]r of a number (N)r
is defined as [N]r = rn - (N)r. where
n is number of digits in (N)r. or it can be a pre-defined number
of digits in a given digital system.
-
find the 2's complement of (101110)2 for n = 8.
-
find the 10's complement of (40980)10 for n = 5, verify
that [N]10 = - (N)10. and that [[N]10
]10 = (N)10.
-
use 5-bit 2's complement arithmetic to compute the following, how do you
interpret the result? is it a valid result?
Problem 2
In 1849, George Boole presented an algebraic formulation of the processes
of logical thought and reason. A Boolean algebra is a closed algebraic
system containing a set S of 2 or more elements
and the two operators · (AND) and + (OR), for every a and
b in set S (a AND b) belongs to S and (a OR b) belongs to S. If there are
only 2 elements
in S, S = {0, 1}, this formulation is often referred to as switching
algebra, which is extremely useful in digital
system design. Venn diagrams can be used as graphical description of Boolean
algebra.
-
find the SOP(sum of product, constructed by summing(ORing)
product(ANDed)terms) form for (a XOR b XOR c).
-
draw a Venn diagram to represent (a XOR b XOR c).
-
make a truth table for a circuit that adds two 2-bit
binary numbers (A1A0)2 and (B1B0)2
and produces the sum bits (S1S0) and the carry
out bit C1 . derive the logic equations.
Problem 3
The state diagram
is a graphical representation of a sequential circuit in which the states
of the circuit are represented by circles and the state transitions are
show by arrows. Each arrow is labeled with the input and the resulting
circuit output.
-
draw a state diagram of a D flip-flop
-
draw a state diagram of a 2-bit counter, the counter
increase its value when get "1"s.
-
draw a state machine of 4 bit sequence detector,
which will output 1 only when it gets the "1010" sequence of inputs in
last 4 clock cycle.
Problem 4
VHDL is a powerful tool for hardware modeling. If
you don't know how to use VHDL, you may find some useful links on the course
web site. try to model a simple pop machine using VHDL:
-
the pop machine pops out a piece of cookie when it
gets a nickel.
-
it keep tracking how many cookies and how may nickels
it has, signal empty if it is out of cookies or out of nickels, respectively.
-
if it gets a dime, it pops out a cookie, and a nickel
for change ONLY when it has nickels.
-
it takes any other coins that is larger than a dime,
e.g. a quarter, as a dime, dumb but not stupid.
-
any forge coin will be accepted silently, of course,
no cookies out.
some suggestions:
-
use variable and signal appropriately
-
use enumeration type
-
use case statements correctly, MUST have a "others"
clause within a case statement.
-
use seperate processes to handle combinational part
and squential part.