Tripoli University Faculty of Engineering Computer Engineering Department
Tripoli University Faculty of Engineering Computer Engineering Department
Faculty of Engineering
Computer Engineering Department
Mohammed Altoumi
ID: 022171408
Instructor:
Dr.Yusra Mohammed Maatug
Lab Date: 10/05/2021
Experiment 1( Latches)
Connect each of the circuits shown below and fill the Corresponding truth table. In the truth
tables Qp stands for present Q and Qn stands for next Q .
NOR 2
INPUTS 2
OUTPUTS 2
Table 1 List of the circuit components
1.3 Implementation:
Figure 1 (Circuit Implementation using LOGISIM for R=1, S=0, Q=0 and Q`=1)
R S Q Q`
1 0 0 1
Figure 2 (Circuit Implementation using LOGISIM for R=0, S=1, Q=1 and Q`=0)
R S Q Q`
0 1 1 0
Figure 3 (Circuit Implementation using LOGISIM for R=1, S=1, Q=0 and Q`=0)
R S Q Q`
1 1 0 0
S R QP QN Q`N
0 0 0 0 1
0 0 1 1 0
0 1 0 0 1
0 1 1 0 1
1 0 0 1 0
1 0 1 1 0
1 1 0 0 0
1 1 1 0 0
0 0 NO CHANGE
0 1 RESET
1 0 SET
1 1 UNDEFINED
Connect the circuit shown below and fill the Corresponding truth table. In the
truth tables Qp stands for present Q and Qn stands for next Q .
NAND 4
NOT 1
INPUTS 2
OUTPUTS 2
Table 4 List of the circuit components
1.2.3 Implementation:
Figure 4 (Circuit Implementation using LOGISIM for EN=1, D=0, Q=0 and Q`=1)
EN D Q Q`
1 0 0 1
Figure 5 (Circuit Implementation using LOGISIM for EN=1, D=1, Q=1 and Q`=0)
EN D Q Q`
1 1 1 0
Figure 6 (Circuit Implementation using LOGISIM for EN=0, D=1, Q=0 and Q`=1)
EN D Q Q`
0 1 0 1
Figure 7 (Circuit Implementation using LOGISIM for EN=0, D=0, Q=0 and Q`=1)
EN D Q Q`
0 0 0 1
EN D Q Q`
0 x No change
0 X NO CHANGE
1 0 RESET
1 1 SET
The following state diagram of a sequential circuit that recognizes the sequence
1101 on input X. The output y goes 1 once the sequence is detected, Complete the
circuit design using jk Flip flop.
A \BX 00 01 11 10
0 0 0 1 0
1 X X X X
JA = BX
A \BX 00 01 11 10
0 X X X X
1 0 0 1 1
KA = B
A \BX 00 01 11 10
0 0 1 X X
1 1 0 X X
JB = A`X + AX`
JB = A ⊕ X
A \BX 00 01 11 10
0 X X 1 1
1 X X 0 1
KB = A` + X`
A \BX 00 01 11 10
0 0 0 0 0
1 0 0 1 0
Y= ABX
VCC 1
GROUND 1
AND 2
OR 1
XOR 1
SWITCH 4
PROBE 1
LOGIC ANALYSER 1
DECODED SEVEN-SEGMENT DISPLAY 1
J-K FF 2
CLOCK 1
NOT (7408) 1
Table 5 List of the circuit components
2.4 Implementation:
The design was implemented to recognize the sequence 1101 on input X by using JK FF
elements were replaced as all previous experiment and there is nothing new.
This time we add logic analyzer and seven segment display to detect the change in
sequence.
The clock was added and connected to the ground and ff`s.
Figure 12 (Circuit Implementation using EWB)
Design, construct, and test a counter that goes through the following sequence of binary states: 0,
1,2, 3, 6, 7, 10, 11, 12, 13, 14, 15, and back to 0 to repeat. Note that binary states 4, 5, 8, and 9
are not used. The counter must be self‐starting; that is, if the circuit starts from any one of the
four invalid states, the count pulses must transfer the circuit to one of the valid states to continue
the count correctly (Use T flip flop).
Check the circuit’s operation for the required count sequence. Verify that the counter is self‐
starting. This is done by initializing the circuit to each unused state by means of the preset and
clear inputs and then applying pulses to see whether the counter reaches one of the valid states.
A B C D A B C D TA TB TC TD
0 0 0 0 0 0 0 1 0 0 0 1
0 0 0 1 0 0 1 0 0 0 1 1
0 0 1 0 0 0 1 1 0 0 0 1
0 0 1 1 0 1 1 0 0 1 0 1
0 1 0 0 X X X X X X X X
0 1 0 1 X X X X X X X X
0 1 1 0 0 1 1 1 0 0 0 1
0 1 1 1 1 0 1 0 1 1 0 1
1 0 0 0 X X X X X X X X
1 0 0 1 X X X X X X X X
1 0 1 0 1 0 1 1 0 0 0 1
1 0 1 1 1 1 0 0 0 1 1 1
1 1 0 0 1 1 0 1 0 0 0 1
1 1 0 1 1 1 1 0 0 0 1 1
1 1 1 0 1 1 1 1 0 0 0 1
1 1 1 1 0 0 0 0 1 1 1 1
TABLE 6 (State table for experiment 3)
AB\CD 00 01 11 10
00 0 0 0 0
01 X X 1 0
11 0 0 1 0
10 X X 0 0
TA = BCD
AB\CD 00 01 11 10
00 0 0 1 0
01 X X 1 0
11 0 0 1 0
10 X X 1 0
TB = CD
AB\CD 00 01 11 10
00 0 1 0 0
01 X X 0 0
11 0 1 1 0
10 X X 1 0
TC=AD + C`D
AB\CD 00 01 11 10
00 1 1 1 1
01 X X 1 1
11 1 1 1 1
10 X X 1 1
TD = 1
After solving the equations using k-map the following was observed:
A B C D A B C D TA TB TC TD
0 1 0 0 0 1 0 1 0 0 0 1
0 1 0 1 0 1 1 0 0 0 1 1
1 0 0 0 1 0 0 1 0 0 0 1
1 0 0 1 1 0 1 0 0 0 1 1
That means the circuit is self-correcting after 0101, 1001 to be in valid state.
3.4 List of components that we will use:
AND 4
OR 1
XOR 4
LOGIC ANALYSER 1
DECODED SEVEN-SEGMENT DISPLAY 1
D FF 4
CLOCK 1
GROUND 1
Table 7 List of the circuit components
3.5 Implementation:
The design was implemented to move insequence from 0 to 15 and skipping 4, 5, 8 and 9
then repeats by using T FF
I had to design T FF from D FF because I didn't find it in EWB.
elements were replaced as previous experiment.
We can notice that after the counter reached 3 at T1, the counter passed 4 and 5, and
after it reached 7 at T2, it skipped 8 and 9.
Figure 20 (Circuit result using LOGIC ANALYZER in EWB for TA, TB, TC AND TD)
Experiment 4
Design a sequential circuit with two D flip-flops A and B and one input X. When X=0, the state of
the circuit remains the same. When X=1, the circuit goes through the state transition from 00 to
01 to 11 to 10, back to 00, and then repeats.
DA= ∑m(3, 4, 6, 7)
DB= ∑m(1, 2, 3, 6)
A \BX 00 01 11 10
0 0 0 1 0
1 1 0 1 1
A \BX 00 01 11 10
0 0 1 1 1
1 0 0 0 1
DB = A`X + BX`
AND 4
OR 2
NOT 1
LOGIC ANALYSER 1
DECODED SEVEN-SEGMENT DISPLAY 1
D FF 2
CLOCK 1
GROUND 1
Table 7 List of the circuit components
4.5 Implementation:
The design was implemented for when X=0, the state of the circuit remains the same.
When X=1, the circuit goes through the state transition from 00 to 01 to 11 to 10, back
to 00, and then repeats.
elements were replaced as previous experiment.
Figure 23 (Circuit Implementation using EWB )
We can notice that the circuit goes in sequence 00, 01, 11, 10 between the T1 and T2
and it`s still repeating.
Figure 20 (Circuit result using LOGIC ANALYZER in EWB for DA. DB)