Advanced Tutorial IX: Generating Negative Numbers from Memories
Introduction
Right now, a value stored in a Memory must be a zero or a positive integer. Now supposing you want to subtract a number you've stored in memory. Why would you want to do this? It doesn't matter why, but you might want to, and I have an inelegant, resource intensive, but functional method of using a positive value of a stored memory as a negative number.
What you will need to generate six-digit negative numbers. Fewer digits means fewer requirements:
- [8] Programming Grids. One grid is the core program of the converter, six programs accommodate the six potential digits of a memory, and the last is the compiler that generates a negative integer Thought.
- [6] RUN PROGRAM contraptions
- [56] SET THOUGHT contraptions
- [54] MEMORY PART EQUAL contrivances
- [5] THOUGHT GREATER contrivances
- [6] INCREMENT THOUGHT contraptions
- [1] SET MEMORY contraption
- [1] Extra Programming Column
- [36] Extra Programming Rows
- [1] Memory Chip
Retail price of all of this is 1370 SP for the grids, rows, columns, and memory chip. If you don't have spare memory chips, I strongly recommend you beg for chips from those who might have some to spare, because at eight bucks apiece, they are stupidly expensive in the Hunter's Lodge. Only suckers pay retail for C&Cs. Only fools would do this at all, but there I go.
TO START
Your first program is what I call the NEGATIVE NUMBER CONVERTER. It is the core program you call when you want to convert a positive Memory value to a negative integer Thought to manipulate some other Thought or Memory as needed. This grid is 3 rows and 4 columns.
- ROW 1 COLUMN 1 - SET THOUGHT [set “number” to the value of the Memory you want to convert]
- ROW 1 COLUMN 2 - RUN PROGRAM [runs the program NEGATIVE NUMBER - ONES]
- ROW 1 COLUMN 3 - THOUGHT GREATER [checks to see if “number” is greater than 9]
- ROW 1 COLUMN 4 - RUN PROGRAM [runs the program NEGATIVE NUMBER - TENS]
- ROW 1 FLOW CONTROL KNOB - ALL PASS [this means every column in ROW 1 is checked, which means that the program will stop running digit converters if any of the THOUGHT GREATERS fail]
- ROW 2 COLUMN 1 - THOUGHT GREATER [checks to see if “number” is greater than 99]
- ROW 2 COLUMN 2 - RUN PROGRAM [runs the program NEGATIVE NUMBER - HUNDREDS]
- ROW 2 COLUMN 3 - THOUGHT GREATER [checks to see if “number” is greater than 999]
- ROW 2 COLUMN 4 - RUN PROGRAM [runs the program NEGATIVE NUMBER - THOUSANDS]
- ROW 2 FLOW CONTROL KNOB - ALL PASS
- ROW 3 COLUMN 1 - THOUGHT GREATER [checks to see if “number” is greater than 9999]
- ROW 3 COLUMN 2 - RUN PROGRAM [runs the program NEGATIVE NUMBER - TEN THOUSANDS]
- ROW 3 COLUMN 3 - THOUGHT GREATER [checks to see if “number” is greater than 99999]
- ROW 3 COLUMN 4 - RUN PROGRAM [runs the program NEGATIVE NUMBER - HUNDRED THOUSANDS]
NEGATIVE NUMBER PROGRAMS
You want one of these for each digit you want the capacity to convert. I assume you want to convert the full six digits of a memory. Each digit's program is a three column, nine row FAILURE ARRAY, that is, all the FLOW CONTROL KNOBS are set to ANY FAIL, and the desired output is found in the ESCAPE HATCH.
- ROW 1 COLUMN 1 - MEMORY PART EQUAL [checks to see if the desired digit of the memory you wish to convert is a “1”]
- FLOW CONTROL KNOB - ANY FAIL [if the desired digit isn't a “1”, pass on to the next ROW, otherwise, go to the ESCAPE HATCH]
- ESCAPE HATCH - SET THOUGHT [set the thought “ones” to -1, that is, negative one]
- ROW 2 COLUMN 1 - MEMORY PART EQUAL [checks to see if the desired digit of the memory you wish to convert is a “2”]
- FLOW CONTROL KNOB - ANY FAIL [if the desired digit isn't a “2”, pass on the next ROW, otherwise go to the ESCAPE HATCH]
- ESCAPE HATCH - SET THOUGHT [set the thought “ones” to -2]
- ROW 3 COLUMN 1 - MEMORY PART EQUAL [checks to see if the desired digit of the memory you wish to convert is a “3”]
- FLOW CONTROL KNOB - ANY FAIL [if the desired digit isn't a “3”, pass on the next ROW, otherwise go to the ESCAPE HATCH]
- ESCAPE HATCH - SET THOUGHT [set the thought “ones” to -3]
- …And so on down to 9, repeat this program five more times, using “tens”, “hundreds”, “thousands” et cetera for each output thought in the ESCAPE HATCH, and the values to “-10,” “-100,” “-1000” as needed for the digit place.
NEGATIVE NUMBER COMPILER
This program is not called from the core negative number program, but from whatever program is needing the negative number generated. It's just what it says on the tin, creating a thought called “negativenumber” that can then be used to manipulate a Thought or Memory as needed. It is a standard three row by three column grid.
- ROW 1 COLUMN 1 - SET THOUGHT [sets the thought “negativenumber” to zero, just in case you've done this more than once in a cycle.]
- ROW 1 COLUMN 2 - INCREMENT THOUGHT [increments the thought “negativenumber” by the value of the thought “ones”]
- ROW 1 COLUMN 3 - INCREMENT THOUGHT [increments the thought “negativenumber” by the value of the thought “tens”]
- ROW 2 COLUMN 1 - INCREMENT THOUGHT [increments the thought “negativenumber” by the value of the thought “hundreds”]
- ROW 2 COLUMN 2 - INCREMENT THOUGHT [increments the thought “negativenumber” by the value of the thought “thousands”]
- ROW 2 COLUMN 3 - INCREMENT THOUGHT [increments the thought “negativenumber” by the value of the thought “tenthousands”]
- ROW 3 COLUMN 1 - INCREMENT THOUGHT [increments the thought “negativenumber” by the value of the thought “hundredthousands”]
- ROW 3 COLUMN 2 - SET MEMORY [sets the memory being converted back to zero. This is not necessary, but in my application, I reserve several memory chips as “registers” to temporarily hold information that must persist longer than one programming cycle (otherwise I'd just use a thought), but are otherwise disposable numbers.
HOW TO USE THIS SYSTEM
I assume the use of a register memory chip as I described above. A program would set the value of this register to whatever was needed for conversion, this is because the programs will always look at the same memory chip each time they function, and you might have more than one memory you could conceivably wish to convert to a negative number. By writing to the register memory the value you wish to convert, you preserve the original memory value and retain the simplicity (ha!) of the programming by only ever referencing the one memory to use it. The program would set this value, call the NEGATIVE NUMBER CONVERTER program with a RUN PROGRAM, then call the NEGATIVE NUMBER COMPILER program with another RUN PROGRAM, then do the memory/thought manipulation with the “negativenumber” thought you've generated. Once you've made the initial investment of time and resources, you've got a powerful programming tool at your disposal.
Return to previous tutorial.
Advanced Tutorial Contents Page.
Return to Places Overview