CS/ECE 252 Introduction to Computer Engineering
Fall 2009 All Sections
Mark D. Hill
Jie Liu, &
Homework 3 (30 points) // Due at Lecture Wed Oct 7
Instructions: You should do this homework in a group of TWO or THREE students from the SAME 252 section.
You should hand in ONE copy of the homework that lists the common section number
and names and UW ID numbers of all students.
You should staple multiple pages together.
Warning: Most homeworks will use questions from your textbook,
Patt and Patel's Introduction to Computing Systems,
which we abbreviate (ItCS) .
First contact for questions is TA Jie Liu (firstname.lastname@example.org).
Problem 1 (3 points)
Draw a logic circuit corresponding to the following logic expression. Your circuit must use only 2-input AND, 2-input OR, and NOT gates. Hint: i OR j OR k = (i OR j) OR k.
Z = (NOT(A OR B OR C OR D)) AND (C OR NOT(D)) AND (NOT(A) OR E)
Problem 2 (5 points)
For the transistor-level circuit below, fill in the truth table. What is Z in terms of A and B?
Problem 3 (3 points)
On Page 58 of ItCS, the DeMorgan's Law states that NOT( NOT(A) AND NOT(B)) = A OR B. If we swap AND and OR gates in the equation, it becomes NOT( NOT(A) OR NOT(B)) = A AND B. Prove the new equation true or false.
Problem 4 (4 points)
For the following finite state machine, X is the starting state. The input
sequence is: red green green green red yellow red green yellow.
a. What is the output string? Answer: pop bob ...
b. What is the final state?
Problem 5 (5 points)
Problem 3.23 from ItCS.
Problem 6 (4 points)
a. In practice, most hardware designs use NOT, NOR, and NAND gates instead of OR and AND gates. Why is that?
b. Rewrite the logic equation (NOT(A) OR B) AND (C AND D) using only NOT, NOR, and NAND gates.
Problem 7 (6 points)
a. Draw a truth table for a logic circuit that performs the following function. It has three inputs A, B, and C. The output Z is 1 if
and only if the total number of 1s among A, B, and C is two.
b. Write the logic expression corresponding to the circuit.