# Suggestion: Change the OR-gate to an IF-THEN gate

## Recommended Posts

Why?: the OR-gate functionality is already an intrinsic part of the logic wire itself. The IF-THEN function is an intrinsic part of all the different gates but we don’t have a “blanc” logic gate with only this functionality. It would lower complexity and increase convenience at the same time.

The IF-THEN-gate should of cause be a simple two block item like the NOT-gate. With this system you could easily make the old OR-gate by simply putting two IF-THEN-gates side by side and joining their output side with a logic wire – maybe this could be used to determine the price for the IF-THEN-gate – the price simply being the half of the AND gate minus the cost of a single piece of logic wire. Making a three-input OR-gate with the suggested system is by the way much easier and more compact than what the explicit OR-gate allows.

I have been missing this simple logic function a couple of times and have resorted to use the extender instead living with the confusion it brings

##### Share on other sites

Err whats a IF-THEN gate? Output 1 when input is 1 and output 0 when input is 0? Isn't that the same as just putting a wire?

##### Share on other sites

@Fedolin Respectfully, I think you should read up on logic gates in general, and boolean algebra in particular because your suggestion implies you don't have the first clue what you're talking about.

##### Share on other sites

1 hour ago, AlexRou said:

Err whats a IF-THEN gate? Output 1 when input is 1 and output 0 when input is 0? Isn't that the same as just putting a wire?

Sounds like a diode to me. A wire still transfers everything back, a diode would be useful when you need to copy the signal without affecting the input wire. Could be replicated with two NOTs linked serially.

I can't think of a good way to utilize it, though.

That said, the OR gate sounds pretty redundant.

##### Share on other sites

4 hours ago, Coolthulhu said:

Sounds like a diode to me. A wire still transfers everything back, a diode would be useful when you need to copy the signal without affecting the input wire. Could be replicated with two NOTs linked serially.

Or an OR gate only connected with one input. Or an AND gate with both inputs connected to source.

It is precisely the diode function of isolating the inputs from each other, and the output from either input that makes the OR gate essential to all but the most simple forms of automation.

##### Share on other sites

Or buffer gate with set 0.1s

##### Share on other sites

You can already copy signals. Just split off the auto-wire, just like power-wires, pipes, and vents.

##### Share on other sites

I think Coolthulhu is right that a diode is what I am thinking of. The double NOT is definitely a way to obtain that result, but requires as much space and more materials than using an OR-gate only for that function. Glad to hear that I am not the only one finding the OR-gate to be a bit redundant : ). The diode construction of an OR gate is precisely the design I was mentioning at the start as a way to obtain the same result.

I can see that my “IF-THEN-gate” has sparkled a bit of confusion – as I see it the statement given by the OR-gate is that: IF input A OR input B is on, THEN output C is on – that is what I mean, when I say that the gates have the IF-THEN statement as an intrinsic part (which I must admit might not be the most straight on way of saying it).

As with the other logic gates: NOT-gate: IF input A is of, THEN output B is on, AND-gate: IF input A AND input B is on, THEN output C is on – and XOR gate: IF input A or input B is on but not both, THEN output C is on.

So, what I am asking for is a gate that simply says: IF A is on, THEN B is on – but doesn’t go the other way as the wires do – which is exactly what a one-way diode does. The arrow on the gates is what I am hinting at – they don’t go both ways. It is the property that the logic gates have inputs and outputs that gives them this functionality.

My point is not that there aren’t ways of obtaining this function in the game currently, but that the OR-gate seems even more redundant if it is implemented and that it seems too basic to not have as a direct mechanism of a diode. I have been using Neotix’s method as it seems to be the most efficient way of doing it currently – maybe the best (and simplest) solution would be to just let the buffer be able to take the value of zero – or maybe it is already being on the delay time that all the logic gates have when set at lowest value. If anyone knows the answer to this last question, I would like to hear.

##### Share on other sites

What is the use-case for this? This can already be built in the game with an OR that's got the same input twice, so adding this should be justified.

##### Share on other sites

40 minutes ago, AileTheAlien said:

What is the use-case for this? This can already be built in the game with an OR that's got the same input twice, so adding this should be justified.

It can be done in a lot of ways – because an IF-THEN statement is already a part of all the different gates (you can basically use any of them to obtain the effect). I am not suggesting adding something that isn’t already possible. I am suggesting switching one object for another because, as I see it, it would streamline the automation system. Right now, you either have to use up four tiles or live with a slight delay if you want the functionality of a diode (by either just using the OR-gate with only one input or using the buffer on lowest setting – or one of the other less resource efficient systems suggested already). But with my suggestion you could have a diode easily available without needing more space or resources to make any of the things we can make already, or more objects in the automation. What I am saying is that a diode is more useful than an OR-gate, so if the devs care about the amount of automation objects available in the game I would rather have the first than the second.

##### Share on other sites

You still haven't said what this would be *useful* for. The logic gates in the game right now can be used to combine different sensors, so that you can have more complicated decisions about when to turn machines on or off. For example, turn on this pump if the temperature is below 30, or if either of the pressure plates has been stepped on. What are you actually trying to build that would need this functionality?

##### Share on other sites

