tech.lgbt is one of the many independent Mastodon servers you can use to participate in the fediverse.
We welcome all marginalized identities. This Mastodon instance is generally for folks who are LGBTQIA+ and Allies with an interest in tech work, academics, or technology in general.

Server stats:

3.1K
active users

A logic gate OR is it?

Public

@Natasha_Jay it has five NOT in a row, therefore it is FALSE? ... wait, one of the lines has XNOR hidden, so, must be TRUE?

Public

@Natasha_Jay

I'm more annoyed that I should be by the OR gates with only one input.

aaaand I'm trying to read the damn gate like it's a diagram.

Saving this to show my CS students.

*excuseme* those are NOR gats because of the classy little ball I think.

Public

@futurebird @Natasha_Jay

I don't think they're NOR gates, either, although they resemble them at first sight. Recall one of De Morgan's laws:

¬(A & B) = ¬A | ¬B

Now note that the gates have inverters on their inputs. So what they evaluate is

¬(¬A | ¬B)

By the law quoted above,

¬(¬A | ¬B) = ¬¬A & ¬¬B

And, trivially,

¬¬A & ¬¬B = A & B

And here's a hand-calculated truth table to back it up:

A B X
0 0 0
0 1 0
1 0 0
1 1 1

So those are misleadingly-drawn AND gates. Obfuscated circuit diagrams, anyone?

Quiet public

@CppGuy @futurebird @Natasha_Jay If memory serves, the "D"-shaped gates are OR, but implemented as NAND for "active low" inputs. Common in the TTL days.

Quiet public

@kbm0

Active low? Fair is foul, and foul is fair. I'm just an 'umble programmer; I know nothing of this witchcraft. 😄

@futurebird @Natasha_Jay

Quiet public

@CppGuy Still works by De Morgan with your notation though: ¬(¬A&¬B)=A|B

Public

@futurebird
O.M.G.
Why did you have to point that out?
My eyes had been gliding over that nonsense in self protection (or perhaps some anti-memetic self-censoring?). But now i can't look away. 😞
@Natasha_Jay

Public

@roytoo @futurebird @Natasha_Jay ... feh ... this image has been torturing me since I first saw it on the Internet ... to add to your joys - the NOT inputs to the NAND make those actual OR gates ...

Public

@futurebird @Natasha_Jay Reading the diagram is easy: there are 4 short circuits in the gate, it therefore is simply a non logical conductor. 🤷‍♀️

Public

@futurebird @Natasha_Jay is this the CS equivalent of a Texas carbon?

Quiet public
Public

@Natasha_Jay What’s with the OR gates?

Public

@Natasha_Jay it’s just a shorted gate.

Public

@Natasha_Jay if I put the correct peaces in the correct slots in the correct order, does it open?

Public

@Natasha_Jay seems pretty exclusive

Public

@Natasha_Jay

I think that the solution to that gate lies in ladder logic.

Public

@Natasha_Jay the real questions is it a combinational or sequential set of gates

Quiet public
Public

@Natasha_Jay [tech.lgbt]

Well, this is a magical gate that filters out the people from a group who can pass through.

Assumption:
The gate determines which persons, out of a group of 7 labeled persons(a,b,c,d,e,f,g), standing together in front of the gate, are allowed to enter.

Input of the gate-logic is at the bottom, output at the top.
Every column contains the logic to determine who is allowed to enter with the indexing start from the left, the lefternmost input line is "a" :).

Now the colums evaluation if we assume that the circles at the inputs of the nand-gate are negations of this individual input.

¬(¬x ∧ ¬y) ° ¬a = ¬(¬a ∧ ¬a) = ¬(¬a) = a;


¬x ° ¬(¬b ∧ ¬c) = ¬( ¬(¬b ∧ ¬c)) = ¬( (b v c) ) = ¬b ∧ ¬c


¬(¬x ∧ ¬y) ° ¬( d v d) = ¬(¬(¬( d v d)) ∧ ¬(¬( d v d))) = ¬(¬(¬d) ∧ ¬(¬d))= ¬(d ∧ d)= ¬(d) = ¬d


¬(x v y) ° ¬e = ¬((¬e) v (¬e)) = ¬(¬e v ¬e) = ¬(¬e) =e


¬(x) ° ¬(¬f ∧ ¬g) = ¬f ∧ ¬g (same as colums 2)

Result of the magical selection door will be:
Persons "a" and "e" are allowed to enter, the rest gets beamed into the nowhere ;)
A dangerous gate.

Public

@Natasha_Jay Unexpected design :)

Public

@Natasha_Jay @catsalad Local police call it ‘Geekpocket Gate’ as pickpockets find easy targets in the crowds of circuit designers that gather around the gate to argue its meaning. “We’re gonna tag a wall with invalid C expressions next.” said one enterprising youth, who wished to remain anonymous.

Public

@Natasha_Jay I love this 'logic gate' with a passion. My non-geek friend took one look and said "I don't get it..."

Quiet public

@Natasha_Jay
And some strands have a higher weighting

Public

@Natasha_Jay You can build everything with a NAND gate. It seems this also includes a gate... Nice one!

Quiet public

@Natasha_Jay
Maybe a couple of zener diodes thrown in for surge protection.
@TerryHancock

Public

@Natasha_Jay This idea is sooo good

Public

@Natasha_Jay Nice foot holds for climbing over it.

Quiet public

@Natasha_Jay
OR NOT was right friggin' there!