CS 4341 — Digital Logic and Computer Design, Homework 1
1.12 What is the smallest (most negative) 32-bit binary number that can be represented with
Unsigned numbers?
Two’s complement numbers?
Sign/Magnitude Numbers?
1.16 (c,d) Convert the following unsigned binary numbers to hexadecimal. Show your work.
1.18c Convert the following hexadecimal numbers to decimal. Show your work.
1.20d Convert the following hexadecimal numbers to unsigned binary. Show your work.
Because hexadecimal is , we can simply convert each hexadecimal digit into a 4-bit binary number
1.22 (c,d) Convert the following two’s complement binary numbers to decimal.
1.24 d Repeat Exercise 1.22, assuming the binary numbers are in sign/magnitude form rather than two’s complement representation.
1.30 (b,c,e) Convert the following decimal numbers to 8-bit two’s complement numbers or indicate that the decimal number would overflow the range.
After flipping all bits starting at the first one,
This is simple, since is a power of
After flipping all bits starting at the first one,
1.40 c Convert each of the following octal numbers to binary, hexadecimal, and decimal.
Because octal is , we can simply convert each octal digit into a 3-bit binary number
From here, because hexadecimal is , we can simply convert every 4 binary digits into a decimal number.
1.42 How many 7-bit two’s complement numbers are greater than 0? How many are less than 0? How would your answers differ for sign/magnitude numbers?
2′s complement
Sign/magnitude
1.56 (a,c,e) Convert the following decimal numbers to 6-bit two’s complement binary numbers and add them. Indicate whether or not the sum overflows a 6-bit result.
1.73 A majority gate produces a TRUE output if and only if more than half of its inputs are TRUE. Complete a truth table for the three-input majority gate shown in Figure 1.41.
| A | B | C | D |
| F | F | F | F |
| F | F | T | F |
| F | T | F | F |
| F | T | T | T |
| T | F | F | F |
| T | F | T | T |
| T | T | F | T |
| T | T | T | T |
1.82 While walking down a dark alley, Ben Bitdiddle encounters a two-input gate with the transfer function shown in Figure 1.48. The inputs are A and B and the output is Y.
What kind of logic gate did he find?
He found an AND gate
What are the approximate high and low logic levels?
The approximate high and low logic levels are 2 and 1.8 respectively.
2.2 (c,d) Write a Boolean equation in sum-of-products canonical form for each of the truth tables
| A | B | C | Y |
| 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 | 1 |
| 1 | 1 | 1 | 1 |
| A | B | C | D | Y |
| 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | 0 |
2.6 (c,d) Minimize each of the Boolean equations from Exercise 2.2.
2.8 (c,d) Sketch a reasonably simple combinational circuit implementing each of the functions from Exercise 2.6. (The problem references the functions from 2.2)
c
d
2.12 (c,d) Repeat Exercise 2.8 using only NOT gates and NAND and NOR gates.
c
d
2.14 (a, b) Simplify the following Boolean equations using Boolean theorems. Check for correctness using a truth table or K-map.
Y = ABC + ABC
, since remains constant for both, and it doesn’t matter if C is true or not.
| A | B | C | Y | Not A AND B |
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 |
Y = ABC + AB
. This is easy to see directly from the truth table, since only when all values are 1 is Y = 0. This can be written in product of maxterms form, which is clearly simplified.
| A | B | C | Y | NOT A OR NOT B OR NOT C |
| 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 |
2.24 Write Boolean equations for the circuit in Figure 2.82. You need not minimize the equations.
2.26 Using De Morgan equivalent gates and bubble pushing methods, redraw the circuit in Figure 2.83 so that you can find the Boolean equation by inspection. Write the Boolean equation.
2.28 Find a minimal Boolean equation for the function in Figure 2.85. Remember to take advantage of the don’t care entries.
| A | B | C | D | Y |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | X |
| 0 | 0 | 0 | 1 | X |
| 0 | 0 | 1 | 0 | X |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | X |
| 0 | 1 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 | X |
| 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | X |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | X |
| 1 | 1 | 1 | 1 | 1 |
Let’s make a k-map
This means that we get:
2.36 A priority encoder has 2N inputs. It produces an N-bit binary output indicating the most significant bit of the input that is TRUE, or 0 if none of the inputs are TRUE. It also produces an output NONE that is TRUE if none of the inputs are TRUE. Design an eight-input priority encoder with inputs A7:0 and outputs Y2.0 and NONE. For example, if the input is 00100000, the output Y should be 101 and NONE should be 0. Give a simplified Boolean equation for each output, and sketch a schematic.
| A7 | A6 | A5 | A4 | A3 | A2 | A1 | A0 | Y2 | Y1 | Y0 | NONE |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | X | 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 0 | 0 | 1 | X | X | 0 | 1 | 0 | 0 |
| 0 | 0 | 0 | 0 | 1 | X | X | X | 0 | 1 | 1 | 0 |
| 0 | 0 | 0 | 1 | X | X | X | X | 1 | 0 | 0 | 0 |
| 0 | 0 | 1 | X | X | X | X | X | 1 | 0 | 1 | 0 |
| 0 | 1 | X | X | X | X | X | X | 1 | 1 | 0 | 0 |
| 1 | X | X | X | X | X | X | X | 1 | 1 | 1 | 0 |
2.40 Write a minimized Boolean equation for the function performed by the circuit in Figure 2.88.
(NOT A AND NOT B) OR (NOT A AND B AND NOT C AND NOT D) OR (A AND NOT B AND NOT C AND NOT D)
| A | B | C | D | F |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | 0 |
2.42 (a, b) Implement the function from Exercise 2.17(a) using
An 8:1 multiplexer
A 4:1 multiplexer and no other gates
Simplify the equation so
2.44 Determine the propagation delay and contamination delay of the circuit in Figure 2.84. Use the gate delays given in Table 2.8.
The Propagation delay is 110 because of the longest path along the bottom is . The contamination delay is along the upper path, since it is the shortest weight path to Y.
Used https://www.circuit-diagram.org/editor/ and https://logic.ly/demo/ for diagrams and typst for typsetting