Homework 3 [Due at lecture on Mon, Oct 7]
Primary contact for this homework: Sujith Surendran [sujiths at cs dot wisc dot edu]
You must do this homework in groups of two. Please write the full name and the student id of each member on every page and staple multiple pages together.
Problem 1 (2 points)
Convert the following string (only the characters within the quotes) into its ASCII representation: "Lc-3". Represent each character in hexadecimal. Assume that the string is null terminated.
L=0x4C, c=0x63, "-"=0x2D, 3=0x33, Null=0x00
"Lc-3" = 0x4C632D3300
Problem 2 (2 points)
For the following circuit, give the equation for output Z in terms of inputs A, B, and C.
Z = NOT ( NOT(A OR B) AND C)
= A OR B OR NOT(C)
Problem 3 (6 points)
Given the following transistor level circuit:
- (2 points) Fill out the truth table for Z
A | B | Z |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 0 |
1 | 1 | 0 |
(2 points) Give the equation for Z in terms of A and B
Z = NOT(A) AND B
(2 points) Draw the gate-level circuit for Z using 2-input AND/OR gates and NOT gates
Problem 4 (8 points)
Given the logic equation Z = NOT ( ( A AND B ) OR NOT(C) )
- (2 points) Fill out the truth table for Z.
A | B | C | Z |
0 | 0 | 0 | 0 |
0 | 0 | 1 | 1 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 1 |
1 | 0 | 0 | 0 |
1 | 0 | 1 | 1 |
1 | 1 | 0 | 0 |
1 | 1 | 1 | 0 |
- (2 points) Draw the gate-level circuit for Z using only 2-input NAND and NOR gates (Hint: DeMorgan's law).
- (4 points) Draw the transistor-level equivalent of the circuit.
Problem 5 (6 points)
Suppose A, B, and C are inputs to a logic function which generates Z based on the following truth table:
A | B | C | Z |
0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 1 |
1 | 0 | 0 | 0 |
1 | 0 | 1 | 1 |
1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 |
- (2 points) Give the equation for Z in terms of A, B and C.
Z = (NOT (A) AND B AND C) OR (A AND NOT(B) AND C) OR (A AND B AND C)
Z (simplified) = (A OR B) AND C
- (4 points) Draw the gate-level circuit for Z using NOT gates and 3-input AND/OR gates.
Problem 6 (6 points)
Assume that a function F exist which takes in 3 bits A, B and C. This function generates an output Z such that:
- Z=1 if (C = 1) and (A = B)
- Z=0 otherwise
- (4 points) Fill out the truth table for Z
A | B | C | Z |
0 | 0 | 0 | 0 |
0 | 0 | 1 | 1 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 0 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 |
- (2 points) Write the logic expression for Z in terms of A, B and C.
Z = C AND ( (A AND B) OR (NOT(A) AND NOT(B) ) )
|