Tutorial Questions
Tutorial Questions
Term Definition
A basic logic operation in which a true (HIGH) output occurs only when all
ii)
the input conditions are true (HIGH).
A sudden change from one level to another, followed after a time, called the
v)
pulse width, by a sudden change back to the original level.
The time interval on the leading edge of a pulse between 10% and 90% of the
vi)
amplitude
2. Find the duty cycle of a digital waveform if the period is twice the pulse width.
4. A basic 2-input logic circuit has a HIGH on one input and a LOW on the other input, and
the output is LOW. Identify the circuit.
5. Name the logic function of each of the block below based on your observation of the
inputs and outputs.
i) ii) iii)
7. A periodic digital waveform has a pulse width of 25 µs and a period of 150 µs.
Determine the frequency and the duty cycle.
iv) Determine wheter the following is an analog or a digital quantities, circle the right
answer
1) A person weight Analog / Digital
2) Number of cars at the parking lot Analog / Digital
3) Storage capacity of a memory Analog / Digital
4) Tyre pressure Analog / Digital
Fig 1
ii) Draw a digital waveform to represent the following digital value 1000101110 (left
value first),if the pulse width is 1µs, determine the duration of each bit before it
change to a new bit.
10. How many times the digital logic level changed in 1 second if the signal is a square
wave with a frequency of 1MHz.
11. Draw a square wave with 25% duty cycle and clearly label the positive edge and the
trailing edge
12. List the suitable logical function for the following problems
14. Determine which gate has the following property, assume FALSE = 0 and TRUE = 1
a. Output is opposite of the input
b. If both input FALSE then the output will be FALSE
c. If one of the input FALSE the output will be FALSE
2. Convert the decimal numbers to its binary equivalent using repetitive division
method.
a. 7710
b. 9610
c. 20510
d. 104010
e. 321610
3. Convert the decimal numbers in Question (2) to its binary equivalent using weighted
summation method.
4. Convert the decimal numbers to its binary equivalent (to four radix point)
a. 1305.37510
b. 111.3310
c. 301.1210
d. 164.87510
e. 1000.0110
15. What is the largest BCD-encoded decimal value that can be represented in three
bytes?
16. For the question below please refer to the ASCII table.
a. What is the most significant nibble of the ASCII code for letter E?
b. Represent the statement “X = 3 × Y” in ASCII code. Attach each character
values with even parity bit.
c. The following bytes (shown in hex) represent a person’s name as it would be
stored in the computer’s memory. Determine the name of each person.
i. 42 72 61 64 20 50 69 74 74
ii. 41 6E 67 65 6C 69 6E 61
17. Calculate the lower and upper bound of signed number for 7-bit number system using
the representation of
a. sign and magnitude
b. 1’s complement
c. 2’s complement
18. Calculate the binary signed values in the representation format of (i) sign and
magnitude, (ii) 1’s complement and 2’s complement using 8-bit number system.
a. + 5510
b. + 12710
b. - 8710
c. - 12810
19. Given a number system specification: size of a number is 6 bit, including the sign
bit AND signed numbers using 2’s complement
Calculate and show your working for the arithmetic operations below.
a. 18 + 3
b. -18 + 3
c. 18 – 3
d. -18 - 3
1. For a 2-input NOR gate functioning as a negative-AND gate, output X is HIGH if both
inputs A and B are HIGH.
TRUE / FALSE
2. A two-input XNOR gate will produce a HIGH output when both inputs are equal.
TRUE / FALSE
3. A NOR gate with inverters at the inputs has the same logic function as an AND
gate.
TRUE / FALSE
4. A 2-input NAND gate and a 2-input NOR gate produces the same output when both
inputs are HIGH.
TRUE / FALSE
5. The _________ gate produces a HIGH output when all inputs are LOW.
a. NOR
b. NAND
c. XOR
d. AND
6. A 2-input logic gate X produces a HIGH output when input A is LOW and input B is
HIGH. Which of the following is NOT logic gate X?
a. OR
b. NOR
c. NAND
d. XOR
P=?
Q=?
9. Complete the timing diagram based on the given input for the following logic diagram.
iii) Inverter
11. Given an AND gate with 3 inputs, what should the input values be to get an output of 1
(HIGH)?
12. Given an OR gate with 3 inputs, what should the input values be to get an output of 1
(HIGH)?
Input
Gate Output
A B C
AND 1 0 1
OR 0 1 0
AND 1 1 1
OR 0 0 0 X=A+B+C=0+0+0=0
NOR 1 1 1
AND 1 0 0
14. Given the input waveform(s) below, show the appropriate output waveform, X, with a
timing diagram.
i) XNOR
ii) XOR
iii) NAND
t1 t2 t3 t4 t5 t6 t7 t8
i) 74LS04
ii) 74ALS10
iii) 74HC00
16. Given the logic gates below, write the logic expression for it.
X
Y T
i) Z
X
Y T
Z
ii)
X W
iii)
1. Using any logic gates, draw the logic diagram of the given function. Do NOT simplify the
function
2. Directly apply DeMorgan’s law to the following expressions. You do NOT have to
simplify the expressions.
i)
ii)
4. Develop a truth table for the following expression. From the truth table derive a standard
product-of-sums (POS) expression.
10. Using Karnaugh Map,find the minimum SOP expression for the following function
i)
ii)
12. Using Karnaugh Map, find the minimum SOP of the given m-notation
1. Draw the logic circuit for the following using only 2-input AND gates, 2-
input OR gates and inverters.
a. ( A BC + D E )
b. ( D E F + A B )C
c. ( A + B + C )( D + E + F )
d. A B (C + D)
e. ( A B + C + D) E F
2. Convert the circuits in Question 1a, 1b,and 1d, using only NAND gates.
3. Convert the circuits in Question 1c and 1e, using only NOR gates.
4. Convert the following circuit to NAND only then prove that the converted
circuit is the same as the original circuit.
5. Referring to truth table below, draw the circuit to implement the function
using
i) AND-OR
ii) AND-OR-Invert
Inputs Output
A B C X
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
DESIGN EXERCISE
2. A Majority High
• Design a circuit that will give a HIGH output (F), when the majority of the
3 inputs are HIGH
o It is Friday, the production run for the day is complete, and all the
machines are shut down.
• Design a logic circuit that will control the horn. (Hint: use four logic input
variables to represent various conditions; for example, input A will be
HIGH only when the time of day is 5 p.m. or later.)
•
5. BCD Counter
• A BCD counter that produces 4 bits output, representing the BCD code for
the number of pulses that have been applied to the counter input. For
example, after 4 pulses have occurred, the counter outputs are DCBA =
01002 = 410. The counter resets to zero on the tenth pulse and starts
counting over again. In other words, the DBCA outputs will be never
represents a number greater than 10012 = 910.
• Design the logic circuit that produces a HIGH output whenever the count
output is 2, 3 or 9
6. Conditional Output
The circuit has 4 inputs, labelled as ABCD, where A is the MSB and D is the
LSB. The inputs represent a number in a 2’s complement form. You are
required to design a circuit that has the following characteristic
1. What are the equations to retrieve the sum (Σ) and the carry output (Cout) of a full
adder?
2. How many full adders are needed to complete these additions?
a. 101 and 010
b. 1100 and 0101
c. 111 and 001
d. 1010 and 1101
e. 010 and 011
f. 11001 and 10101
4. Use the parallel adder truth table (Table 1) to find the sum and output carry for the
addition of the following two 4 bit number if the input carry (Cn-1) is 0. Show the
diagram.
X4 X3 X2 X1 = 1101 Y4Y 3Y2Y 1 = 0101
Table&1&
Xn Yn Cn-1 Cn ∑n
0 0 0 0 0
0 1 0 0 1
1 0 0 0 1
1 1 0 1 0
0 0 1 0 1
0 1 1 1 0
1 0 1 1 0
1 1 1 1 1
5. Determine the outputs of Sum and Output Carry for the inputs given for Full Adder
as shown below.
8. A DEMUX has 4 outputs D0, D1, D2 and D3. Given the information below, draw the
appropriate waveforms for the outputs.
Data
S0
S1
"
"
11. Design :
a. BCD-to-decimal decoder using the minimal number of 2-input AND gates
b. Repeat, using two 2-to-4-line decoders and a few interconnecting AND gates
12. Using a full-adder, determine the logic state (1 or 0) at each gate output for the
following inputs:
(a) A = 1, B = 1, Cin = 1
(b) A = 0, B = 1, Cin = 1
(c) A = 0, B = 1, Cin = 0
13. What the full-adder inputs that will produce each of the following outputs:
(a) Σ = 0, Cout = 0
(b) Σ = 1, Cout = 0
(c) Σ = 1, Cout = 1
(d) Σ = 0, Cout = 1
14. Determine the outputs of a full-adder for each of the following inputs:
(a) A = 1, B = 0, Cin = 0
(b) A = 0, B = 0, Cin = 0
(c) A = 0, B = 1, Cin = 1
(d) A = 1, B = 1, Cin = 1
15. For the parallel-adder, determine the complete sum by analysis of the logical
operation of the circuit. Verify your result by longhand addition of the two input
numbers.
16. For the 4-bit comparator, plot each output waveform for the inputs shown. The
outputs are active-HIGH.
17. Show the decoding logic for each of the following codes if an active-HIGH (1) output
is required:
(a) 1101
(b) 1000
(c) 11011
(d) 11100
(e) 101010
(f) 111110
(g) 000101
(h) 1110110
18. For the decimal-to-BCD encoder logic, assume that the 9 input and the 3 input are
both HIGH. What is the output code? Is it a valid BCD code?
19. Convert the following decimal numbers to BCD and then to binary.
(a) 2
(b) 8
(c) 13
(d) 26
(e) 33
20. For the multiplexer given, determine the output for the following input states:
D0 = 0, D1 = 1, D2 = 1, D3 = 0, S0 = 1, S1 = 0.
21. Draw a logic circuit for 2-to-1 multiplexer (MUX) using gates.
22. (a) Show how two 2-to-1 MUX (with no added gates) could be connected to form a
3-to-1 MUX. Input selection should be as follows:
If AB = 00, select I0
If AB = 00, select I1
If AB = 1 – (B is a don’t care), select I2
(b) Show how two 4-to-1 and one 2-to-1 MUX could be connected to form an 8-to-1
MUX with three control inputs.
(c) Show how four 2-to-1 and one 4-to-1 MUX could be connected to form an 8-to-1
MUX with three control inputs.
23. Design a circuit which will either subtract X form Y or Y from X, depending on the
value of A. If A = 1, the output should be X - Y, and if A = 0, the output should be Y –
X. Use a 4 bit subtracter and two 4-bit 2-to-1 MUX.
A) Objective Question
ii. If both inputs of an S-R flip-flop are low, what will happen when the clock goes high?
a. An invalid state will exist.
b. No change will occur in the output.
c. The output will toggle.
d. The output will reset.
iii. The asynchronous inputs are normally labelled ___________ and ___________, and are
normally active ___________ inputs.
a. PRE, CLR, low
b. ON, OFF, high
c. START, STOP, low
d. SET, RESET, high
iv. When both inputs of a J-K pulse-triggered FF are high, and the clock cycles, the output
will
a. be invalid.
b. not change.
c. remain unchanged.
d. toggle.
v. Flip-flops are normally used for all of the following applications, except
a. counting.
b. logic gates.
c. frequency division.
d. data storage.
viii. Which of the following best describes the action of pulse-triggered FF's?
a. The clock and R-S inputs must be pulse shaped.
b. The data is entered on the leading edge of the clock, and transferred out on the
trailing edge of the clock.
c. A pulse on the clock transfers data from input to output.
d. The synchronous inputs must be pulsed.
ix. Like the latch, the flip-flop belongs to a category of logic circuits known as
a. Monostable multivibrators
b. Bistable multivibrators
c. Astable multivibrators
d. One-shots
B) Subjective Question
Figure 1
b) Determine the Q waveform relative to the clock if the signals shown in Figure 2 are
applied to the inputs of the J-K flip-flop. Assume that Q is initially LOW.
Figure 2
TUTORIAL 8: Counter
2. A synchronous sequential circuit changes its states at discrete instants of time. True/ False
3. Asynchronous sequential circuits can have state transitions at discrete instants True/ False
of time.
4. Synchronous sequential circuits are also known as clocked sequential circuits. True/ False
6. The clock period is the time when the clock signal is equal to 1. True/ False
7. The memory used in synchronous sequential circuits are flip-flops. True/ False
2. Design the 3-bit Gray code counter based on the state diagram of Figure 1 using JK
flip-flops.
Figure 1
3. Design a 3-bit up/down counter of Gray code sequence as shown in Figure 2 using D
flip-flops.
Figure 2
"
Figure 3
000, 011, 010, 110, 111, 101, 100, (repeat) 000, …..
a. Use D flip-flops
b. Use T flip-flops
c. Use JK flip-flops
"
If MN = 01, the next state of the flip-flop is the same as the present state.
If MN = 10, the next state of the flip-flop is the complement of the present state.
"
7." Use JK flip-flops to design a 3-bit synchronous up/down counter that starts at 001 and
cycles through Prime numbers only (i.e. numbers divisible by only themselves or 1).
Assume that M=0 counts down, M=1 counts up.
"
Figure 5
a. When the circuit is in state 00, the label 1/0 means that the circuit will go to
the next state 10.
b. If the present state is 01, and the input is 0, the next state would be 10.
c. If the circuit is presently in state 11, it will remain in its present state 11 if the
input is 0 and the output is 0.
10. Consider a sequential circuit shown in Figure 4. It has one input X, one output Z and
two state variables Q1Q2 (thus having four possible present states 00, 01, 10, 11).
Based on the circuit, derive:
Figure 4
11. Derive the next state, the output table and the state diagram for the sequential circuit
shown in
a. Figure 5 b. Figure 6
Figure 5
Figure 6
3. Initially an 8-bit SISO shift register is loaded with the data word 11101001. The data
word 15610 is then entered serially from right to left. After 7 clock pulses the circuit is
disabled. Write down a table that shows the bits stored after 7 clock pulses.
4. An 8-bit binary counter, a 6-bit ring counter and a 10-bit Johnson counter are
connected in cascade. A clock frequency of 10MHz is applied to the input of the first
counter. Calculate the frequency of the output waveform.
Figure 1
6. a) Which shift-register counter requires the most flip-flops for a given MOD number?
b) Which shift-register counter requires the most decoding circuitry?
8. Redo all Questions 7 but change the circuit to 5-bits Johnson counter.
Faculty of Computing