Appendix B: Logic Block Values
All values from the Inputs, the Logic Gates, and the Not Gates consist of character strings (text).
Logical values are expected by some Gate functions. Some Gate functions produce logical values and the Not Gates produce logical values. Logical values are either "true" or "false". True is represented by the string consisting of the single digit '1'. False is represented by the empty string, a string consisting of zero characters. When a logical value is needed then any string of one or more characters is considered "true" and only the empty string is considered "false". For example, the strings "Michael", "false", "true", "0", or "==" will all be considered "true".
Numeric values are produced by some inputs and by some Gate functions. When a numeric value is generated it will be the decimal value of the number with no leading zeroes except that zero itself is represented by "0". Negative numbers will have a leading minus sign. When a numeric value is expected things get a bit more complicated. How should "23x" be interpreted? How about "x23"? Or "234567898765432345678". The rule is this: non-decimal digit characters are ignored and arithmetic is done on the characters, not the binary representation of the number. This means that you can have numbers as large as you please and you can intersperse non-decimal characters if it pleases you to do so. Here are some examples:
- "23" means 23
- "X23" means 23
- "" means zero (empty string)
- "Michael" means zero (like empty string)
- "--23" means -23 (extra minus ignored)
- "Mi-cha2el3" means -23
- "2-3" means 23 (minus after first digit ignored)