Question
1. Construct a state diagram of a Turing machine M that computes the negation of a signed binary number (in 2s complement format) on the
1. Construct a state diagram of a Turing machine M that computes the negation of a signed binary number (in 2s complement format) on the tape.
-if the input is empty, M loops.
- if the input number is positive, M accepts leaving the 2s complement on the tape.
- if the input number is negative, M rejects leaving the absolute value on the tape.
- if the input is 00...0, M accepts leaving 10...0 on the tape.
For example, if the initial tape is 011010, the Turing machine should accept and leave 100110 on the tape. If the initial tape is 101110, the Turing machine should reject and leave 010010 on the tape.
2. Give an implementation-level description of the Turing machine M defined above
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started