Mahnoor Naseem

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

MAHNOOR NASEEM

BC200409543

Questions No 01=
Moore machine having 6 tuples {Q, q0, ∑, O, δ, λ} are explained below where:

Q = {q0, q1, q2, q3, q4}


q0 = Initial State
∑= {a, b}
O = {0, 1} where output 0 for a and 1 for b
δ = Q x ∑ = Q (Every Transition must follow the rule provided)

Draw a Moore machine according to the transition table provided below:

Next State
Present Input a Input b Output
State
qo - q2 q1 1
q1 q3 q4 0
q2 q4 q1 1
q3 q4 q3 1
q4 q4 q4 0

Diagram:
Question No 2:

Solve the following for the Moore Machine you design in Question 1.

a – Find Input String for the following output. “101110”


Solution:” babbba”.

b – Find output String for the following input. “ababbabb”


Solution:” 01011011”.

c – Mention the states that are involved in to generate the output for input “ababbabb”.
Solution: “q0,q1,q2,q3,q4” are the states involved.

You might also like