These elements would reside in a new category, entitled “Logic”. This category would have a symbol representing binary numbers.
NOTE: INST w/ set .TMP is only used for inputs and outputs because it would be easier to integrate with other electronics. Only the pixel in contact with the logic gate needs to have a .TMP set.
AND (AND Gate):
Color - rgb(196, 201, 139)
Description - “AND Gate, outputs when both inputs are SPRK'd.”
Properties -
INST with a .TMP of 1 and 2 are inputs.
INST with a .TMP of 3 is the output.
NOT (NOT Gate):
Color - rgb(196, 201, 139)
Description - “NOT Gate, outputs when the input isn’t SPRK’d.”
Properties -
INST with a .TMP of 1 is the input.
INST with a .TMP of 2 is the output.
OR (OR Gate):
Color - rgb(196, 201, 139)
Description - “OR Gate, outputs when either input is SPRK’d.”
Properties -
INST with a .TMP of 1 and 2 are the inputs.
INST with a .TMP of 3 is the output.
XOR (XOR Gate):
Color - rgb(196, 201, 139)
Description - “XOR Gate, outputs when either input is SPRK’d, but not when both are SPRK’d.”
Properties -
INST with a .TMP of 1 and 2 are the inputs.
INST with a .TMP of 3 is the output.
NAND (NAND Gate):
Color - rgb(196, 201, 139)
Description - “NAND Gate, does not output when both inputs are SPRK’d.”
Properties -
INST with a .TMP of 1 and 2 are the inputs.
INST with a .TMP of 3 is the output.
NOR (NOR Gate):
Color - rgb(196, 201, 139)
Description - “NOR Gate, does not output when either output is SPRK’d.”
Properties -
INST with a .TMP of 1 and 2 are the inputs.
INST with a .TMP of 3 is the output.
XNOR (XNOR Gate):
Color - rgb(196, 201, 139)
Description - “XNOR Gate, does not output when either input is SPRK’d, but not when both are SPRK’d.”
Properties -
INST with a .TMP of 1 and 2 are the inputs.
INST with a .TMP of 3 is the output.
FFLP (Flip-Flop, namely a T flip-flop):
Color - rgb(196, 201, 139)
Description - “T-Flip Flop, Toggles when the input is SPRK’d.”
Properties -
INST with a .TMP of 1 is T.
INST with a .TMP of 2 is CLOCK.
INST with a .TMP of 3 is Q.
INST with a .TMP of 4 is Q’.
LTCH (Latch, namely a SR Latch):
Color - rgb(196, 201, 139)
Description - “SR Latch, toggles between outputs when set and reset are SPRK’d.”
Properties -
INST with a .TMP of 1 is S.
INST with a .TMP of 2 is R.
INST with a .TMP of 3 is Q.
INST with a .TMP of 4 is Q’.
Use Cases:
More compact electronics. Instead of making your own logic gates, these logic gates would just be a single pixel!
Faster response times/More reliable gates. Regular logic gates made in TPT (excluding subframe, but that’s complicated to use) can be slow to react, and can even fail to work properly.
Friendlier entrance to electronics. Instead of needing to use weird elements (NTCT? PTCT? NSCN? PSCN?, NOTE: I ACTUALLY KNOW WHAT THESE ARE), why not use logic gates?
It's meant to be beginner friendly.
Also, wouldn't it be easy to code (i'm not sure about the flipflop/latch)?
If we're looking at the AND gate for example, can't you just do this:
Psuedocode:
input1 = check for SPRK from INST w/ a .tmp of 1
input2 = check for SPRK from INST w/ a .tmp of 2
if( input1 && input2 ) = true {
SPRK all INST w/ a .tmp of 3 touching the AND element
}
Bumping this.
Also, this suggestion would make it easier to build computers.
More Elements:
FADD (Full Adder):
Color - rgb(196, 201, 139)
Description - “Full Adder, adds 2 bits.”
Properties -
INST with a .TMP of 1 is A.
INST with a .TMP of 2 is B.
INST with a .TMP of 3 is Cin.
INST with a .TMP of 4 is Sum.
INST with a .TMP of 5 is Cout.
FSUB (Full Subtractor):
Color - rgb(196, 201, 139)
Description - “Full Subtractor, subtracts 2 bits.”
Properties -
INST with a .TMP of 1 is A.
INST with a .TMP of 2 is B.
INST with a .TMP of 3 is Bin.
INST with a .TMP of 4 is Difference.
INST with a .TMP of 5 is Bout.
I forgot to add that the logic gates would actually check for SPRK every 5 frames, so that INST's SPRK cooldown wouldn't make the logic gate think that there's no signal.
I chose to use INST and set it's .TMP for these logic gates because I felt that would be the easiest way to actually input signals, because using a different element for each input/output would quickly become a pain.
Well, I guess that FILT is the way to go now.
there's a mod with logic gates, all inputs are just pscn and all outputs are just nscn