Midterm Digital
Midterm Digital
3 V (binary 0)
for 5 ms and 3.9 V (binary 1) for 2 ms.
1-9. Measure the period, frequency, and duty cycle of the waveform in 1-8. Assume the active
part of the waveform is LOW.
1-13.* Convert the following binary numbers to their equivalent decimal values.
(a) 110012 (b) 1001.10
(c) 10011011001.101102
(c) 10011100100.10010
1-15.* Using three bits, show the binary counting sequence from 000 to 111.
1-16. Using six bits, show the binary counting sequence from 000000 to 111111.
1-17.* What is the maximum number that we can count up to using 10 bits?
1-18. What is the maximum number that we can count up to using 14 bits?
(c)*189 (g)*205
(k) 52
(b) 372
(f) 2313 (j) 33
(c)*919
2-10. How many hex digits are required to represent decimal numbers up to 20,000? up to
40,000?
2-13. Take each four-bit binary number in the order they are written and write the equivalent hex
digit without performing a calculation by hand or by calculator.
(a) 1001 (g) 1010 (m) 0001
(b) 1101 (h) 1001 (n) 0101
(c) 1000 (i) 1011 (o) 0111
(d) 0000 (j) 1100 (p) 0110
(e) 1111 (k) 0011
(f) 0010 (l) 0100
2-14. Take each hex digit and write its four-bit binary value without performing any calculations
by hand or by calculator.
(a) 6 (g) C (m) 0
(b) 7 (h) B (n) 8
(c) 5 (i) 9 (o) D
(d) 1 (j) A (p) 9
(e) 4 (k) 2
(f) 3 (l) F
2-15. What is the largest value that can be represented by three hex digits?
2-18. How many hex digits are required to represent decimal numbers up to 1 million?
4 million?
2-20. How many bits are required to represent the decimal numbers in the range from 0 to 999
using (a) straight binary code?
(b) What is the largest hex number that can be represented in four bytes?
(c) What is the largest BCD-encoded decimal value that can be represented in three bytes?
2-23.(a) Refer to Table 2-5. What is the most significant nibble of the ASCII code for the letter X?
2-37.* In a microcomputer, the addresses of memory locations are binary numbers that identify
each memory circuit where a byte is stored. The number of bits that make up an address
depends on how many memory locations there are. Since the number of bits can be very large,
the addresses are often specified in hex instead of binary.
(a) If a microcomputer uses a 20-bit address, how many different memory locations are there?
(b) How many hex digits are needed to represent the address of a memory location?
(c) What is the hex address of the 256th memory location? (Note: The first address is always 0.)
(d) The computer program is stored in the lowest 2 kbyte block of memory. Give the start and
end address of this block.
2-38. In an audio CD, the audio voltage signal is typically sampled about 44,000 times per
second, and the value of each sample is recorded on the CD surface as a binary number. In
other words, each recorded binary number represents a single voltage point on the audio signal
waveform.
(a) If the binary numbers are six bits in length, how many different voltage values can be
represented by a single binary number? Repeat for eight bits and ten bits.
(b) If ten-bit numbers are used, how many bits will be recorded on the CD in 1 second?
(c) If a CD can typically store 5 billion bits, how many seconds of audio can be recorded when
ten-bit numbers are used?
2-39.* A black-and-white digital camera lays a fine grid over an image and then measures and
records a binary number representing the level of gray it sees in each cell of the grid. For
example, if four-bit numbers are used, the value of black is set to 0000 and the value of white to
1111, and any level of gray is somewhere between 0000 and 1111. If six-bit numbers are used,
black is 000000, white is 111111, and all grays are between the two. Suppose we wanted to
distinguish among 254 different levels of gray within each cell of the grid. How many bits would
we need to use to represent these levels?
2-40. A 3-Megapixel digital camera stores an eight-bit number for the brightness of each of the
primary colors (red, green, blue) found in each picture element (pixel). If every bit is stored (no
data compression), how many pictures can be stored on a 128-Megabyte memory card? (Note:
In digital systems, Mega means 220.)
3-12. (a)* Write the Boolean expression for
output x in Figure 3-53(a). Determine the value
of x for all possible input conditions, and list the
values in a truth table.
3-16. For each of the following expressions, construct the corresponding logic circuit, using AND
and OR gates and INVERTERs.
3-23.*DRILL QUESTION
Complete each expression.
3-30. Show how a two-input NAND gate can be constructed from two-input NOR gates.
3-31. Show how a two-input NOR gate can be constructed from two-input NAND gates.
3-32. A jet aircraft employs a system for monitoring the rpm, pressure, and temperature values of
its engines using sensors that operate as follows:
RPM sensor output = 0 only when speed < 4800 rpm
P sensor output = 0 only when pressure < 220psi
T sensor output = 0 only when temperature < 200°F
Figure 3-56 shows the logic circuit that controls a cockpit warning light for certain combinations of
engine conditions. Assume that a HIGH at output W activates the warning light.
(a)* Determine what engine conditions will give a warning to the pilot.
(b) Change this circuit to one using all NAND gates.
3-33. The trunk of an automobile is opened in one of two ways: by pressing a button on the trunk
lid or by pressing the trunk button on the key fob. However, these buttons only open the trunk
under certain conditions for safety and security purposes. The logic diagram for this circuit is
shown in Figure 3-57.
(a) Write the conditions in English that will open the trunk.
(b) Write the Boolean equation using the signal names given.
(c) Redraw the circuit using all NAND gates (assume you have up to four-input NAND gates
available).
3-34. The remote start for an automobile will crank the engine under certain conditions. The logic
circuit is shown in Figure 3-58. Inputs are defined as follows:
(a) Write the Boolean expression from the circuit diagram.
(b) Draw the truth table for this circuit.
(c) Write the unsimplified SOP expression (using all four-variable product terms).
(d) Use Boolean algebra to simplify the SOP expression in (c) to match the expression in (a)
(e) Implement this circuit using only NAND gates.
3-40.* Determine the input conditions needed to cause the output in Figure 3-59 to go to its
active state.
3-41.* (a) What is the asserted state for the output of Figure 3-59?
3-42. Use the results of Problem 3-40 to obtain the complete truth table for the circuit of Figure 3-
59.
3-44. A 7406 TTL inverter has a maximum tPLH of 15 ns and a tPHL of 23 ns. A positive pulse
that lasts 100 ns is applied to the input.
(a) Draw the input and output waveforms. Scale the X-axis such that the end time is 200 ns.
(b) Label tPLH and tPHL on the graph.
(c) What is the pulse width of the output if worst case propagation delays occur?
3-50. Show how x = ABC can be implemented with one two-input NOR and one two-input NAND
gate.
4-3.* Change each gate in Problem 4-2 to a NOR gate, and simplify the circuit using Boolean
algebra.
4-5. Design a logic circuit whose output is HIGH only when a majority of inputs A, B, and C are
LOW.
4-6. A manufacturing plant needs to have a horn sound to signal quitting time. The horn should
be activated when either of the following conditions is met:
1. It’s after 5 o’clock and all machines are shut down.
2. It’s Friday, the production run for the day is complete, and all machines are shut down.
Design a logic circuit that will control the horn. (Hint: Use four logic input variables to represent
the various conditions; for example, input A will be HIGH only when the time of day is 5 o’clock or
later.)
4-7.* A four-bit binary number is represented as A3A2A1A0, where A3, A2, A1, and A0 represent
the individual bits and A0 is equal to the LSB. Design a logic circuit that will produce a HIGH
output whenever the binary number is greater than 0010 and less than 1000.
4-8. Figure 4-69 shows a diagram for an automobile alarm circuit used to detect certain
undesirable conditions. The three switches are used
to indicate the status of the door by the driver’s seat, the ignition, and the headlights,
respectively. Design the logic circuit with these three switches as inputs so that the alarm will be
activated whenever either of the following conditions exists:
■ The headlights are on while the ignition is off.
■ The door is open while the ignition is on.
4-16. Figure 4-71 shows a BCD counter that produces a four-bit output representing the BCD
code for the number of pulses that have been applied to the counter input. For example, after
four pulses have occurred, the counter outputs are DCBA = 01002 = 410. The counter resets to
0000 on the tenth pulse and starts counting over again. In other words, the DCBA outputs will
never represent a number greater than 10012 = 910.
(a)* Design the logic circuit that produces a HIGH output whenever the count is 2, 3, or 9. Use K
mapping and take advantage of the don’t-care conditions.
(b) Repeat for x = 1 when DCBA = 3,4,5,8.
4-17.* Figure 4-72 shows four switches that are part of the control circuitry in a copy machine.
The switches are at various points along the path of the copy paper as the paper passes through
the machine. Each switch is normally open, and as the paper passes over a switch, the switch
closes. It is impossible for switches SW1 and SW4 to be closed at the same time. Design the
logic circuit to produce a HIGH output whenever two or more switches are closed at the same
time. Use K mapping and take advantage of the don’t-care conditions.
4-20. (a) Determine the output waveform for
the circuit of Figure 4-73.
(b) Repeat with the B input held LOW.
(c) Repeat with B held HIGH.
4-22. Design a circuit that produces a HIGH output only when all three inputs are the same level.
(a) Use a truth table and K map to produce the SOP solution.
(b) Use two-input XOR and other gates to find a solution. (Hint: Recall the transitive property
from algebra... if a = b and b = c then a = c.)
4-28.* Design a logic circuit whose output is HIGH whenever A and B are both HIGH as long as
C and D are either both LOW or both HIGH. Try to do this without using a truth table. Then check
your result by constructing a truth table from your circuit to see if it agrees with the problem
statement.
4-29. Four large tanks at a chemical plant contain different liquids being heated. Liquid-level
sensors are being used to detect whenever the level in tank A or tank B rises above a
predetermined level. Temperature sensors in tanks C and D detect when the temperature in
either of these tanks drops below a prescribed temperature limit. Assume that the liquid-level
sensor outputs A and B are LOW when the level is satisfactory and HIGH when the level is too
high. Also, the temperature-sensor outputs C and D are LOW when the temperature is
satisfactory and HIGH when the temperature is too low. Design a logic circuit that will detect
whenever the level in tank A or tank B is too high at the same time that the temperature in either
tank C or tank D is too low.