Bitflipper

From Esolang
Jump to navigation Jump to search

Bitflipper is a basic esoteric programming language created on March 23, 2022 by User:gapples2 where you flip bits. This only has 5 instructions which makes programming in this hard and long.

Instructions

Instruction Effect
FLIP X Flip bit X.
SKIP X Skip the next line if bit X is 1.
JUMP X Jump to line X.
OTPT X Output an ASCII character where the byte starts at X.
INPT X Set the byte starting at X to the ASCII value of an input character.
# Comments out the rest of the line.

Negative values of X enter the source code, making it possible to edit the code while it's running.

Sample programs

Cat program

INPT 0
OTPT 0
JUMP 0

Hello, World!

# H - 01001000
FLIP 1
FLIP 4
OTPT 0
# e - 01100101
FLIP 2
FLIP 4
FLIP 5
FLIP 7
OTPT 0
# l - 01101100
FLIP 4
FLIP 7
OTPT 0
OTPT 0
# o - 01101111
FLIP 6
FLIP 7
OTPT 0
# , - 00101100
FLIP 10
FLIP 12
FLIP 13
OTPT 8
# <space> - 00100000
FLIP 18
OTPT 16
# W - 01010111
FLIP 2
FLIP 3
FLIP 4
OTPT 0
# o - 01101111
FLIP 2
FLIP 3
FLIP 4
OTPT 0
# r - 01110010
FLIP 3
FLIP 4
FLIP 5
FLIP 7
OTPT 0
# l - 01101100
FLIP 3
FLIP 4
FLIP 5
FLIP 6
OTPT 0
# d - 01100100
FLIP 4
OTPT 0
# ! - 00100001
FLIP 23
OTPT 16

Interpreters

None exist currently, but one is being created in C++.