Pretty small inverter using xor, but you all probably knew that.

Mew_

Terrarian
910ae42722cbe294c498d4bdc43f4c9f.png

853e5617eb846c417fba9b0d95c068c2.png

I am a complete noob at wiring in Terraria, but plenty of experience with electronics in real life, trying to make a 7 segment 4 bit decoder so ignore all on the right :)
 
Last edited:
I always use torches for my 7 segment displays, but I guess some people like their displays a bit dirty. `:D Do you have any plans for this inverter or 7 segment 4 bit decoder?
 
So, the thing about logic gates in terraria is, that they are not incredibly useful in the way they are advertised. Wiring in terraria is based around signals. A wire has no on/off state, so there is actually nothing to negate. Logic gates simulate standard boolean logic, by emitting a signal every time the result of their operation changes. This way any other 2-state device you hook up to them, will also mirror their state.
In this case, the XOR gates are actually not necessary at all. (Except for transferring signals between wire colors.) you could just hook up your inverter switch directly to all of the output torches, and you'd have the same effect.
I know this must be confusing as all hell, especially to someone with a background in electronics... When I do wiring, I only use gates as transistors or diodes and pretty much just ignore their "intended" use.
 
So, the thing about logic gates in terraria is, that they are not incredibly useful in the way they are advertised. Wiring in terraria is based around signals. A wire has no on/off state, so there is actually nothing to negate. Logic gates simulate standard boolean logic, by emitting a signal every time the result of their operation changes. This way any other 2-state device you hook up to them, will also mirror their state.
In this case, the XOR gates are actually not necessary at all. (Except for transferring signals between wire colors.) you could just hook up your inverter switch directly to all of the output torches, and you'd have the same effect.
I know this must be confusing as all hell, especially to someone with a background in electronics... When I do wiring, I only use gates as transistors or diodes and pretty much just ignore their "intended" use.
Yeah, I know what you are saying. I have never really used the NAND gate, NOR gate, XOR gate, or XNOR gate. You can basically use AND, OR, and the faulty lamp to do just about everything. If you needed to invert something you could just place an OFF lamp or ON lamp depending on what you are using and what it's for. But I would use the word "pulse" instead of "signal".
 
Well, the thing is I have a schematic here from when I started designing circuits myself, where you actually need inverted inputs to be able to get a correct output.
I'll keep trying, if it doesnt work all I have done is wasted a few hours heh.

And I kind of get what you say, and if I need extra modifications I'll just make a mod, which I may do anyways because it would be simple, and maybe I could allow designing of own circuits.

I have 8 years of experience in C++, moved over to C# so need something to do at night when I don't do school work.

-Edit
May try to implement script language to allow for circuit scripting, almost like Expression 2 in GMOD.
We'll see how much time I want to spend on this or if it'll even become anything.
 
Last edited:
Well, the thing is I have a schematic here from when I started designing circuits myself, where you actually need inverted inputs to be able to get a correct output.
I'll keep trying, if it doesnt work all I have done is wasted a few hours heh.

And I kind of get what you say, and if I need extra modifications I'll just make a mod, which I may do anyways because it would be simple, and maybe I could allow designing of own circuits.

I have 8 years of experience in C++, moved over to C# so need something to do at night when I don't do school work.

-Edit
May try to implement script language to allow for circuit scripting, almost like Expression 2 in GMOD.
We'll see how much time I want to spend on this or if it'll even become anything.

A lot of us started by trying to carry over traditional circuit diagrams into the game. This approach works better in minecraft imo, but with the pulse based system terraria uses it's often better/more efficient to throw traditional combinational designs out the window. I made a tutorial on building a teleporter hub that starts by showing the most compact ways of building common real life components. Things like flip flops, binary decoders and binary encoders (or mux/demux depending on your preference). I also linked to a great video showing a clever way of building the 7segment displays and their decoders. Here is my post and a direct link to the video on the displays. Hope it helps.

https://forums.terraria.org/index.p...-including-basic-components-and-wiring.69814/ -- Component guide

7-segment display and decoder guide:

NOTE: If you are familiar with K-Maps. Most terraria circuits are simplified sum of product circuits with no dedicated inverters. (the initial state of the lamp can "invert" the signal in most situations) Also, sequential logic doesn't work the same in terraria, and anywhere sequential circuits would normally be used, we utilize a faulty gate equivalent.
 
Last edited:
Back
Top Bottom