FOR FREE CONTENT

Question: Find mod function i.e. one binary number divided by 3 and find the remainder or modulus.

 

Answer: 

 

Like 11 mod 3 = 0    101 mod 3 = 2

            

Moore Machine for mod 3

 

 

State 2 

 

q1 100 mod 3 = 1

q2 101 mod 3 = 2

 

000 mod 3 = 0

01 mod 3 = 1

001 mod 3 = 1

1 mod 3 = 1

10 mod 3 = 2

11 mod 3 = 0

 

 

Example:

 

Let number 10110 = 22 mod 3 =1

 

 

We can easily convert the Moore machine to DFA because it has some similarities. So, we can convert it by just remove the output with the state.