Talk:BIT

From Esolang
Jump to navigation Jump to search

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
  • { PRINT
  • } 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)

The enforced verbosity is entirely intentional, and is contained in the second design principle listed. --Ørjan 16:59, 16 June 2009 (UTC)

A Question

Does "THE VALUE BEYOND" return "bit" or "address of a bit"? --(this comment by 83.130.165.78 at 14:41, 16 June 2009 UTC; please sign your comments with ~~~~)

In both the examples that use it, it is used like "THE ADDRESS OF THE VALUE BEYOND", so it seems like it returns a bit, but that you can take the address of that bit. --Ørjan 16:56, 16 June 2009 (UTC)