# [1.3.1]Why no NOT gates?

#### Nemo

##### Terrarian
I heard in 1.3.1 we will be getting logic gates but there won't be a NOT gate.

Why?

You can "fake" one with a NAND - just tied the 2 inputs together - so why not a "native" NOT gate?

PS: I wonder how they will interact with existing "pulse"-based mechanisms too.

#### piemansauce

##### Duke Fishron
We haven't received the update yet

I like gates

#### MegaMage314

##### Plantera
Where did you hear that there wouldn't be a NOT gate?

#### DialgaTheTimeLord

##### Steampunker
Sounds like a bunch of

noun
1. a large seasoned sausage made of finely ground meat, usually beef and pork, that has been cooked and smoked.

to me.

#### DicemanX

##### Brain of Cthulhu
I heard in 1.3.1 we will be getting logic gates but there won't be a NOT gate.

Why?

You can "fake" one with a NAND - just tied the 2 inputs together - so why not a "native" NOT gate?

PS: I wonder how they will interact with existing "pulse"-based mechanisms too.
Since signaling in Terraria is pulse-based, there is no point to a NOT gate.

As a side note, we can build and use logic gates in terraria currently, even before the 1.3.1 update. The 1.3.1 update will just make building them easier and more compact.

#### GuyInJeans

##### Terrarian
Can someone explain to me what a NOT gate is like I'm 5?

#### DicemanX

##### Brain of Cthulhu
Can someone explain to me what a NOT gate is like I'm 5?
A NOT gate inverts the input signal. If the input is low voltage, the output is high voltage, and vice versa.

The reason there's no need for NOT gates in pulse-based systems is because the output doesn't need a sustained voltage to have some sort of an effect. For instance, you don't need the equivalent of a high voltage state in a wire connected to a torch to keep it lit in Terraria.

#### GuyInJeans

##### Terrarian
A NOT gate inverts the input signal. If the input is low voltage, the output is high voltage, and vice versa.

The reason there's no need for NOT gates in pulse-based systems is because the output doesn't need a sustained voltage to have some sort of an effect. For instance, you don't need the equivalent of a high voltage state in a wire connected to a torch to keep it lit in Terraria.
Ah, thank you!

#### DialgaTheTimeLord

##### Steampunker
Ah, thank you!
Unrelated, your dragons are fully grown and can't receive views or clicks anymore.

#### Matsu

##### Moderator
Staff member
Moderator
Unrelated, your dragons are fully grown and can't receive views or clicks anymore.

On-topic: It's pretty hard to know what will and won't be in the update at the moment, so who knows what kind of crazy wiring stuff will be around.

#### DialgaTheTimeLord

##### Steampunker
On topic, then: what can you do with a NOT gate that you can't do with some other gate? Especially with new gates coming, I'd assume some logical equivalency can make up for it.

#### MegaMage314

##### Plantera
On topic, then: what can you do with a NOT gate that you can't do with some other gate?
Nothing really, at least not in terraria.

#### DicemanX

##### Brain of Cthulhu
On topic, then: what can you do with a NOT gate that you can't do with some other gate? Especially with new gates coming, I'd assume some logical equivalency can make up for it.
Terraria (or any pulse-based system) only needs the AND gate to generate any desired input/output system. The AND gate can be converted into NAND, OR, and NOR by reversing the polarity of some/all of the outputs. The XOR and XNOR gates, on the other hand, are trivial to make in pulse based systems - they can be currently made by attaching two switches/pressure plates/levers to a single wire. The NOT gate is also trivial because all it needs is the reversal of the polarity of an output (and thus there's no need for a physical NOT gate anywhere in the circuit to begin with).

#### Nemo

##### Terrarian
Since signaling in Terraria is pulse-based, there is no point to a NOT gate.

As a side note, we can build and use logic gates in terraria currently, even before the 1.3.1 update. The 1.3.1 update will just make building them easier and more compact.
That's the other thing ... How are pulse-based systems going to work with logic gates?

Must the pulses arrive at the same time?

Also what's the point of NAND/NOR/NXOR gates then? You can't "reverse" a pulse.

I can totally see them,
• keeping the pulse-based components separate and using only the logic gates to control state (timers, actuators and active stone blocks have state after all) or
• converting all pulse-based components into rising/falling/rising and falling edge responding components - existing switches and levers will all generate a rising + falling edge when activated.
[DOUBLEPOST=1450306087,1450306001][/DOUBLEPOST]
Where did you hear that there wouldn't be a NOT gate?
http://terraria.gamepedia.com/Logic_gates

:x

#### DicemanX

##### Brain of Cthulhu
That's the other thing ... How are pulse-based systems going to work with logic gates?

Must the pulses arrive at the same time?

Also what's the point of NAND/NOR/NXOR gates then? You can't "reverse" a pulse.

In a pulse-based system, the equivalent to a high output voltage is either triggering some sort of event or changing the state of some object. For instance, a torch in the ON state can represent a high voltage state. Alternately, triggering some event, such as teleporting an NPC, can likewise represent a high voltage state.

Reversing the output is as simple as changing the definition of the high voltage equivalent. For instance, for an AND gate whose outputs are represented by actuated blocks (low voltage state) or deactuated blocks (high voltage state), you can reverse the definition of low and high voltage states, and presto, you have a NAND gate (or at least its equivalent).

Here's an example of a build in Terraria using logic gates (gates are used for a ripple-carry adder, a binary-to-BCD converter, and a BCD-to-binary converter):

http://forums.terraria.org/index.ph...culator-with-decimal-inputs-and-output.32610/

#### MegaMage314

##### Plantera
That's the other thing ... How are pulse-based systems going to work with logic gates?

Must the pulses arrive at the same time?

Also what's the point of NAND/NOR/NXOR gates then? You can't "reverse" a pulse.

I can totally see them,
• keeping the pulse-based components separate and using only the logic gates to control state (timers, actuators and active stone blocks have state after all) or
• converting all pulse-based components into rising/falling/rising and falling edge responding components - existing switches and levers will all generate a rising + falling edge when activated.
[DOUBLEPOST=1450306087,1450306001][/DOUBLEPOST]

http://terraria.gamepedia.com/Logic_gates

:x
Oh. Well, theres no source for that, but you can see pretty easily by the picture provided there how logic gates would work (and why a NOT gate would be redundant).

#### Nemo

##### Terrarian
Oh. Well, theres no source for that, but you can see pretty easily by the picture provided there how logic gates would work (and why a NOT gate would be redundant).
How would it be redundant?

It looks like a normal AND gate in operation. I can invert any of the inputs or the output.

#### MegaMage314

##### Plantera
How would it be redundant?

It looks like a normal AND gate in operation. I can invert any of the inputs or the output.
Exactly, you can already invert an output with terraria's pulse system, so having a not gate to do it would be pointless.

#### DicemanX

##### Brain of Cthulhu
How would it be redundant?
Because the equivalent of a high voltage output is arbitrary in a pulse-based system - instead of adding a NOT gate you can simply change or redefine the state of the output. Hence a NOT gate being redundant.