AND Gate
by HB_Stratos
uploaded 2021-11-30
stock+DLC ship


This is an AND Gate. inputs are toggled with AG1 and AG2, output is the red lamp. It works by using the functionality that if two (or more) KALs try to edit a part value simultaneously it gets averaged out. AKA if one KAL commands value 1 and the other value 0, then the output will be 0.5. However this only works if the Kals try to edit things at the same time (read: are playing at the same time). This is why the eval KAL gets triggered, it plays all of them for just a tiny bit at the same time to evaluate the average. Output is taken by another KAL that only gives a 1 as output if the value is 0.5. This gives an XOR gate, which reads 1 if trhe average of the inputs is 0.5, aka if one input is 1 and the other is 0. This can be converted into an AND gate by inverting one of the inputs (reversing the slope in the KAL) and adding a Pulldown KAL. This KAL acts as a third input to the processing KAL, and influences the average by setting a very high negative value which pulls it down to zero. This is essentially a XOR gate with a not gate infront of the second input (something that gives a 1 if both inputs are equal) and a forced pulldown that sets the output to 0 if input 1 is zero, therefore removing the 1 output that would have resulted from the previous being both 0. Like this, the output is only 1 if both inputs are 1, and we have an AND gate.

A stock aircraft called AND Gate. Built with 11 of the finest parts, its root part is probeStackSmall.

Built in the SPH in KSP version 1.12.2.


  • Type: SPH
  • Class: ship
  • Part Count: 11
  • Pure Stock
  • KSP: 1.12.2

swipe to switch images, tap to close