2.0.0 • Published 1 year ago
@turing-machine-js/library-binary-numbers v2.0.0
@turing-machine-js/library-binary-numbers
A library for the turing-machine-js.
Install
Using npm:
npm install @turing-machine-js/library-binary-numbersor using yarn:
yarn add @turing-machine-js/library-binary-numbersA concept
Binary numbers are represented as a sequence of symbols 0 and 1.
A representation of a number starts with symbol ^ and ends with symbol $.
For example:
^$stands for 0^1$stands for 1^10$stands for 2^11$stands for 3- etc.
There is no ability to work with negative numbers at this time.
This library provides following objects to work with binary numbers:
getTapeBlock- this function returns aTapeBlockclass instance. It has only one tape. An alphabet of the tape contains the following symbols:spaceas a blank symbol,^,$,0and1.states- followingStatesclass instances which represent some algorithms:goToNumber- move the head to the number's endgoToNextNumber- move the head to the next number (to the right)goToPreviousNumber- move the head to the previous number (to the left)deleteNumber- delete the current numbergoToNumbersStart- move the head to the number's startinvertNumber- change every symbol in the number to it's opposite one (0to1and1to0)normalizeNumber- delete leading zerosplusOne- add 1 to the numberminusOne- subtract 1 from the number
If you want to use states which were described earlier, you must use a tape block received from the getTapeBlock function.
Links
- The information about
TapeBlockandStateclasses is here - Turing Machine on the Wikipedia
2.0.0-alpha.0
1 year ago
2.0.0-alpha.1
1 year ago
2.0.0-alpha.2
1 year ago
2.0.0
1 year ago
1.0.0
5 years ago
0.2.9-alpha.1
5 years ago
0.2.9-alpha.2
5 years ago
0.3.0-alpha.4
5 years ago
0.2.9-alpha.0
6 years ago
0.3.0-alpha.3
6 years ago
0.3.0-alpha.2
6 years ago
0.2.8
6 years ago
0.3.0-alpha.1
6 years ago
0.3.0-alpha.0
6 years ago
0.2.7
6 years ago
0.2.6
7 years ago
0.2.5
7 years ago
0.2.4
7 years ago
0.2.3
7 years ago
0.2.2
7 years ago
0.2.1
7 years ago
0.2.0
7 years ago