Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

victorS7P/turing-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turing Machine

This is the code of a turing machine that does multiplication or potentiation on a binary tape.

▶️ Running

You can use the machine just using Ruby to running the main script with some flags:

ruby ./main.rb -m 0011 true
  • The first flag need to be -m for the multiplication machine or -p for the power of machine.
  • The second flag need to be the initial tape state
  • The last flag is optional, and means that you wish to have a print of the machine proccess.

The output will be the final state of the tape.

Examples:

Do 2 * 2 with print process:

ruby ./main.rb -m 0011 true

Do 3 ^ 1 ^ 4 without printing the process:

ruby ./main.rb -p 00010000

Do 2 * 2 * 2 *2 without printing the process:

ruby ./main.rb -m 00110011

---

Victor Costa - BCC IV

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages