# ENHADINUMS (TM)

p-nand-q presents a revolutionary technique in computer science: **ENHADINUMS** (TM) aka Enhanced Digital Numbers. They are used frequently throughout this website,
to publicize my mathematical skills, increase the visibility of my genius and land me
that multimillion dollar job that I need to get my first million.

## What are ENHADINUMS ?

To understand **ENHADINUMS**, you need to know first of all the digits:

- |
- One
- +
- Two
- #
- Four
- .
- Minus One
- :
- Minus Two

You can add digits by just writing them next to
each other, so `##`

is 8, and `||||||||`

is 8, too. There are an infinite number of ways of representing the
number 3 as a ENHADINUM, making ENHADINUMS very useful for people that like to spend
some time writing the number 3 in infinite ways. Here are just some:

```
#.
|||
+|
++.
+.#+
.......#.##.####.##.#.........................
```

You can use a 5-based placement system by
prefixing the number with `'`

. For example, `'##`

is 24 (because 4*5+4). The whole syntax was inspired by babylonian
clay even though I have no idea what that word means. You
can even use negative digits in the placement system - something the babylonians
never figured out - so for example, `'#`

.
is 19 (because 4*5-1).

You can escape from the placement system by
writing a single comma, so `'#,'#,`

is a very fine way of writing 8.

You can use shifted numbers by using the following syntax.

```
SHIFT = '(' NUMERIC '=' NUMERIC ')'.
```

For example, `(#=#)`

is 64, and `(|=.)`

is 0. Now you can write the number 20 like this:

```
(+~:,|~:,~:,~|,~+,=#~#,.#~+,~#,~:,~:,~:,~+,~+,~.,|~+,~.,~#,+~.,+~+,
~:,~+,#.)~'+|,'+|,~'+,~'+(+|=|.),'|(+|=|.),~'++,|(+=.|)(+=|#..)~'(+
|=|.)(+|=|.),~'||(+|=|.),~.,'|||,(.~.,:#~.,~.,#+:~:,~.,~+,+|=|)~'|(
|=.)(|=.),'(+|=|.),(|:#=.|)~'|(|=.)#,'|(|=.)|,'++,~+,#~'+,~:,~'+(|=
.),(:+~:,+~:,~+,~:,~#,|+=.|)'|(|=.),~'|,
```

It gets better. You can redefine the identifiers on the fly using the following syntax:

```
'$' <index> <char>
```

where *<index>* is a zerobased hexadecimal index into this array:

```
['|','+','#','.',':',',','(',')','~','=',"'"]
```

and *<char>* is a character you want to replace it with. This makes it possible to write 20 like this:

```
(.$9c+|+~.,+$3a+#~a,$4*~+,~*,~#,+#|$6f*c*+$5b|)+#$2d~|b~'|+f+|c|a)b'f+
|c|a)+bfdd~db~abcd*~dba~*b$6:~db~ab+$2ee~*b~eb~ab)a~'eb~':+|c|a)|b:|~*
b~*bca|):e|~|b$5[~|[ce~e[+$1o|~e[|~o[|~a[$2n~n[o|~n[$ajo~a[$9!~a[$2.||
):o.|$1da*!a|):$9'.*~*[~d[~d[~*[~*[*a'a|)~+[~j|:|'a)d[~*[j|:|'a)|[~d[d
~j|:d|'|a)[~j|d:|'a)[jd:d|'|a)[+$9o|j|dd[~j..[~jd:|oa)d[$a/:a.$7{~*[|d
..~a[|.~*[$0f~a[d~a[d~a[$2=~a[~a[~*[=f~*[a$3;d~;[=dd$9c~*[d$2#~*[~;[~;
[f$1o~#[#~;[c;f{:;;f~;[o#;c;f{~/o:fc;{[/f#[~/:ofcf;{f[./:ofcf;{#[~|[*~
|[~d[|
```

As an overview, this is the syntax implemented:

```
NUMBER = NUMERIC { NUMERIC }.
NUMERIC = SHIFT | DIGIT | NUMPLC | NUMUNSD.
NUMPLC = "'" (DIGIT|SHIFT) {(DIGIT|SHIFT)} .
NUMUNSD = ','
SHIFT = '(' NUMERIC '=' NUMERIC ')'.
DIGIT = '|' | '+' | '#' | '.' | ':'.
```