First off I'd like to say hi. (and to get my total post count up to 1 so I can post links)
Turing Machine Calculator
Started by marsh8472, Jun 30 2008 08:19 PM
1 reply to this topic
#1
Posted 30 June 2008 - 08:19 PM
|
|
|
#2
Posted 30 June 2008 - 08:20 PM
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

shift left operation

shift right operation

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?
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

shift left operation

shift right operation

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?


Sign In
Create Account

Back to top









