IfSetThenSet

From Esolang
(Redirected from Ifsetthenset)
Jump to navigation Jump to search

IfSetThenSet is an minimalistic esolang with only 1 command. The memory contains 8 bits, either 1 or 0, the first bit being 1. If an certain bit is 1 or 0, then it sets another bit to 1 or 0. The format of the command is "[Memory location in binary to check][Value to compare (0/1)][Memory location in binary to set][Value to apply (1/0)]", or something like "00000000". For example, 01010010 means that if the third bit is set to 1 then set the second bit to 0.

Notes

  • "- - - - 0001" (if CONDITION then set bit 1 to 1) sets the second bit to the user's input
  • "- - - - 0000" (if CONDITION then set bit 1 to 0) ouputs the second bit.
  • The command are separated with "-"
  • The program loops when it reaches the finish.

Example programs

  • AND (one time):
00010001-00100101-00010001-00100101-00010010-01000011-00010000
  • OR:
00010001-00110101-00010001-01010011-00010000-00010100
01000001-01100000-00010101-00100111

Interpreters

(TurboWarp interpreter, not including the main loop)

Community

If you have made an interesting program in this, edit the page an insert it below this text.