Guide:Logic Gates

From Terraria Wiki
Jump to: navigation, search

To new players or players who have never tinkered with wiring before, logic gates may seem complicated. Logic gates, however are very useful tools in Terraria for anyone wanting to construct advanced wiring creations. This guide assumes you already have basic knowledge of wiring. But, if you don't you can learn more about wiring here.

Basic Logic Gate Functions[edit | edit source]

There are six different kinds of logic gates: AND, OR, NAND, NOR, XOR, and XNOR. The letters represent what the gate does. AND requires all inputs to be true, and OR requires one or more input to be true. 'N' stands for not, which translates to the opposite of, so NAND requires the opposite of some inputs to be true, therefore becoming active as long as not all the inputs are true. NOR triggers when no input is true. 'X' means translates to 'exclusively', so XOR triggers when only one input is true, and XNOR triggers when more than one input is true- or otherwise when the total number of true inputs isn't one, the opposite of XOR.

AND Logic Gate[edit | edit source]

Example of the AND Logic Gate.

There are many things you can do with the AND Logic Gate. The AND Gate reacts only when all inputs are true, so it can be used to restrict access to a particular area unless a player has flipped specific switches throughout the world. It's also great for situations where more than one goal needs to be achieved before a player can move on.

Another use for the AND Gate is wire changing, that is the changing of the color of the wire. AND Gates are useful where one wire color must be used for the input, but another used for the output. A good example is a complicated teleporter hub that needs to be wired to a teleporter where other wires interfere. If you just have one input, the input value and output value will always be the same, (true or false, off or on.)

A third use for AND Gates is for something a player doesn't want happening before other things happen. For example, a player wouldn't want the inner door of their airlock in their underwater base to open before the water was pumped out AND the outer door was closed. Using an AND Gate, the player can wire it to only open the inner door if there isn't any water in the chamber AND the outer door is closed. This can be done using switches, but using the AND Gate, it becomes more streamlined.

OR Logic Gate[edit | edit source]

OR Logic Gates are useful when you want something to happen only after one of the inputs are triggered. For example in an adventure map, if you want players to only select one room, you may wire up an OR Gate to some pressure plates so that once they enter a room, they may still backtrack to the previous room, but not to the rooms they didn't choose.

The big idea with OR Gates is having to make a choice, while at the same time, shutting off other options once that choice has been made. However, OR Gates can be used when the player only has to complete one task, out of many, such as one parkour path out of four, in an adventure map for example. OR Gates can also be useful outside of adventure maps, for instance, if the player wants to wire an OR gate so that when day shifts to night or when an enemy comes into range of your defences, they turn on. This would be useful for discouraging any slimes or other daytime baddies from attacking you.

Basics Walkthrough (Game progression • Progression graph) • Getting started • Practical Tips • Mining techniques (Tips) • Events in General
Jump Height Comparison
Setups Class setups (Weapon Playthroughs) • Inventory management
Farming Gardening • Money • Enemies • Chlorophyte • Souls • Biome Keys/Key Molds • Renewable Resources
Pre-Hardmode Boss Strategies Mobile Version3DS version Lepus • Mobile Version3DS version Turkor the Ungrateful • King Slime • Eye of Cthulhu • Eater of Worlds • Brain of Cthulhu • Queen Bee • Skeletron
Wall of Flesh‎
Hardmode Getting Started • Maintaining Purity • Lunar Event strategies • Frost Moon strategies • Desktop Version Old One's Army strategies
Hardmode Boss Strategies The Twins • The Destroyer • Skeletron Prime • Plantera • Golem
Old-gen console versionMobile Version3DS version Ocram • Duke Fishron • Desktop VersionConsole Version Lunatic Cultist • Desktop VersionConsole Version Moon Lord
Events Pumpkin Moon
Advanced Teleporter Network • Dungeon Guardian • Skipping Stones
Console VersionOld-gen console version "Beating" the Tutorial • Expert mode
Building Bases • Base defense • Arena • Wiring (Logic Gates) • Travel • Artificial biomes • Minecarts
Surviving in Environments Corruption • Crimson • Ocean • Jungle • Dungeon • Underworld
Hallow • Jungle Temple
Crafting Crafting 101 (Quick Reference) • Cell Phone • Ankh Shield • Terra Blade
Multiplayer Setting up a Terraria server • Setting up Steam Multiplayer • Capture the Gem • PvP
Other Android Inventory Editing • Post-Game Ideas

Promotional Content