OP:you've clearly lost your objectivity and now you're cheerleading this bad idea so desperately.  Go build a bunch of automation devices, try to come up with examples where this diode would improve the designs dramatically.  If you find some, ask Klei to simply add in diodes.  Removing OR gates would be much too confusing for new players who aren't already familiar with logic gates.

##### Share on other sites

Yeah, a diode would be useful to make some automation smaller.

##### Share on other sites

Buffer gate with 0.1s delay works exactly like diode. Why you want to add another redundant element?

##### Share on other sites

7 hours ago, Neotix said:

Buffer gate with 0.1s delay works exactly like diode. Why you want to add another redundant element?

Same with filter gate.

##### Share on other sites

Almost the same. Filter gate have little activation delay and others have deactivation delay.

##### Share on other sites

I think the topic is closed due to subject of Electrical Logic Fundamental Circuit (mneumonic code).

##### Share on other sites

56 minutes ago, Mdw said:

I think the topic is closed ..

downvote

##### Share on other sites

IF THEN is be a two input one output.  https://en.wikipedia.org/wiki/Material_conditional

if A then B (or A --> B) is equivalent to (NOT A) OR B (~A V B)

OR is essential for proper electronic circuit design.  The difference between the real world and ONI, in layman's terms, is that in ONI, only a TRUE signal is "pushed" through the circuit and FALSE is simply a lack of TRUE on the circuit.  In the real world, FALSE is pushed down the circuit just like TRUE is.  If you were to connect a FALSE and TRUE wire in the real world, it would create a paradox, as the wire would be trying to be TRUE and FALSE at the same time.  What would actually happen in this case is that you would short out your circuit and almost certainly break it.  I would be very annoyed if the OR gate were removed because it prevents the real world occurrences mentioned above..

If you are willing to simply connect output gate wires, you can create an IF-THEN by using a NOT gate for the A input and either directly connect it to B or connect B to buffer gate set to 0.1.  Then you can merge the two wires and that is an IF THEN gate.

If you are not willing to, first of all kudos to you, and you can simply put a NOT on the A and OR that with the B.

I don't think there is even a standard gate symbol for IF THEN like there is for AND, OR, XOR, ad NOT because it is so easily created by the existing gates and has limited uses on computation.  It might make sense to remove OR and add an IF THEN if this game existed in a vacuum, but it does not and there is a reasonable precident that says OR should be there and IF THEN should not.

If it were up to me, merging output wires would cause them circuit to fail and the automation wire to take damage if the signals from the outputs did not match. This would not stop you from splitting the output wire, but it would make the nature of electronic circuits more realistic and make OR useful in the way that it is actually useful.

##### Share on other sites

5 hours ago, Zarquan said:

IF THEN is be a two input one output.

I think you are confused and didn't read the whole thread, OP meant IF THEN in terms of programming/English which means one input one output.

##### Share on other sites

Yes, I got confused when he said he wanted to replace OR.  Usually, picking out something to replace implies that is has the right structure to begin with.  I was also confused because the idea of If Then doesn't really make sense at this level.  If Then is closer to a function call than anything you would find at the logic gate level.  If Then is more about what logic circuits are used and would require multiplexors, which would be awesome if they were implemented.  Sorry about that.  I guess that's what I get for writing posts at absurd hours.

I stand by what I said about OR gates and what should happen if you merge outputs, at least transistor gates.  You can merge outputs for OR with diode gates, but diode gates can't implement NOT, so I doubt we are using those.  A diode would be a handy tool as the game is implemented now, as it would let you protect a false input and use it elsewhere if necessary, but I think it is shady practice.

##### Share on other sites

So... I have now also come to the conclusion myself that my suggestion in this thread is pretty lame : / - so sorry for wasting peoples time. I just got my head stuck in an idea that didn’t make much sense when I thought about it for a bit (or at all…). All the gates cost the same, so it would seem odd to add a very cheap diode. The OR-gate cost the halve of two buffers which is the nearest alternative right now, so there is kind of an economic incentive in using the OR-gate and live with its restrictions instead of using two buffers. I still think a diode is a more useful object in an automation system than an OR-gate is, but the buffer and filter on lowest settings are so close to being compact diodes that the real problem is miniscule in practice. I still wonder if there is any good reason behind the restriction that the buffer and filter can’t be set at a value of zero (there probably is). Enabling that would probably just be a tiny change somewhere in the code however.

Wow… that was a terribly start I made on this forum.

##### Share on other sites

4 hours ago, Fedolin said:

..so sorry for wasting peoples time. .

Was worth every second!
^^

##### Share on other sites

It's okay, not everyone who plays the game needs to remember the specifics of electronic digital logic (or even studied it at all) or have thought of everything.  I know I have made some silly suggestions in forums from time to time.  I hope this doesn't discourage you from posting again.  Personally, I do think that a diode without the 0.1 s timer could be useful for precision electronics (or allow us to have a 0 s buffer gate), and I certainly agree that automations do get obscenely large to perform logically simple tasks and it would be nice if some efforts would be taken to make then smaller.

##### Share on other sites

1 hour ago, Zarquan said:

I do think that a diode without the 0.1 s timer could be useful for precision electronics

Remember that every gate in game have delay on output.

#### Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
• Create New...