- 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
Construct Turing machine for addition
Generally in different finite automata a number is represented in binary format.
Example − 2- 010
3- 011
4- 100
But in case of addition using the Turing machine the system follows a unary format.
Example − 2- 11 or 00
3- 111 or 000
4- 1111 or 0000
In unary format a number is represented
So, let’s consider zero’s to represent any number in the Turing machine for doing addition.
Example
Inputs 4 and 5
4=0000
5=00000
Then 4+5= 0000c00000
Both numbers are separated by a temporary variable c for representing the two numbers
Output: 000000000 =9
The Turing Machine (TM) is as follows −
Explanation
Step 1 − convert 0 into X jump to step 3.
Step 2 − If the symbol is “c” then convert it into blank, move right and jump to step-6.
Step 3 − Ignore 0’s and move towards the right. Ignore “c”, and then move right
Step 4 − Ignore 0’s and move towards the right. Convert a Blank into 0, and then move left
Step 5 − Ignore 0’s and move towards the left.
Step 6 − Ignore “c”, move left.
Step 7 − Ignore 0’s and move towards left.
Step 8 − Ignore an X, move left and jump to step 1.
- Related Articles
- Construct Turing machine for subtraction
- Construct a Turing Machine for language L = {0n1n2n | n≥1}
- Construct a Turing Machine for language L = {ww | w ∈ {0,1}}
- Construct a Turing Machine for language L = {wwr | w ∈ {0, 1}}
- Construct a Turing machine for L = {aibjck | i< j< k; i ≥ 1}
- Construct a Turing machine for L = {aibjck | i>j>k; k ≥ 1}
- Construct a Turing Machine for L = {a^n b^n | n>=1}
- Construct a Turing machine for adding 2 to the binary natural number?
- Design Turing machine for multiplication
- Construct a Turing machine for L = {aibjck | i*j = k; i, j, k ≥ 1}
- Construct Turing machine for L = {an bm a(n+m) - n,m≥1} in C++
- What is Turing Machine in TOC?
- Explain the universal Turing machine in TOC
- Distinguish between Finite Automata and Turing Machine
- Explain about a non-deterministic Turing Machine?
