Takes in one or more binary inputs and results in 1 binary output. The result does not “float”; as discussed here the output must either be (high) or ground (low) to represent true and false.

They are built by transistors

Gates that take in more than 1 input

The prefixes for these names are intuitive:

  • X Exclusive (used only with XOR)
  • N Not (the inverse of)

AND gate

If the inputs are all true, then the output is true.

  • if either var is 0, will return 0.
  • If both var are 1, will return 1

The truth table is as follows:

ABResult (Y)
000
010
100
111

OR gates

If any variable is 1, will return 1. If both variables are 0, will return 0.

ABResult (Y)
000
011
101
111

XOR gates

”Exclusive or”. “Only if one is true”

  • if both vars are 0 or 1, then the result is 0.
  • Alternatively:
    • Returns a high value if inputs are different
    • or
    • Returns a high value when the number of high inputs is odd
  • if 1 var is 0 and the other is 1, then the result is 1.
  • Basically this is like the “English” version of “OR”
    • If A = 1 and B = 1, you don’t say A or B are true in English. You say that A and B is true because that’s a stronger, clearer statement.
    • This is reflected in XOR gates, who instead of letting Y = 1 when A = B = 1, it makes Y = 0 instead, and it’s your job to use an AND gate, for example, to show A and B are true.
ABResult (Y)
000
011
101
110

NAND gates

NOT AND gate. The opposite of an AND gate.

Refer to Inversion Bubble for more explanation on the little bubble at the end of the gate right before the Y output.

ABResult (Y)
001
011
101
110

NOR gates

NOT or gate

ABResult (Y)
001
010
100
110

Gates that take in 1 input

Buffer

Takes something, returns the same thing Becomes useful later

AResult (Y)
00
11

Inverter

Takes something, returns the opposite

AResult (Y)
01
10