AND, OR, NOT
The three decisions every chip makes

Key ideas
- AND: output 1 only if ALL inputs are 1
- Like two switches in series
- Y = A · B
- OR: output 1 if ANY input is 1
- Like two switches side by side
- Y = A + B
- NOT (inverter): one input, flips it
- 1 becomes 0, 0 becomes 1
- Y = A' (A bar)
Worked example
- Let's combine them. Y equals A, AND not B. Take A equals one, and B equals zero. Not B is not zero, which is one. So one AND one gives one.
The answer is in Lesson 7, coming soon.
Full lesson text
Read everything said in the video
Where you have seen itFirst, last lesson's question. Binary zero one one zero, in Gray code. Copy the first bit, then XOR the neighbours. The answer is zero one zero one.
Where you have seen itA car starts only if the key is turned, and your foot is on the brake. A staircase light comes on if either switch is flipped. And a fridge light comes on when the door is not closed. Every chip makes these three decisions, billions of times a second.
The ideaThe AND gate. Think of two switches in a row. The light turns on only if A and B are both on. Output one, only when every input is one.
The ideaHere's the AND symbol. A flat back, and a round front. Its truth table has a single one, in the last row. We write it as Y equals A dot B.
The ideaThe OR gate. Now put the switches side by side. Turn on either one, or both, and the light comes on. It stays off only when every input is zero.
The ideaThe OR symbol has a curved back, and a pointed front. Three ones in its truth table. We write Y equals A plus B, where plus means OR, not addition.
The ideaThe NOT gate, also called an inverter, has just one input, and it flips it. One becomes zero, and zero becomes one. Its symbol is a triangle with a small bubble. We write Y equals A bar, or A dash.
Worked exampleLet's combine them. Y equals A, AND not B. Take A equals one, and B equals zero. Not B is not zero, which is one. So one AND one gives one.
Common mistakeA common mistake is thinking OR means one or the other, but not both. In logic, one OR one is one. The not both gate is XOR, and it's coming in a later lesson.
Memory trickHere's the memory trick. Series means AND. Parallel means OR. And a bubble always means NOT.
RecapLet's recap. AND gives one only if all inputs are one. OR gives one if any input is one. NOT flips its input. And real chips combine them, to make every decision.
RecapQuick question. What is A, OR not A? Try both values of A. The answer is in the next lesson.
Ready to test yourself? Practise real digital electronics interview questions, with model answers.
Practice questions →← All 33 lessons of the Digital Electronics course
Last updated