Wierd Machine

From Esolang
Jump to: navigation, search

The Wierd Machine is a theoretical computer science construct of a 2-cell machine which can implement the cat utility, can(theoretically) implement the Truth-machine and do Flow-down arithmetic (Another theoretical computer model by the author).

Is Wierd a typo?

The 'Wierd Machine' is weird, but not quite. Therefore, it is called the 'Wierd Machine'. So no, it is not a typo.

How it works

There are 6 instructions: I,H, Q, C, L and J Here is a Table of meaning for these functions:

I Input
Q Output primary cell
C Compare cells.
L Loop for amount of time in loop counter
J Jump
H 'Hardware' input

Truth-machine

In theory, it's possible to create a simplification of the machine:

ICHQL∞

We get input, compare it with the 2 empty 0 cells, take that as input, Print that forever.

Input=1:
1111111111111111111111111111111111....
Input=0:
0000000000000000000000000000000000....

So, we just need a 'If' statement to make the truth-machine!

Details of the Truth-complete Wierd Machine:
Statements = I, F, C, H, L, Q
F=if

Code of Truth-machine:

ICHF0JQI1QL∞

Woohooo! Yahoo! Hurray! A Truth machine in 5 statements! Beat that!

Examples

Wierd Machine-1: Cat program:

IQ

Input+1:

IPQ

Wierd machine-2: Doubling

IPLIQ

References

Truth-machine- Wierd machine was created to make a solution to it.