N--

From Esolang
Jump to navigation Jump to search

N-- is a 6 instruction minimalistic variable based language founded upon the manipulation of bit sequences.

Commands

N NAND-combines the first bit of its first two inputs. Format: Ninvar1invar2outputvar
L Left shift, shifts the bits of the select variable. Format: Lvariable
R Right shift, shifts the bits of the select variable. Format: Rvariable
^ Removes the first bit of a variable. Format: ^variable
v Adds a 0 bit to the end of a variable. Format: vvariable
! Nullifies a variable, having it contain a single 0 once done. Format: !variable

Data Types

All data is fundamentally represented in binary sequences of an arbitrary extent. In response to particular circumstances' necessitation, these may be decoded into unsigned integer numbers, or encoded from that numeric type into the bit format.

Architecture

N--'s maintenance of the program data ensues from the use of variables, bifurcating into a quadruple of special-purpose specimens and an abitrary account of such defined by the developer.

Variable Naming

Variables specified by the programmer are handled as two letter sequences in lowercase, i.e. na, pc, or aa. A user-defined variable always starts with 0 bits.

Input and Output

N-- accepts both input and output, input and output are mapped to a special case variables named $i and $o respectively. All output is made in the format of ANSII based on binary to decimal.

Control Flow

$p is the program counter and can be modified to move the pointer to a different character in the data. $s contains the length of the program in characters.

Examples

None not by me, make some and put them here and i will be grateful

Initalizing a 0 and 1 variable

vaavabNaaaaab

Infinite loop

!$p

Evergoing binary appender

^aaNaaaaaaLaa!$p

Input and Output

This program queries the user for two characters, NAND-combines their first bits, and prints the result to the standard output by adminiculum of the special variable $o:

N$i$i$o

Interpreter

  • Common Lisp implementation of the N-- programming language.