Talk:BIT
From Esolang
The code for BIT is too long. Here is a shorter way to put code (you can still mix the short and long code together if you want):
- 0 ZERO
- 1 ONE
- ! GOTO
- ~ IF THE JUMP REGISTER IS EQUAL TO
- $ VARIABLE
- @ THE VALUE AT
- + THE VALUE BEYOND
- ? THE ADDRESS OF
- & NAND
- = EQUALS
- % THE JUMP REGISTER
- ( OPEN PARENTHESIS
- ) CLOSE PARENTHESIS
- } READ
- # LINE NUMBER
- : CODE
And then the example program can be written like this:
#1:}!10
#10:$0=%!11
#11:}!100
#100:$1=%!101
#101:%=($0&$1)&($0&$1)!110~0!1000~1
#110:{1!111
#111:{0
#1000:%=($0&$0)&($1&$1)!1001~0!1010~1
#1001:{0
#1010:{1
Of course, you are also allowed to write:
#ONE CODE READ GOTO 1 0LINE NUM BE R1ZER O:$0=TH EJU MP REGISTERGOTO 11#ONE ON EC ODERE ADG OTO ONE0 0L INE NU M BERONE Z ERO ZE ROC ODEVARIABLE ON EE QUALS%!10ON E#
and so on, in case you want it to be really messy.
--Zzo38 01:07, 4 Nov 2006 (UTC)

