Actions

User

Difference between revisions of "Carsten Milkau/NOT Gate"

From Unofficial Stationeers Wiki

< User:Carsten Milkau
Line 41: Line 41:
 
|compare 1 || Compare Unit || Input 1 || x '''(input)'''
 
|compare 1 || Compare Unit || Input 1 || x '''(input)'''
 
|-
 
|-
| || || Input 2 || ''b'' (constant or bound value)
+
| || || Input 2 || ''b'' (constant or bounded value)
 
|-
 
|-
 
| || || Operation Selector || Lesser
 
| || || Operation Selector || Lesser

Revision as of 06:53, 22 July 2018

NOT Gate

A NOT gate, sometimes also called inverter, is a circuit that outputs the value that was not input. It has a single input and output, and each can only take one of two pre-defined values (typically 0 and 1). Whatever the input value is selected, the output value will be the other of the two.

Definition

value table
input output
0 1
1 0

Connectors

  • Input: one of two values (0 or 1)
  • Output: the other of the two values

Implementation

NOT gates can often be avoided by modifying the circuit. For instance, an OR Gate with two NOT gates connected to its inputs and outputs can always be replaced by an AND gate with just one NOT gate connected.

Unfortunately, there is no single-component implementation of a NOT gate. However, if you happen to have a data signal with a known value (like a memory containing a constant), often you can feed this signal into a single component in order to turn it into a NOT gate.

Using A Less-Than Comparator

CompareUnit.png

If you have a circuit available (e.g. a constant memory) that has a value b known to stay between 0 and 1 (but not 0), you can turn a Compare Unit into a logic NOT gate by comparing the input x to b, i.e.

not_x = (x < b)
circuit setup
unit unit type connector/setting source / value
compare 1 Compare Unit Input 1 x (input)
Input 2 b (constant or bounded value)
Operation Selector Lesser
Output y (output)

Using An Equality Comparator

CompareUnit.png

If you have a circuit output available that is known to be zero when the NOT gate is used (e.g. a constant memory), you can turn a Compare Unit into a logic NOT gate by comparing the input x to 0, i.e.

not_x = (x = 0)
circuit setup
unit unit type connector/setting source / value
compare 1 Compare Unit Input 1 x (input)
Input 2 0 (constant)
Operation Selector Equals
Output y (output)

Using Subtraction