Digital Signals and the Basic Gates
Open the lesson
Logic gates from the start: digital signals with two levels, truth tables and Boolean expressions, why n inputs give 2 to the power n rows, the OR, AND and NOT gates, why 1 + 1 = 1 in Boolean algebra, the series and parallel switch models, the held-input trick, and two JEE-style solved problems on bit-by-bit inputs and Boolean expressions.
Chapters
- 0:00Introduction
- 0:24Digital signals and logic gates
- 1:48The three basic gates: OR, AND, NOT
- 3:35Switch models: series and parallel
- 4:17Topper's trick: one input held fixed
- 5:02Example 1: 1100 and 1010 bit by bit through AND and OR
- 6:04Example 2: Boolean expressions with A = 1, B = 0, C = 1
- 7:35Quick revision: OR, AND, NOT, 1 + 1 = 1 and switch models
Transcript
0:00Introduction
Hello everyone! Let us start with a strange line. One plus one equals one. Is that a mistake? In your maths class, yes, it would be. But with logic gates, where the plus sign means OR, one plus one really is one, and by the end of this video, you will see exactly why. Logic gates come up often in JEE, so let's begin.
0:24Digital signals and logic gates
So, first, what is a digital signal? It has only two levels, written zero and one, with nothing in between, okay? Zero is the low level, about zero volts, and one is the high level, about five volts. The capital V after each number stands for volts. Right? Now, a logic gate is a circuit whose output level is fixed by a definite rule from its input levels. In the figure, each gate has its inputs on the left, capital A and capital B, or just A for the last gate, and one output, capital Y, on the right. Today we need OR, AND and NOT; the third and fourth gates, NAND and NOR, we will meet later. Clear? And how do we write the rule? There are two ways. One is a truth table, which lists the output for every combination of inputs, like the small tables in the figure. The other is a Boolean expression, the short formula above each table, okay? Each input can be zero or one. So with two inputs, how many input combinations are there? Yes, there are four of them: zero zero, zero one, one zero, and one one. In general, call the number of inputs n; then there are two to the power n combinations. So three inputs give two to the power three, which is eight rows. With me?
1:48The three basic gates: OR, AND, NOT
First, the OR gate, on the far left, with the curved back. Its expression is Y equals A plus B, and careful, this plus sign is read as OR, okay? The output is one if at least one input is one. So, when is the output of an OR gate zero? Yes, exactly, only when all the inputs are zero. Look at the OR table. Zero and zero give zero, and every other row gives one. Right? Next, the AND gate, with the flat back and the round front. Its expression is Y equals A dot B, and the small dot is read as AND, okay? The output is one only if all the inputs are one. Zero zero, zero one and one zero all give zero. Just the last row, one and one, gives one. Got it? The third basic gate is NOT, the inverter, the triangle with a small circle at its tip, on the far right. It has a single input, and its expression is Y equals A bar, where the bar drawn over the A means NOT. The output is the opposite of the input, so zero becomes one, and one becomes zero. Clear? Now, back to our puzzle. An OR gate gets one on both inputs. Ordinary addition says one plus one is two, right? But can a digital output ever be two? No, it cannot, because there are only two levels. At least one input is one, so the OR output is one. That is why one plus one equals one here: the plus means OR and the dot means AND, not ordinary addition and multiplication. That solves our puzzle, and it is a common trap. Okay?
3:35Switch models: series and parallel
Now, a lovely way to remember these. Picture a battery, a lamp and two switches, where a closed switch stands for one, and a glowing lamp stands for one, clear? Put the two switches in series with the lamp, one after the other. When does the lamp glow? Yes, exactly, only when both switches are closed, since one open switch breaks the path. So the output is one only when both inputs are one, and that is AND. Right? Now put them in parallel, side by side. Close either switch, and the current finds a path, so the lamp glows. It stays off only when both are open, and that is OR. With me?
4:17Topper's trick: one input held fixed
Now a trick that saves time in the exam. Suppose one input of an AND gate is held at one. How is the output related to the other input? The output simply equals A, the other input, because A dot one equals A, okay? But hold that input at zero, and the output is always zero, because A dot zero is zero. Clear? For OR, it is the other way round. Hold one input at zero, and the output equals A, since A plus zero is A, right? Hold it at one, and the output is always one, since A plus one is one. And through two NOT gates in a row, the double bar over A gives back A itself, so the output is the same as the input. Got it?
5:02Example 1: 1100 and 1010 bit by bit through AND and OR
Alright, here is Example one. Two four-bit numbers, A equals one one zero zero, and B equals one zero one zero, go bit by bit into an AND gate, and then into an OR gate. Find the two outputs. Pause the video and try it first. Done? Okay, let's check. Bit by bit means first bit with first bit, and so on. For AND, one and one give one, and the other three pairs give zero. The arrow means this gives, so the AND output is one zero zero zero. Right? Now the OR gate. The first bits are one and one. So what does the OR gate give for them? It gives one, of course, and not two, because one plus one is one here. Then one and zero give one, zero and one give one, and zero and zero give zero. So the OR output is one one one zero. Got it?
6:04Example 2: Boolean expressions with A = 1, B = 0, C = 1
Now Example two, a step harder, because all three gates work together. Take A equals one, B equals zero, and C equals one. The first expression is the bracket A plus B, dot C, and the second is A dot B, plus C, okay? The third is A bar dot C, and the fourth has a long bar over the whole of A plus B, then plus C, right? Pause the video and try it first. Done? Okay, let's check. In the first one, the bracket comes first, so A plus B is one plus zero, which is one. Then one dot C, that is one dot one, gives one. In the second one, A dot B is one dot zero, which is zero, because AND needs both inputs to be one. Then zero plus C, that is zero plus one, gives one. Right? Now the third one, A bar dot C, okay? Since A is one, what is A bar? Yes, A bar is zero, because NOT flips the input. So zero dot one gives zero. Clear? The last one needs care, because the long bar covers the whole of A plus B, so do the inside first. Inside, A plus B is one plus zero, which is one, and the bar flips it to zero. Then zero plus C, that is zero plus one, gives one. So the four answers are one, one, zero and one. See how neatly the rules work?
7:35Quick revision: OR, AND, NOT, 1 + 1 = 1 and switch models
So, quick revision. Digital signals have two levels, zero and one, and n, the number of inputs, gives two to the power n rows. OR is Y equals A plus B, AND is Y equals A dot B, and NOT is Y equals A bar. Here, one plus one is one, and switches in series act as AND, in parallel as OR. Now go and try the practice problems on this page. All the best!
More videos in Unit 19 · Electronic Devices
- Energy Bands in Solids
- Intrinsic Semiconductors
- Doping: n-type and p-type
- Mobility and Conductivity
- IIT-JEE Questions: Semiconductors
- AIEEE and Earlier JEE Main Questions: Semiconductors
- Biasing and the Characteristic
- Circuits with Ideal Diodes
- Circuits with Real Diodes
- Diodes with Varying Inputs
- IIT-JEE Questions: Junction Diode
- AIEEE and Earlier JEE Main Questions: Junction Diode
- The Half-Wave Rectifier
- Full-Wave Rectifiers
- Filters
- Past JEE Questions: Rectifiers
- The Zener Diode as a Voltage Regulator
- The Light-Emitting Diode
- The Photodiode
- The Solar Cell
- Earlier JEE Main Questions: Special Diodes
- NAND and NOR: the Universal Gates
- Boolean Algebra and De Morgan's Theorems
- Combinations of Gates
- Gates from Diodes and Switches
- AIEEE and Earlier JEE Main Questions: Logic Gates
- Overview
- Set 1
- Set 2