- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# What is a Moore Machine in TOC?

Moore machine is a finite state machine in which the next state is decided by the current state and the current input symbol.

The output symbol at a given time depends only on the present state of the machine.

The Moore machine has 6 tuples

**(Q, q0, Σ, O, δ, λ)**

Where,

- Q: Finite set of states
- q0: Initial state of machine
- Σ: Finite set of input symbols
- O: Output alphabet
- δ: Transition function where Q × Σ → Q
- λ: Output function where Q → O

The state diagram is as follows −

## Example 1

Input − 010

Transition − δ (q0,0) => δ(q1,1) => δ(q1,0) => q2

Output − 1110(1 for q0, 1 for q1, again 1 for q1, 0 for q2)

The transition table for Moore machine is as follows −

Current State | Next State | Output | |
---|---|---|---|

0 | 1 | ||

q0 | q1 | q2 | 1 |

q1 | q2 | q1 | 1 |

q2 | q2 | q0 | 0 |

## Explanation

**Step 1**− current state q0 on input ‘0’ it goes to state q1 and on ‘1’ goes to q2 generating output 1.**Step 2**− q1 on input ‘0’ goes to state q2 and on ‘1’ goes to q1 generating output ‘1’.**Step 3**− q2 on input ‘0’ goes to q2 and on ‘1’ goes to q0 generating output ‘0’.

## Example 2

Design a Moore machine whether an input string contains an even or odd number of 1's.

If input is even number of 1’s, the output is 1

Otherwise, the output is 0

The transition diagram is as follows −

## Transition Table

The transition table is as follows −

Current state | Next state input 0 | Next state input 1 | Output |
---|---|---|---|

->q0 | q0 | q1 | 1 |

q1 | q1 | q0 | 0 |

- Related Articles
- Differentiate between Mealy machine and Moore machine in TOC
- What is a mealy machine in TOC?
- What is Turing Machine in TOC?
- What is a finite state machine in TOC?
- Convert the given Moore machine counts into equivalent Mealy machine.
- Design a Moore machine for some binary input sequence.
- What are the Turing machine variations in TOC?
- Explain the universal Turing machine in TOC
- Explain Multi tape Turing Machine in TOC?
- Design a Moore machine to generate 1's complement of a binary number.
- What is a Derivation tree in TOC?
- What is Decidability in TOC?
- What is a context sensitive language in TOC?
- What is Inductive Hypothesis in TOC?
- What is unambiguous grammar in TOC?

Advertisements