Primary contact for this homework: Junaid Khalid [junaid AT cs D0T wisc D0T 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 of bits into ASCII code.
-
01010000 01110010 01101111 01100010 01101100 01100101 01101101 00100000 00110001
Problem 1
Problem 2 (3 points)
Using 8-bit ASCII, represent the following null-terminated string in both binary and hexadecimal (Only convert the characters between the quotation marks.)
-
"HomeWork 3"
0x48 0x6f 0x6d 0x65 0x57 0x6f 0x72 0x6b 0x20 0x33
01001000 01101111 01101101 01100101 01010111 01101111 01110010 01101011 00100000 00110011
Problem 3 (5 points)
Draw a logic circuit which corresponds to the following logic expression. Your circuit can only use 2-input AND, 2-input OR, and NOT gates.
-
(NOT(A OR B )) AND (NOT(B) OR NOT(C)) AND (NOT(NOT(D) OR E ))
Answer
Problem 4 (5 points)
Given the logic equation Z = (A AND B) OR C
-
Fill out the truth table for Z
Answer 4a
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 1
1 1 1 1
-
Draw the transistor level circuit for Z using minimum number of transistor (Hint: Use DeMorgan's Law)
Answer 4b
Z = NOT(NOT(A AND B)) OR NOT(NOT(C))
Z = NOT(A NAND B) OR NOT(NOT(C))
Z = (A NAND B) NAND NOT(C)
Problem 5 (5 points)
Given the following transistor level circuit:
-
Fill out the truth table for Z in terms of A and B
Answer 5a
A B Z
0 0 0
0 1 0
1 0 0
1 1 1
-
Draw the gate level circuit for Z in terms of A and B
Answer 5b
Problem 6 (5 points)
Given the logic circuit below
-
Fill in the truth table for the output value Z
Answer 6a
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 0
1 1 0 0
1 1 1 1
-
Express Z in terms of A, B and C
Answer 6b
((A AND B) OR (B AND C)) AND ((B AND C) OR (C AND A))
Problem 7 (5 points)
Given the following truth table for function Z and inputs A, B, and C:
A B C Z
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
-
Draw the gate-level circuit using NOT, 3-input AND and OR gates.
Answer 7a
-
Draw the gate-level circuit using NOT and NAND gates.
Answer 7b