Input 1 | Input 2 | Output |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
AND Gate
![]() AND gate with two inputs | |
Component info | |
---|---|
Internal ID |
MHG.AndGate |
Configurable | Yes |
Input and output | |
Input count | Adjustable from 2 to 4 |
Output count | 1 |
Propagation delay | 1 tick |
The AND Gate is a component used for digital logic. The AND Gate has one output and 2 to 4 inputs. The output will be ON if and only if all of the inputs are ON.
An AND Gate with two inputs measures 1 tile wide and 1 tile tall, and its body is 1 tile long, but its inputs and outputs extend its area to 3 tiles.
Logic
The AND Gate's output will only be active if all of its inputs are ON. This is true no matter how many inputs the AND gate has.
Input 1 | Input 2 | Input 3 | Output |
---|---|---|---|
0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 0 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 |
Input 1 | Input 2 | Input 3 | Input 4 | Output |
---|---|---|---|---|
0 | 0 | 0 | 0 | 0 |
0 | 0 | 0 | 1 | 0 |
0 | 0 | 1 | 0 | 0 |
0 | 0 | 1 | 1 | 0 |
0 | 1 | 0 | 0 | 0 |
0 | 1 | 0 | 1 | 0 |
0 | 1 | 1 | 0 | 0 |
0 | 1 | 1 | 1 | 0 |
1 | 0 | 0 | 0 | 0 |
1 | 0 | 0 | 1 | 0 |
1 | 0 | 1 | 0 | 0 |
1 | 0 | 1 | 1 | 0 |
1 | 1 | 0 | 0 | 0 |
1 | 1 | 0 | 1 | 0 |
1 | 1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 | 1 |
The AND Gate takes one tick to update the state of its output after a change to the state of its inputs.
Configurability
Pressing the edit button on an AND Gate allows you to change the number of inputs it has. You can select 2, 3, or 4 inputs.
Changing the number of inputs on an AND Gate does not change its latency, but it does make the components bigger, with their width changing from 1 tile wide with 2 inputs to a little less than 2 tiles wide with 3 inputs, to 2 tiles wide with 4 inputs.
The game can be modified to allow AND Gates with an unlimited number of inputs.
Placement
AND Gates with 2 or 3 inputs can be placed in the center of a board square or on top of a Mount, and can be fine-rotated.
AND Gates with 4 inputs (or more, if the game is modified to allow more inputs) have multiple attachment points, one for each square covered by the body of the component, and cannot be fine-rotated.