1. ## logic gates

so ive been looking into a lot of stuff on explainthatstuff.com, particularly this article

How do logic gates work? - Explain that Stuff

am I correct in saying these logic gates are transistors? if yes, how do they physically work?

2.

3. Logic gates can be made out of transistors,

... or even made out of wood:

Or Legos:

The point of logic gates is to control the voltage flow to allow or not allow flow. As the computer runs in binary, there are 2 states ... on or off. On would be considered a one (1), off would be considered a zero (0).

There are cases where two separate signals need to be compared and the "result" or output of the comparison can be determined.

You have an EXCLUSIVE OR (XOR) logic gate in your house. Where you have two light switches controlling one light. The light is ON is one of the switches is UP (ON) and the other is DOWN (OFF). Either combination works, but the light will be OFF if both of them are DOWN or both of them are UP.

XOR = "One or the other, but not both"

If you have OCD, you'll always make sure both light switches are DOWN when the light is off. It drives my wife crazy if the light is off and both switches are UP.

The computer needs millions of gates, of various types to process (compute) the binary codes.

AND: both inputs must be ON so the output is ON
OR: either input can be ON so the output is ON
XOR: one or the other input, but not both
NOT: reverses the input. ON makes output OFF, OFF makes output ON

etc.

4. ALSO ....

A bit is one binary digit, either ON (1) or OFF (0)

A byte is 8 binary digits.

You see this number all the time: 255 for example, when you look at IP sub addresses. 255.255.255.0

That number is special because it's a byte with all 1's: 1111 1111 ... in hex, it is FF, in decimal it is 255

The computer uses that to "mask" other bytes. Using an AND logic, it can let some numbers pass through and mask other numbers.

Another number you'll see is decimal 32767. That is: 1111 1111 1111 1111 .... 16 bits, all ones. Or in Hex, it is: FFFF

5. I kind of understand that, I just don't understand how two transistors can make that detirmination

6. Have you looked at diodes?

They pass DC electrons in one direction but not the other.
Just like a check valve on a water line.

This explains a diode:
https://en.wikibooks.org/wiki/Semico..._and_Operation

A transistor is the same thing, but it has an extra (third) wire that controls the ON and OFF.
See this ... just like a diode, but they figured out you can control the flow by manipulating the middle of it.
https://en.wikibooks.org/wiki/Semico...ion_Transistor

Having the ability to switch things on and off by using the output of one transistor to switch another transistor, and so on and so on .... now you can build them to count in binary up or down.

See the "flip flop" ... the basic building block of binary counting:
https://en.wikipedia.org/wiki/Flip-flop_(electronics)

Millions of transistors and diodes constructed (grown on silicon) within an integrated circuit are what control computer logic.

7. Originally Posted by busso
I kind of understand that, I just don't understand how two transistors can make that detirmination
It's been a while, but IIRC, in the case of an AND gate, a voltage at the base one allows current to flow to the base of the second. If there's a voltage at the collector of the second, it flows through, and you have your AND. Reconfigure as necessary for the various gates, or add more transistors if necessary.

Draw it out, and it'll make sense.

8. @busso is the most curious person ever. Always wanting to know how something works. I imagine he took apart his mom's appliances to see how they work

9. I am curious, so curious I'm going to college next year to study computer science thanks for the replies guys I'll look over them when I have more time