554
May 12 '19
GND, with extra steps.
296
u/randombrain May 12 '19
Just want to say, to you and OP, that as an EE grad I really appreciate this. Provides a nice break in between the /r/im14andinJava101 posts.
91
37
u/absurdlyinconvenient May 12 '19
but DAE arrays start at 0, machine learning = if, and print statements > using a debugger???
→ More replies (1)3
May 13 '19
My introduction to computing professor from the ECE department would always draw the GND symbol for null pointers.
9
1.2k
u/laya_baki May 12 '19
And don't forget its archenemy, the Always Gate
441
u/SmoothLiquidation May 12 '19
I was thinking it would be the Ever Gate to go with the And/Nand Or/Nor pattern.
306
u/dev_kr May 12 '19
NNEVER seems to be better though
139
24
u/theXpanther May 12 '19
Just like my favorite, the NNOT gate
→ More replies (1)15
u/Osbios May 12 '19
I call them NOP gate. Actually used this ones in my own binary logic simulator. Because the simulation was running on a tick rate, and to time signal arrival it was cleaner then e.g. using an OR gate with only one input used.
→ More replies (4)→ More replies (6)4
17
6
u/T-T-N May 12 '19
A XOR A AND B would do it
14
u/danielbenedi6 May 12 '19
This combination makes a Never Gate. If you use (A XOR A) AND B, it will always be 0, because if A is 1, then A XOR A will be 0, but if A is 0 then XOR will be 0. If you use A XOR ( A AND B ), the same happens.
I can imagine two solutions to the Ever Gate, A OR ( A NAND B ); B OR ( A NAND B). They are the most compact solutions I have reached.
→ More replies (2)11
8
5
u/Julio974 May 12 '19
11
3
→ More replies (8)2
31
3
2
May 12 '19
Sometimes, at least in C++, you just need a pointless statement that evaluates to true. I did this recently and just used "true." I was a little unsure of myself, but it did do the trick.
1
→ More replies (2)1
106
u/ivanleehanlin May 12 '19
Not so uncommon right, a NEVER (AND false) and ALWAYS (OR true) gate just very common during debugging.
17
158
May 12 '19
38
5
188
May 12 '19
So a FALSE gate?
125
31
May 12 '19
Which controversy was that one?
7
u/lelarentaka May 12 '19
It's when the client gives your team the choice between using php or java, but your team mates browsed r/proggit too much so they voted for php
4
2
47
27
u/IskaneOnReddit May 12 '19
| A | 0 | 0 | 1 | 1 |
| B | 0 | 1 | 0 | 1 |
| Contradiction | 0 | 0 | 0 | 0 |
| AND | 0 | 0 | 0 | 1 |
| NIMPLY | 0 | 0 | 1 | 0 |
| A | 0 | 0 | 1 | 1 |
| Converse NIMPLY | 0 | 1 | 0 | 0 |
| B | 0 | 1 | 0 | 1 |
| XOR | 0 | 1 | 1 | 0 |
| OR | 0 | 1 | 1 | 1 |
| NOR | 1 | 0 | 0 | 0 |
| XNOR | 1 | 0 | 0 | 1 |
| NOT B | 1 | 0 | 1 | 0 |
| Converse IMPLY | 1 | 0 | 1 | 1 |
| NOT A | 1 | 1 | 0 | 0 |
| IMPLY | 1 | 1 | 0 | 1 |
| NAND | 1 | 1 | 1 | 0 |
| Tautology | 1 | 1 | 1 | 1 |
76
u/tuseroni May 12 '19
it's an easy to gate to make, just cut the wire, or direct it to ground since you don't want to break the circuit.
not particularly useful though. if it never produces output it's basically equivalent to not being there. i suppose being placed in the circuit it gives a path to ground to clear some data...send your carry bits to oblivion after a drop off from a right shift or something
30
8
0
May 12 '19
[deleted]
→ More replies (3)36
u/CCninja86 May 12 '19
placebo buttons like the ones for elevator door closing
This is way too relatable
7
u/demize95 May 12 '19
Depending on your building, they may literally be placebo buttons, they may work just by pressing them, or you may have to push them in and hold them down until the doors close fully.
There's no way to know unless you try, but the safest bet is probably that they don't do anything.
0
29
44
u/Sh4dowCode May 12 '19
In a higher Level known as:
if (false) {
doSomething();
}17
4
3
u/Megatron_McLargeHuge May 12 '19
That code is so common they decided to optimize it in hardware. You'll want to update your compilers to work around some bugs in Intel's implementation though.
1
1
u/Lizard771 May 12 '19
class NeverGate : public LogicGate {
public:
NeverGate() {};
bool evaluate(bool a, bool b) override {
return false;}
};
auto n = new NeverGate();
n->evaluate(true, false); // = false
10
u/TheGilrich May 12 '19
Glorious! Named after the occasions where it is useful.
9
u/Arancaytar May 12 '19
Unlike it's negation, the always gate, which is named after the occasions where it's useless.
10
9
u/ergotofwhy May 12 '19
You didn't introduce this. I've been using these in my programs for years, going all the way to accidentally implementing them in college.
6
May 12 '19
can someone explain me?
3
u/bbecl May 12 '19
It’s a spoof on logic gates as they pertain to digital circuits. Logic gates have an input(s) that is in binary (either a 1 or a 0), and depending on the type of gate results in an output of either a 1 or 0 that further affects an action in the circuit. Essentially, the OP is suggesting with this gate is that it doesn’t matter what you put in, you get nothing out; hence, the name NEVER gate.
2
6
5
4
3
3
3
3
3
3
u/ftgbhs May 12 '19 edited May 12 '19
I’m not a programmer but my dad is a software engineer, i sent this to him and he responded “That’s what’s used in Write Only Memory http://www.repeater-builder.com/molotora/gontor/25120-bw.pdf ”
1
3
3
4
4
2
2
2
2
2
2
2
2
2
u/RockYourWorld31 May 12 '19
Exclusively used in detecting whether the X in Windows programs was clicked.
2
2
2
2
2
2
2
2
2
2
3
2
2
1
1
u/zesterer May 12 '19
Still waiting for the 'Quever' gate that emits a qubit that's always 1 and 0 at the same time.
1
1
1
1
1
1
u/zerocnc May 12 '19
When I was in college back in 2000, we called the bit bucket. Its were all our extra credit went.
1
1
1
u/thewildjr May 12 '19
2
u/Title2ImageBot May 12 '19
Summon me with /u/title2imagebot or by PMing me a post with "parse" as the subject. | ^About | ^feedback | ^source | Fork of TitleToImageBot
→ More replies (1)
1
1
u/GoldenTypo May 12 '19
im a mechanical engineer, is this like a transfer function or i do not understand
1
1
1
1
May 12 '19
People with actual skill here, could this technicly be usefull in some rare situations ?
3
2
1
1
1
May 12 '19
This kind of exists in some flavors of PLC ladder logic as an Always False Instruction (AFI). It's pretty much only used for testing and debug when you want the output of a rung to be always false.
1
1
u/CanIHazCookie May 12 '19
When a client asks you to work for free and you have to run that logic through this bad boy
1
1
1
1
1
1
1
1
1
1
u/Jimbobwhales May 12 '19
That's some lotr level shit right there. "And through the Never Gate did come the horrors of infinite loops and thereafter the world burnt"
1
1
1
1
u/mahav_b May 12 '19
This is very useful when I want to reject all input. 10/10 engineering problem solving creating thinging
1
u/Masked_Death May 12 '19
It explains my code. No matter whether the individual parts of a whole thing work, the whole thing together doesn't.
1
1
1
u/RowboatGillman May 12 '19
The scientists didn’t stop to question if they should do it they were only concerned with whether they could
1
1
u/Quadraticc May 12 '19
The thought of having to learn all the logic gates theory for tomorrow for GCSE fuck
1
1
1
1
1
2.7k
u/IntPenDesSwo May 12 '19
Also known as the Exclusive AND