Jump to content

Turing Machine Calculator

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
marsh8472

marsh8472

    Newbie

  • Members
  • Pip
  • 2 posts
First off I'd like to say hi. (and to get my total post count up to 1 so I can post links)

#2
marsh8472

marsh8472

    Newbie

  • Members
  • Pip
  • 2 posts
I'm trying to make a basic calculator written as a turing machine. I want it so I can input something like "44+10" then it will return and output of "54", "44*10" returning "440", "44/10" returning "4" (I don't need the remainder), and "44-10" returning "34". The numbers are allowed to be any size.

My first thought was to convert these numbers into binary then do the math as binary operations then convert it back to decimal again. Or I could work in decimal the whole way.

I have these made so far:

decimal to bcd converter

Posted Image

shift left operation

Posted Image

shift right operation

Posted Image

and I'm using jflap to make these. Anyone have any pointers on a good approach to make this? Working in binary a good idea? Has this already been done before? If so where can I see it?