Unit 3
Unit 3
Q) construct a moore machine that print 'a' whenever the sequence '01' is encountered in
any input binary string.
s0 s1 s2
pattern or sequence detector
-> The stream of bits has been feed as input,when the clk is high and a particular
pattern/sequence is detected
->As soon as sequence is detected the output becomes high and then again becomes
low
Two types :
1.non overlapping
2.overlapping x
sequence detector y
clk
Q1.Design a sequence detector to detect 010 in stringn of bits coming through an
input line using mealy model.
Q2.Design a sequence detector to detect 101 in stringn of bits coming through an
input line using moore model.
Q3.Design a sequence detector to detect three or more consecutive ones in stringn of bits
coming through an input line using mealy model.
step2:state table
k maps
00 01 11 10 00 01 11 10 00 01 11 10
0 0 0
1 1 1
circuit diagram:
State reduction and assignment
NS o/p
P.S a
x=0 x=1 x=0 x=1
a a b 0 0
b c d 0 0
c a d 0 0 b c
d e f 0 1
e a f 0 1
f g f 0 1
d e
g f 0 1 g
a
*** if NS and output of two PS are same then we can eliminate one state.
NS o/p
P.S
x=0 x=1 x=0 x=1
a a b 0 0
b c d 0 0
c a d 0 0
d e f 0 1
e a f 0 1
f g f 0 1
g f 0 1
a
STATE REDUCTION
a NS O/P NS O/P
PS PS
a b c 0 0
b c b d e 1 0
c c d 0 1
d a d 0 0
e e c d 0 1
d
moore:
b/1
0/0
0/1
1/1 B
A
1/0
NS,o/p
ps
a b
Q0 Q3,0 Q1,1
Q1 Q0,1 Q3,0
Q2 Q2,1 Q2,0
Q3 Q1,0 Q0,1
Parity generator
parity detector
mealy model
moore model