The Science of Everything Podcast - Episode 92: How Computers Work Part II - Silicon and Transistors

Episode Date: January 9, 2018

In this second episode in the series, I explain binary digital coding to motivate a discussion of the operation of transistors. Beginning with an examination of the properties of semiconductors and wh...y they are useful for constructing transistors, I then examine how MOSFET transistors are constructed by combining pMOS and nMOS semiconductors.

Transcript
Discussion (0)
Starting point is 00:00:33 You're listening to The Science of Everything podcast, episode 92. How Computers Work Part 2. Silicon and Transistors. I'm your host, James Fodor. So, in this episode, we're going to be talking about the two lowest levels of the computer levels hierarchy that I mentioned in the previous episode. We're going to be looking at the level of individual atoms and electrons in silicon semiconductors and why semiconductors are used and how the properties of semiconductors arise. from the underlying quantum mechanics of those materials. And we'll also be talking about how we use silicon to produce transistors
Starting point is 00:01:12 that are in turn used to produce logic gates that are used in computers, but that we'll get to in the next episode. Recommended pre-listening for this episode is obviously the previous episode, Episode 91, How Computers Work. Strongly recommend you listen to all of these in sequence, otherwise they may not make sense. Also, I recommend you listen to one of the previous episodes on quantum mechanics This could be episodes 83 and 84, advanced quantum mechanics parts 1 and 2,
Starting point is 00:01:39 but episode 14 principles of quantum mechanics may be sufficient as well. That will just give you a little bit of background that would be useful for understanding some of those stuff that I talk about regarding semiconductors. So, before we jump into that, let's make us start talking about how modern computers use binary coding to represent information. And once we talk about that, it will become clear as to why we need semiconductors and transistors. So, as I mentioned in the previous episode, modern digital computers represent not just numbers, but actually everything, all information using binary sequences of zeros and ones. Binary just means two, so there's either it's either a zero or it's a one. You can't have a two or a three. That doesn't make sense from a computer's perspective. These zeros and ones are not numbers. It's not the natural number one, for example, that we're talking about. These are symbols, the symbol zero and the symbol one. You can use zeros and ones in the numbers. a binary number system to represent any number that you like, including two, three, and
Starting point is 00:02:38 50 and whatever else. You just have to put them in the right order. So just like in the decimal number system that you'll be familiar with, the value of a number that you write down is determined not only by the value or the magnitude of the individual symbols that make it up, but also by their position relative to each other. So if I write down 1-222, or the number 122, I know that the one that I've written down doesn't actually mean the number one. It means the number one times 100 because it's in the third position from the left. The position of the number or the digit also indicates its value, not just what type of symbol it is. So 122 actually means 100 plus 20 plus 2, or 122. Now that's all natural and intuitive to us because we're used to decimal numbers.
Starting point is 00:03:25 Now the binary number system works in exactly the same way, except instead of using digits that go up to 10, we just use 0 and 1. So if I write down just a 0 by itself in binary, that just means 0, same way as it does in decimal. That's easy. Likewise, 1, that means the same thing. How do I write 2 in binary? Obviously, I can't write down the symbol 2 because there isn't 1. Instead, I have to write down 1.1. That would look like 11 in decimal.
Starting point is 00:03:52 But of course, it isn't decimal. So if I write down 1-1 in decimal, that means 10 plus 1 or 11. But in binary, it doesn't mean that. It means 2 plus 1 or 3. Now, the reason the 1, the second one, the 1 on the left-hand side, the reason that means 2 is because each successive position, you have to multiply by 2 to the power of that position. So the first digit is just 2 to the power of 0, which is 1.
Starting point is 00:04:23 So it's just itself. 1 times 1 is 1, 0 times 1 is 0. So you don't have to do anything for that position. That's the same as indecimal. The next position along is itself multiplied by 2 to the power of 1, which is 2. So 0 times 2 is just 0, so a 0 there is still a 0. But a 1 there, 1 times 2 is 2. So if I write down 1-1, that actually means 2 plus 1, which is 3.
Starting point is 00:04:51 So to give an example of how this works, suppose that I want to write the number 43 in binary. Obviously to write 43 in decimal I write a 4, which actually represents 40, and then 3, which represents 3. So 40 plus 3 is 43. Easy. What about in binary? Well, it turns out the binary for 43, in the usual encoding, is 11011. Now, how does that work?
Starting point is 00:05:13 Well, the rightmost 1 is just itself 1. 2 to the power of 0 is 1. So 1 times 1, that's just 1. That's easy. What about the next 1 along? Well, that one represents 2 to the power of 1, which is 2. So those final 2-1-1s, that actually is 2 plus 1, which is 3. The next digit along represents how many 4s we have, 2 the power of 2.
Starting point is 00:05:36 Now we have 0 of those. The next one along again is 2 to the power of 3, which are 8s. We've got 1-8. Remember I said it was 1-0-1-1-1. So for the left-most 2 digits, we've got a 1-0, so 2 to the 4, that's 16. we don't have any of those. Two to the five, that's 32. We've got one of those. So 1-0-1-1-1 in binary means 1-32, no 16s, 1-8, no-4s, 1-2 and 1-1. If you add all of those up, a 32, an 8, a 2 and a 1, that's 43. So don't worry if that's a little bit confusing. It's much easier if you can actually see it.
Starting point is 00:06:18 The purpose here is not to make you sort of fluent in binary. It's just a little bit. to give you the sense of how we're able to represent numbers using just zeros and just ones, which is very important for understanding why transistors are so useful. The basic idea then is that in order to represent numbers in a computer, we're going to use zeros and ones, and we're going to represent those in an electronic computer as voltages. So the magnitude of the voltage indicates whether it's a zero or whether it's a one. Now one problem here is that in a real electronic circuit, voltages can vary all over the place. continuous. They can take on any value effectively that they like, depending on the
Starting point is 00:06:54 details of the circuit. And that's not going to help in storing a zero or a one. There's supposed to be only two possible states. Now, the way we get around that is to use what's called the digital abstraction. Actual voltages are continuous and noisy, but in the digital abstraction, we set lower and upper boundaries. We say that all of the voltages in between those lower and upper boundaries are invalid. Really, they shouldn't occur. The circuit should be designed so that really it either goes to the low value or the high value. But if we do happen to get an intermediate value, then that's just ignored. It's invalid.
Starting point is 00:07:24 It's a mistake. All voltages below the lower boundary are classified as a zero, and all those above are regarded as a one. So it doesn't matter the precise voltage that is in the device or that region of the circuit. All that matters is that whether it's below the lower threshold or above the higher threshold. If it's below the lower, between zero and the low threshold,
Starting point is 00:07:46 voltage threshold, it's counted as a logical zero, and if it's above the high voltage threshold, it's a one. This makes things a lot easier because you avoid all the noise and problems with measuring precise voltages and so on, so that all you have to tell is, is the voltage in this particular device below the low value, or is it above the high value? And those should be the only two possibilities if you've set up your circuit properly. If it's something else, then it's invalid. Now, obviously there are many other things, types of information that we might want to represent apart from positive integers. There are, for example, decimal numbers. Now, these can be represented by using
Starting point is 00:08:24 what's called floating point numbers. Essentially, you have a mantissa and an exponent. Basically, that's just like scientific notation. If I write 2.3 times 10 to the power of 3, that's the same as 2,400. It's just a different way of representing the number by moving the decimal place over and multiplying it by a certain number of zero, one followed by a certain number of zeros. Don't really worry about the details of that. I don't want to talk about the details of floating point numbers. Just understand that it's possible to represent decimal numbers using this system as well with just some slight modifications.
Starting point is 00:08:56 You represent the magnitude of the number separately from the decimal part of the number itself. Negative numbers can be represented in a variety of different formats. One simple way is just to have a sign bit. So if it's one, it's a negative number. If it's zero, it's a positive number, for example. In practice, most computers use what's called the two. 2's complement method. Essentially, this involves taking the positive value of whatever the binary representation, the positive value is, flipping each bit individually, so each 0 goes to 1 and each 1
Starting point is 00:09:27 goes to a 0, and then adding 1. And the result is the negative version of the number. That might sound a bit odd, but there are a number of advantages to using 2's complement binary numbers, including that arithmetic operations of addition and subtraction are identical to those in a regular positive number. So you don't have to change anything, or worry. about complexities like a negative zero, which emerges if you just use a sine bit. But anyway, don't worry about those details. Just understand that, relatively simply we can also incorporate negative numbers in the binary system. What about letters of the alphabet, though? How do we deal with that?
Starting point is 00:10:03 Well, we can represent characters and words by assigning numbers to each distinct character, using, for example, an encoding system called ASCII, which is one of the most common means of encoding the letters of the Latin alphabet and basic punctuation. So an ASCII encoding is a binary number consisting of seven binary digits, and so because there are seven, if you work it out, that that can encode 128 different numbers. In this case, however, they're not interpreted as the corresponding binary number, but they're interpreted as corresponding to whatever symbol they relate to in the ASCII table, which you can just look up online. So for example, under the ASCII formulas,
Starting point is 00:10:45 And to represent lowercase W, I use the binary sequence, 1-1-0-1-1-1. To represent the number 9 in ASCII, I use 111-001. In order to represent delete in the ASCII table, that's just 7-1s. So you can see all of the basic punctuation and numbers, and letters, including upper and lowercase, are incorporated in ASCII. If you want other symbols like Chinese characters, for example, you have to use other encoding systems that have more characters,
Starting point is 00:11:19 that is more bits in order to encode a larger number of possible characters. But all you have to do is have an instruction somewhere that tells the system what type of information this is, whether it's just binary numbers, or whether it's ASCII, or whether it's a machine code or something else. So you tell it how to interpret it, and then it can just use these built-in tables to keep track of what everything is. We can also store pictures by essentially just a sequence of numbers corresponding to the color and or intensity of each pixel in the array. So if it's 100 by 100 pixel image, for example, we'll need 10,000 numbers that represent each of the colors.
Starting point is 00:12:01 In fact, often we'll have three numbers, one for each of the primary colors that make up the image, saying how intense that color is. But essentially you can represent a picture just by a bunch of numbers in an array. Likewise, sound can be represented as a bunch of numbers indicating the pitch and volume or intensity of the sound at each point at each sequence in the audio clip. A video can be represented by a soundtrack synced to a sequence of images. So we can represent really any type of information we like, text, images, numbers, machine instructions, whatever, as sequences of zeros and ones,
Starting point is 00:12:39 appropriately interpreted by the computer. So therefore, in order to be able to represent data and also instructions, instructions themselves are in machine code, which consists of zeros and ones, I should have said, in order to represent data and instructions in a binary digital computer, we need to have some way in the hardware of representing sequences of zeros and ones, and also manipulating them relatively easily. So to do that, we need, first of all, a way of storing a single bit, either a zero or a one that takes up a small amount of space and energy.
Starting point is 00:13:09 The second thing we need is a way of easily changing this thing, whatever it is, from zero to a one or vice versa, so that we can move data around and execute programs. Obviously, if zero's always stayed zeros and ones always stayed ones, we wouldn't actually be able to do anything in our computer, so it wouldn't be very useful. So we need ways of storing bits and ways of easily changing them. This amounts to a requirement for a cheap, small, low-power switch that has two states on and off, and is able to flip between those relatively easily, but not. arbitrarily. So it'll only do it when we tell it to, it won't just flip by itself,
Starting point is 00:13:44 but it's fairly easy to get it to flip when we want it to. So small, simple, easy to operate switches is essentially what we need in order to get a binary computer to work in hardware. The reason that we're able to have digital computers now is because we've been able to solve these hardware problems. Originally it was solved by relays and vacuum tubes. They weren't that practical or that small or that reliable, but they were small, reliable and practical enough to be able to build the very first computers. These days we use transistors, which are much smaller and more reliable.
Starting point is 00:14:16 A transistor is just a tiny switch. It can be on or it can be off. When the switch is on, current is able to flow through that part of the circuit. When it's off, current is not able to flow through. Wires are small and easily made, so we can connect the transistors up using wires. But the issue is how to ensure that the switch is able to be easily turned on and off at will.
Starting point is 00:14:39 The trouble is if we built the switches out of conductors, like copper for example, or other metals, metals are such good conductors of electricity that if we try to build our switches just out of metals without any other components, they would essentially always be on. Likewise, insulators are such poor conductors of electricity, like many plastics, for example, that if we try to build our switches out of that, they would basically always be off. They would always not conduct current, and that wouldn't really work either. What we need is a material that conduct electricity moderately well, and also that we can sort of tip in one direction or another so that it conducts electricity a little bit better or a little bit worse so that we can push it into the on state or the off state. And furthermore, we have to be able to do that relatively easily so that it doesn't require lots of power or time or energy to implement, because obviously that would make the device too large and the machine impractical.
Starting point is 00:15:32 Essentially, the material that we need is a semiconductor. Semiconductors are exactly this material that we need. They have an electrical, conductivity that's in between that of conductors like copper and gold and insulators like glass and a lot of plastics. Not only that, but there are lots of ways in which they can be modified relatively easily to change their conductivity, both during construction phase and also during actual operation. Thus, we can use semiconductors to build devices that act like switches. And thus, this leads us to the next part of this episode where I talk about semiconductors and what gives them their unique properties and why they're so useful for building transistors. So to understand why semiconductors have the properties they do and why they're so useful for building transistors, we need to
Starting point is 00:16:16 understand a little bit about the solid state properties of materials. So solid state materials are just materials that are not liquids or gases, and we're interested in them because they have crystal lattice structures, so that is a bunch of atoms arranged in a regular pattern in three-dimensional space. There are different types of crystal lattice structures depending on exactly how the atoms are placed relative to each other. Cubic body-centered, cubic-centered, hexagon or simple cubic and so on. We don't need to worry too much about the details of that. Just know that such structures exist and different materials will naturally exist in different types of lattices. So at each of the lattice points is the atomic nucleus and most of the inner
Starting point is 00:17:04 electrons. In some of these lattices, the valent electrons or the electrons in the outermost shells can become delocalized from individual atoms and sort of exist spread throughout the three-dimensional lattice. Now, classically, in like Newtonian physics, we think of electrons as little billiard balls that have a definite location and momentum at any one time. Quantum mechanically, however, this is not correct. Electrons actually exist as probability distributions smear out over a particular volume and also having a range of possible momentum. In the confined space of a three-dimensional crystal lattice, electrons will exist, or at least the valence electrons, the ones that are delocalized, exist as standing wave patterns.
Starting point is 00:17:49 Standing waves, as we talked about in some previous episodes, is essentially just a wave of peaks and troughs that exists in three dimensions. You can probably imagine a two-dimensional waves as a surface as ripples over the surface of a pond, for example, or what just extrapolate that to three dimensions, which is kind of hard to visualize, but that's how an electron exists as a standing wave pattern within the confined space, a three-dimensional space of a crystal lattice. Now, because these delocalized electrons are spread so much over much of the volume of the crystal lattice, they have fairly well-defined momentum. Remember, according to Heisenberg's uncertainty principle, the more precisely defined is the position,
Starting point is 00:18:27 the less precisely defined is the momentum and vice versa. So there's sort of a trade-off. So these delocalized valet electrons that are spread throughout the lattice have a position that's very poorly defined because they exist as a standing wave pattern over the whole lattice or large portions of it, but quite well-defined momentum. And we also know from Plank that there is a regular relationship between the momentum of a particle like an electron and its energy. So you can in fact draw a fairly simple quadratic relationship like a parabola between the wave number, K, which is effectively the momentum of a given valence electron, and its total energy, E, on the vertical axis.
Starting point is 00:19:12 So higher the wave number or the higher the momentum, the higher the energy, with an increasing upward sloped quadratic parabola relationship. That's what the graph looks like. So that just means the higher the wavelength one of these electrons has, or the more wiggly is its wave function, to put it in other words, the higher energy that it has. So far so good. But now suppose that we add some additional structure. So far we've been ignoring
Starting point is 00:19:41 the nuclei that have been left behind and the inner electrons that have been left behind by the valent electrons that have spread throughout the lattice. We've just been imagining that it's kind of empty. But that's obviously not true. There are these nuclei and inner core electrons that are left behind. And these affect the energy potential that the electron exists in. The interaction will be attractive because the nuclei that are left behind are positively charged because they've lost an electron, right? So the electrons will be attracted to those positive nuclei, meaning that they'll
Starting point is 00:20:12 have lower potential energy when they're closer to those nuclear and higher potential energy when they're further away. And this potential energy pattern exists as a regular structure over the lattice, obviously, because that's the whole point of a lattice, there's a regular arrangement of the atoms. So you could imagine plotting a sort of sinusoidal. shape, or in three dimensions, the sinusoidal shape of relatively lower energy potential energy wells when the electron wave function was nearer to the nuclei at the lattice points, and higher potential energy peaks in the potential energy of the wave function when it's further away from these residual nuclei in the lattice points. Now, for many wavelengths, remember you can have these
Starting point is 00:20:56 delocalized electrons in all sorts of wavelengths. For many of these wavelengths, this underlying regularity of the potential patterns owing to the residual nuclei, it doesn't make much difference because the wavelength of the electron is different. It's offset to that of the wavelength of the lattice, of the nuclei in the lattice. So that means that for these wavelengths, for the offset ones, the out-of-sync ones, in some regions of the electron's wave function, you'll find the the peaks of the electron density that is regions of higher probability
Starting point is 00:21:35 finding the electron to that. You'll find those nearer to the nucleus to the nuclei, you know to those lattice points but in other regions they'll be further away and these sort of offset each other. So the long and the short of it is that for these out-of-sync electron wavelengths, the
Starting point is 00:21:50 underlying regularity of the potential caused by the nuclei at the lattice points doesn't really affect the overall energy level of the electron. Because in some regions the nuclei are increasing the energy of the electron in other regions they're reducing it so overall they kind of balance out and there's no effect so for most electrons you can just ignore these regular lattice points occupied by the nuclei because sometimes they add to the energy of electrons sometimes they reduce it and they reduce it and overall considered over the lattice as a
Starting point is 00:22:22 whole it's basically unaffected so our nice parambola relationship between the frequency of the delocalized valence electrons and their energy is preserved. However, that is not the case for certain frequencies. For certain frequencies, which are essentially multiples of the underlying frequency or underlying spatial frequency of the latter, at which the nuclei exist, you will have a systematic relationship between the phases of the electrons' wave function and the peaks and troughs of the potential energy owing to the position of the nuclei.
Starting point is 00:23:01 So in other words, when the frequency of the electron is a whole number multiple of the frequency, or when it's a harmonic of the frequency of the lattice points, you'll get a situation in which the peaks of electron density, the density of the electron wave function, are systematically located either all nearer to the nuclei or all further away. And when that happens, you'll either get an increase or, a systematic increase or a systematic decrease in the energy of that electron as a whole. But as I said, it only happens to particular wavelengths, to those particular wavelengths
Starting point is 00:23:35 corresponding to essentially harmonics of the underlying periodicity of the lattice structure. So where this occurs, of course, depends on the exact lattice structure of the material in question. So it's not the same for all different materials. So in the cases where electron wave function peaks align close to the nuclei lattice points, the electrons are all systematically relatively closer to the nuclei, and thus have lower average energy, because remember, there's an attractive interaction between the positively charged nuclei and the valence electron.
Starting point is 00:24:08 So if the electrons are all systematically closer to the nucleus, those particular electrons will have lower energies. Whereas in the reverse case, when the peaks of the electron wave function are systematically in between the lattice points, and therefore the electrons are more often further away from the lattice points, you will have an increase in energy because there's a higher potential for electrons when they're further away from the nucleus. So the upshot of all this is that our nice perambola relationship between frequency and energy is now disrupted.
Starting point is 00:24:41 It's still mostly intact for most frequencies, but in those particular frequencies that correspond to the harmonics of the underlying spatial periodicity of the lattice, we will get what are called band gaps, regions in which there is no electrons. to be found that have those particular energies. Effectively, you can imagine, if you consider our parabola shape, the band gaps occur as a result of sort of like peeling the skin of a banana a little bit off away from the parabola. So there's a sort of like curved down or a curve outwards from the regular parabola shape, which leaves a gap in between.
Starting point is 00:25:15 Now, the gap is not a gap in the frequency. There's still electrons at every frequency level. It's just that there are now certain energy levels for which there are no corresponding wavelengths, essentially because the electrons that would have had those energy levels now have slightly higher or slightly lower energy levels thanks to the interaction effect with the lattice that I just explained. So that is what gives rise to these bandgaps,
Starting point is 00:25:39 energy regions in which you can't find or won't find any electrons. So the existence of these bandgaps is crucial. In fact, bandgaps occur in all materials, or at least all materials that form regular crystal lattices, or solid-state materials, but they lead to different properties in different materials, but their existence is critical for the properties of semiconductors that lead to them being useful in transistors,
Starting point is 00:26:02 and now I'll explain why these bandgaps are so important. So so far, all we've been talking about are electron energy levels without necessarily implying that there are actually electrons existing in those energy levels. Another way of thinking about this is, if you recall the different shells or, energy levels that electrons can exist in around a given atom. There are a set number of these energy levels, but sometimes through ionization or some other mechanism, an electron won't actually be in a given energy level or given shell at a particular time. So what we've been talking about
Starting point is 00:26:39 in terms of the parabola relationship between wavelength and energy and the bandgaps and everything, all of that is in terms of energy levels. A given material may or may not have electrons actually existing at all of those possible energy levels. Whether or not there are actual electrons in all of the levels depends on how many electrons are available to the particular lattice. Materials with more valence electrons will fill up more of those energy levels. Again, filling up always occurs from low energy levels to higher energy levels, so low levels fill up first and then you move to higher and higher levels.
Starting point is 00:27:12 That's obviously in accordance with usual physics because systems prefer to exist at lower energy states. So more valence electrons, you fill up more energy levels. fewer valence electrons, you fill up fewer of those energy levels. The Fermi level of a given material marks the energy level that has a 50% chance of having an electron in it. If all of our lattices existed at 0 degrees Kelvin, that is at absolute zero, what we would see is all of the electron energy levels from the lowest up, filled up completely up to the Fermi level, and then above that there will be no electrons. All of the energy levels would be empty. So there'd be a hard
Starting point is 00:27:50 cut off between filled and empty electron levels. That only applies, however, to zero degrees Kelvin. And of course, we never actually are at zero degrees Kelvin. At realistic temperatures, what we see is a spreading. So some of the, owing to thermal energy, which is imparted to the electrons, some electrons are excited a little bit above where they would otherwise be. That is into higher energy levels. And therefore, some energy levels just below the Fermi level have some vacancies in them caused by electrons which are excited just above the Fermi level, and in turn, some energy levels just above the Fermi level have some occupancy of these excited electrons. So there's a sort of smearing. Instead of this hard cutoff, you've got a sort of a gradual decrease.
Starting point is 00:28:29 So the lowest energy levels will still be occupied, but as you go higher up, there'll be some proportion of them that are occupied and some that aren't, or they'll be occupied some proportion of the time. And then as you proceed higher and higher up, the energy levels are occupied less and less often until as you get to really high energy levels, they're essentially never occupied. So the Fermi level is the energy level that has a 50% chance of being occupied by an electron. And as I've said, it obviously varies with temperature.
Starting point is 00:28:56 It increases with higher temperatures because the electrons tend to be excited to higher and higher energy levels. Now, if there's one point that you take away from the semiconductor section, it is this. Whether a material behaves as a metal, a semiconductor or an insulator depends mostly upon the relative location of the Fermi level compared to the band gaps that I mentioned before.
Starting point is 00:29:19 So it's the location of the Fermi level compared to the band gaps that determines how well a given material conducts electricity. For a metal, the Fermi level is well away from the band gaps. In fact, it's smack bang in the middle of a region that's highly populated with electrons. Remember, bandgaps are regions that don't have electrons in them because there actually are no energy levels. for the electrons to sit in. In a conductor, or metals being one example of a conductor, the Fermi level is right in the middle of a whole bunch of bands. Bands are just regions that the electrons can exist, energy levels essentially. Because there are lots of energy levels there around the Fermi level, that means that you have lots of available energy levels just above
Starting point is 00:30:01 and just below the Fermi level. Remember, the Fermi level is that region that has a 50% chance of having an electron in it. So around the Fermi level is where the conduction is going to occur. In order to have electrons conducting electricity, what essentially you need is some free available energy spaces. So the electron gets excited a little bit and it moves through the material and maybe it gets de-excited or goes down to a lower energy level and another electron gets excited. You need those available energy levels that are partly occupied but not fully occupied in order to be able to carry a current. And conductors have that because their Fermi level sits just nicely at a level where you have low. lots of available energy levels for the electron. So the place where the electrons are available
Starting point is 00:30:46 is also where there are spaces for them to move about, essentially. It's one way of thinking about it. So they conduct electricity very well. There's plenty of places for the Fermi-level electrons to move about. Insulators are the exact opposite. In an insulator, the Fermi-level sits exactly in the middle, or around the middle, of a band gap. Now, what that means is that in an insulator,
Starting point is 00:31:08 all of the electrons are stacked up in low energy levels that are well below the band gap. In order to conduct electricity, what you'd have to have is an electron excited all the way over the band gap, past the Fermi level, up to higher electron bands that exist at much higher energy levels. But because there's such a big gap between where the electrons actually are and where they would need to be in those higher energy levels in order to conduct electricity, it's very unlikely, very unusual for that to happen, and so you don't get much conduction of current in insulators. Of course, if the electrons in an insulator could just jump a little bit,
Starting point is 00:31:47 have a small jump in energy, then they would be out of conduct electricity because it's much easy to get the small jumps than it is to get big jumps in energy, big increases in energy. The trouble is an insulator, of course, is that has that big bandgap right around the thermia level. A bandgap means there are no available electron energy levels in this region of energies.
Starting point is 00:32:03 If that corresponds to where the Fermi level is, then basically all of your electrons are bunched together at lower energy levels, then there's a big gap around the Fermi level, and then there are lots of available spots for electrons at higher energy levels. But there's no way or no easy way for electrons to get across that gap. If the gap's too wide, you're just not going to conduct electricity. Some insulators can become conductors at very high temperatures, essentially because electrons are given enough energy to jump across that gap. But that's the opposite of what we want. we want a material that's going to be able to become a conductor relatively easily, not having to heat it to extremely high temperatures.
Starting point is 00:32:38 So insulators aren't going to work for the transistors that we want, nor are metals, because metals always conduct electricity, because they've got so many of those free available electron spots for them to occupy available energy levels just around the Fermi level. Now, a semiconductor is in between a metal or a conductor and an insulator. A semiconductor has the Fermi level in the band gap, So essentially it's like an insulator in that respect. The big difference is that the band gap, the size of energy levels where there are no available,
Starting point is 00:33:11 where there are no available energy levels for an electron, is much smaller. It has a much smaller band gap than an insulator. An insulator has a big band gap, and a metal doesn't have one, or it doesn't have one that's near the Fermi level, at least. A semiconductor has a small band gap that exists around the Fermi level. And this means that semiconductors can conduct electricity, as long as they're not at zero Kelvin, but they don't conduct it too well. So in order to conduct electricity, you have to heat the semiconductor up,
Starting point is 00:33:37 and when it does, some of the electrons will move from the highest energy levels in the lower bands. They'll move through or jump through the band gap. Obviously, they can't move into the bandgap because there are no available energy levels that the electron can exist at there, owing to the periodicity of the lattice
Starting point is 00:33:55 that I talked about previously, that's why the bandgap exists. So there aren't any spots available there, but because the bandgap is small enough, the electrons are able to jump across it into the unoccupied energy regions just above the bandgap and therefore conduct electricity. So there's these vacant spots that the electrons can be excited to. Now these materials that have the bandgap in the Fermi level but a relatively small band gap, these are called intrinsic semiconductors. That just means that by themselves, without doing anything to them,
Starting point is 00:34:23 naturally they are a semiconductor. They'll conduct electricity to some degree but not as well as a conductor because they don't have as many readily available slots that the electrons can jump into and move around to conduct electricity. Now, you remember I said that one of the requirements for the material that we want to instantiate our digital binary codes, one of them was the ability to conduct electricity some of the time or to a moderate degree, so between that of a conductor and an insulator. Well, we know we've got that with intrinsic semiconductors, but the other thing that we need is the ability to control how well it conduct electricity
Starting point is 00:34:58 to be able to manipulate that to push it in the better or worse direction depending on whether we want it to hold a zero or a one. And the way we do that is essentially what's called doping of semiconductors. That means introducing small quantities of impurities or dopants into the base substance. Often the base substance is silicon because silicon is a semiconductor.
Starting point is 00:35:20 That's why it's so often used in computer design. Now there are two main types of dopants, N-type and P-type. The types of dopants get their name from the type of charges that they provide to the semiconductor, or that they add above and beyond the charges that exist to carry current in the intrinsic semiconductor. So N-type dopants add negative charges, hence the N, or in other words, they add electrons. P-type dopants add positive charges, or in other words, they add holes. Now, you might wonder what a hole is.
Starting point is 00:35:50 The hole is just the absence of an electron. It turns out that mathematically, it doesn't actually matter if you treat electrons as negatively charged charge carriers in a lattice, or if you treat holes, that is the absence of an electron, as positively charged charged carriers, it actually comes out to be the same thing. So, rather than thinking about the absence of an electron, we just talk about a hole. And P-type dopants introduce holes, or in other words, they soak up extra electrons, they soak up extra of the valence electrons, so that there are a very important. so that there are fewer valis electrons available, or in other words, they create holes, positively charged absences of electrons, that can move about the lattice.
Starting point is 00:36:31 Holes moving about the lattice, and therefore conducting electricity, corresponds to electrons jumping into that hole and then making a new hole where they've moved from. So that might be a strange way to think about it, but again, it doesn't really matter whether you talk about electrons or holes, because they're doing the same thing.
Starting point is 00:36:47 They're carrying charge through the lattice. P-type semiconductor, then, is just an intrinsic semiconductor, so think of it as silicon. That's an example. Geranium is another one, but silicon's the main one we're interested in. It's a lump of silicon, to which you add small quantities of a material that has only three valence electrons. Silicon has four. Because the material only has three valence electrons, in order to fit with the regular silicon bonding and fit in the rest of the lattice, it has to essentially steal one of the valence electrons away from the silicon, producing a hole, and that's where the positive charged
Starting point is 00:37:20 holes come from. So, P-type semiconductor, that means a P-doped semiconductor, so you've just added a material with three valence electrons to the base semiconductor. An N-type semiconductor is similar, except in this case you've added a material with five valence electrons, so that means that it's got an extra valence electron that it then donates to the latter, so there's an extra charge carrier there. In both cases, P-type and N-type semiconductors, they will conduct electricity better than the intrinsic semiconductor because you've added some extra charge that's able to carry current. Now there's one other very important phenomenon that we need to understand about semiconductors, especially dope semiconductors, before we can explain how transistors
Starting point is 00:38:01 work. And this is what happens when you put a C-type semiconductor right next to, right up against, an N-type semiconductor. Now notice that in an N-type semiconductor, we've got extravalence electrons, whereas in a P-type semiconductor, we've got a relative deficiency of valence electrons. We've still got the same amount of overall charge. Both substances as a whole are electrically neutral, but there are more free electrons in an N-type and fewer free electrons in a P-type, more free holes, if you want to think of it that way.
Starting point is 00:38:32 So when they're placed next to each other, what happens is that the valence electrons tend to diffuse from the N-type to the P-type semiconductor. Diffusion is a process that I would have discussed previously, But essentially it's a random process in which if you have more freely moving particles on one side of a semi-permeable membrane and fewer on the other side, just by chance over time you'll tend to get more moving over to the empty side than the reverse. This is why gas spreads out in a room, for example, by diffusion. The same thing happens here. Because there are more electrons on the N-side, the N-doped side and fewer on the P-side, the electrons tend to diffuse over to the P-side. And the same thing happens with the holes. to diffuse from the P to the N side.
Starting point is 00:39:15 But as this happens, you've got a flow of charge. A flow of charge leads to a charge build-up. So as the electrons are diffusing from the N to the P-side, they're living behind a positive charge, the positive charge nuclei, because the nuclei are fixed in positions. They're fixed in the lattice points. They can't move. Conversely, as the holes move from the P-side to the end-side,
Starting point is 00:39:35 they leave behind negative charges. They live behind negative charges, remember, because they're holes, so they're positively charged, and what remains is the negatively charged. So as these charges build up on each side of the boundary between the N-type and the P-type semiconductors, you actually have a different force coming into bear. That is, the N-type semiconductor, the end-doped region,
Starting point is 00:39:58 started by diffusing its electrons over to the P-type, but that led to a build-up of positive charge, obviously, because if you're flowing out electrons, you've got a positive charge left behind. That leads to electron drift back in the direction of the N-type semiconductor. So essentially the electrons diffuse over to the other side, but then they start to be pulled back by the positive charge and vice versa in the case of the P-type, the P-doped region. The holes diffuse out to the N-type, the N-type semiconductor, because there aren't many holes there. But then all of that positive charge leaving results in a negatively charged region being left behind, and that in turn attracts some of the holes back towards the P-type region.
Starting point is 00:40:38 So the end result of all of these forces is the equilibrium situation that occurs when these forces balance out between each other. So when the diffusion of electrons from the N region to the P region is offset by the drift of electrons back from the P region to the N region. Diffusion, remember, is caught by differences in concentration, whereas drift is caused by chart buildup, which in turn is caused by the diffusion as a result of differences in concentration. In equilibrium, there is balance of these drift and diffusion forces. And crucially for us, in equilibrium there also results in the existence of what's called a depletion region between the P and the N-doped areas. In the depletion region, there are no, or at least very low concentrations of charge carriers, either valence electrons or holes, the reason being because they've all annihilated each other.
Starting point is 00:41:37 I didn't say this before, but when a hole comes into contact, close contact with a valence electron, they annihilate. The electron goes into the hole and they cease to exist. The hole is no longer a hole because there's an electron there and the electron is no longer a valence electron because it's gone into the hole. So effectively they annihilate each other. And this is what occurs in the depletion region because you've got electrons and holes moving in opposite directions and therefore coming into contact with each other. One side of the depletion region, the part of the depletion region in the N-doped part of the semiconductor, is positively charged. The reason it's positively charged is because it's had relative depletion of the negatively charged electrons that have moved off to the P-doped region as a result of the diffusion gradient.
Starting point is 00:42:22 The other side of the depletion region is negatively charged because of the loss of holes that have moved over to the N-type region. But that's not so important. The crucial thing is that in the depletion, region, whether it's negatively charged on the one side or positively charged on the other side, there are no free charge carriers. And therefore, and this is critical, current cannot flow, or at least cannot very easily flow through the depletion region. So effectively it becomes an insulator, because all of the free charges have cancelled out and been used up. And so there are no free charges available to carry a current from the rest of the P-type region to the rest of the N-type region. The width of the depletion region depends.
Starting point is 00:43:02 on the nature of the material, so the underlying substrate, how much doping you've done on the P side, how much on the N side, and it can also be affected by when you apply an external voltage, because obviously applying an external voltage to either side, either the P region or the N region, will affect the relative electric potentials of holes and electrons on either side, and therefore will shift the equilibrium one way or the other, and therefore affect the width of the depletion region. Effectively, the width of the depletion region measures how strong the relative drift and diffusion forces are compared to each other. And you can shift that balance by applying an external voltage and also by changing around the degrees of doping and other things.
Starting point is 00:43:47 So now we're at the point where we have enough background to discuss how we use semiconductors to build simple transistors. So a transistor is constructed by taking advantage of what called the field effect. The field effect refers to the ability to change the electrical conductivity of a material via the application of an external electric field. So this is what I just mentioned, that if you apply an electric field or an electric potential to one side of the boundary between a P and an N-type semiconductor, that will alter the equilibrium disposition of the drift and diffusion forces and thus affect the width of the depletion. The width of the depletion region, in turn, affects the conductivity of a material. If the depletion region is narrow or preferably non-existent,
Starting point is 00:44:35 then charge will be able to flow from one side of it to the other. But if the depletion region is wide, charge won't be able to flow through. Because remember, the depletion region means that it's depleted of charge carriers. So if we can apply enough of an external potential to eliminate the depletion region, at least in part of the material, will be able to have a current flow through and thus the conductivity will be increased. By contrast, if we don't want current to flow through, we can apply a negative potential or a potential to the other side of the material, depending on how you want to look at it, and thereby increase the width of the depletion region and ensure that no current can flow. So it's this field effect modifying
Starting point is 00:45:17 the conductivity of a material by applying an electric potential that allows us to build a transistor out of semiconductors. Semiconductors are especially useful because although the field effect applies to many different materials, conductors very rapidly equilibrate to have the same potential throughout the substance. So that's not going to be very useful if we're trying to have a potential difference from one side to the other. Insulators by contrast would require enormously high applied voltages in order to get the switches to flip.
Starting point is 00:45:49 So those aren't really going to work either. We need switches that will stay to zero or a row. or one and won't just conduct away and fail to hold any signal, but at the same time, that aren't too difficult to flip from one to the other. So semiconductors have just the right balance of properties for the field effect to be useful here. Now, the main type of transistors that are used in electronic devices today are called MOSFETs. That's an acronym for metal oxide semiconductor field effect transistors. It's actually a very good name because it describes both the structure and the function of these transistors. So metal oxide semiconductor describes the structure of how they are
Starting point is 00:46:28 manufactured, at least traditionally. These days it's a bit more complicated than this, but conceptually it's still useful for us to think about it in these terms. At the base we have the semiconductor, which is the silicon substrate. That sits on the bottom. On top of that is placed or grown, using chemical means, some sort of insulator, often silicon dioxide. So silicon dioxide is an insulator as opposed to just silicon, which is a semiconductor. On top of that, insulator in turn, is placed a thin layer of metal or polycrystalline silicon, which is a conductor. It is deposited on top. So you've got metal, conductor, oxide, which is made of silicon dioxide, that's an insulator, and semiconductor, which is a silicon substrate. So it's like a three-layer
Starting point is 00:47:14 structure. And it operates using the field effect, which is why it's called field effect transistor. Now there are four main regions in the MOSFET. These regions are called the source, the drain, the gate, and the well. We're going to visualize this MOSFET from sort of the side on, not from the top view because it's harder to see what's happening. So from the side. So from this view, imagine the source being on the left, the drain being on the right, and the gate being in between. The well is just the region underneath the gate and between the source and the drain. So the structure here is that on the bottom, we have the silicon substrate. This gives structure to the whole thing.
Starting point is 00:47:57 Above that, we have two doped regions, one corresponding to the source and the other corresponding to the drain. The doped regions can either be N-type or P-type doped. We'll come back to that, but for the moment I'll just talk about them as N-type doped. So both the source and the drain are N-type-doped regions. In between them is the well, and that is a region of the opposite doping.
Starting point is 00:48:19 So in this case it would be P-doped. So it goes N-P-N, as the type of doping going from left to right, all of which just sits on the silicon substrate. Now, above the well is that insulator region, the silicon dioxide. And above that, in turn, is the gate, which is the conductor. Think of it as a metal, although, as I said, often it's not actually a metal. It's a polychristine silicon, but that's not so important. We'll just talk about it as a metal.
Starting point is 00:48:46 It's a conductor that would reach down to the well, except there's an insulator in the middle which prevents it from getting there. There are also conductors above the source and the drain, but in this case there's no insulators separating them from the end-doped regions and the metal that extends above them. So to recap, the structure of the MOSFET is, on the left we've got a wire at the source that sticks into an end-doped region. To the right of that we've got a P-doped region separating the two end-doped regions on either side and therefore on the right of the well we have the second end-doped region which corresponds to the drain there's also a wire sticking out of that
Starting point is 00:49:29 above the well which remember is the P-doped region in the middle we also have a third piece of metal sticking up out of that which is called the gate however the difference is that there's a strip of insulator in between the well and the gate, whereas in the case of the source and the drain, there's no insulators there. The insulators only above the well in the middle section.
Starting point is 00:49:51 So hopefully that's kind of clear. We've got, remember, three bits of conductor sticking out the top, the source on the left, the gate in the middle, and the drain on the right. Underneath each of those, respectively, is an end-doped region under the source, a P-doped region under the gate in the middle, and an endopridgen under the drain on the right-hand side.
Starting point is 00:50:15 The only extra thing that you have to remember is that wedged in between the gate, the conductor of the gate, and the well underneath it, is a strip of insulator, which does not exist for the source or for the drain. Okay, so what's the point of this setup? Well, the key thing to understand is that the field effect, remember, that's how we're going to adjust the conductivity of the material, is by applying an external voltage, using the field effect to change the conductivity.
Starting point is 00:50:43 That occurs through the gate. The gate, that sticking out conduct a bit, that is where we apply the external voltage, which affects the conductivity of the underlying material. And the region where the conductivity is affected is the well. So if you like that, the two really crucial parts where the action happens in a MOSFET is the gate and the well underneath it,
Starting point is 00:51:05 with, of course, the insulator in between. You need the insulator because otherwise the gate would be in direct electrical contact with the semiconductor region in the well underneath, and that would screw up the whole effect. You need to be able to apply a voltage externally to the well region without directly conducting any charge straight out of that. So that's why you need the insulator there. Basically, the idea is that this structure that I described the MOSFET is a transistor. Current will flow from the source to the jostal.
Starting point is 00:51:36 drain when the switch is on, it won't flow when the switch is off. To turn the switch on or off, we just change the voltage on the gate. And that changes the conductivity of the well region, thereby either turning on or off the switch and allowing current to flow or not to flow from the source to the drain. That's the basic idea. So it's a circuit waiting to happen. When the circuit's off, there's no way for the charge to flow from the source to the drain, and the switch is off. When it's on, there is a way for charge to, for charge. to flow and the switch is on and therefore we have a circuit. Now, let's explain a bit more detail how that works.
Starting point is 00:52:13 For this first example, let's focus on N-MOS. Now, that means that the source and the drain have N-doped semiconductors underneath them. So in other words, there are extra valence electrons added, extra atoms with five valence electrons in the radamos shells so that they donate an additional valence electron beyond what silicon normally has. so we have extra negative charges floating around ready to conduct electricity. The other thing to realize is that in an NMOS, the source terminal, the two ends are also called terminals because they form sort of the sides of a circuit
Starting point is 00:52:50 or a potential circuit. The source terminal is grounded. That means it's connected to a region of zero potential. The ground is one way to think about it. I mean, literally you can connect a wire to the ground is one way of doing that, but it's connected up to a region of zero potential. So the source has a zero electric potential. Now let's suppose that we apply zero potential to the gate,
Starting point is 00:53:12 so apply no potential to the gate or a very low potential. What happens? The answer is that in this setup, nothing happens. The switch is off. No current can flow from source to drain. And the reason for this is because, if you recall, the region of the semiconductor just underneath the source and also just underneath the drain,
Starting point is 00:53:32 these are both end-doped regions. But in between, in the same, in the well region that's underneath the gate in between the source and the drain, there's a pea-doped region. We know from what we just discussed previously that when you put an end-doped region right up next to a P-doped region, you'll get what's called a depletion region. Extra valence electrons flow from the N-side to the P-side and the extra holes flow from the P-side to the N-side. They cancel each other out, and you're left with a region in which the mobile charge carriers are depleted, and therefore you can't pass a current through that area.
Starting point is 00:54:05 Another way of thinking about it is that from the source into the well, electrons are trying to move left to right, from the N region to the P region, but from the drain to the well they're trying to move from right to left. They're trying to move in the opposite direction. And if electrons are trying to move towards each other like this in two opposite directions, you're not going to have a current flowing. A current needs to be a circular flow of electrons or charges all in the same direction. So either way you look at it, you're not going to have a current flowing in this setup.
Starting point is 00:54:32 In order to have a current flowing, we need the formation what's called a channel or an inversion layer. Now the idea of an inversion layer is that this exists in the well. So that's, remember, in the semiconductor region just below the gate. Normally in this region, it's P-doped, so there are more positive charges than negative charges. You've put extra holes in there, so there are more positive charges that can carry current. Remember, overall it's neutrally charged, but there are more mobile positive charges than mobile negative charges. So that's normally. However, in the case where an inversion layer forms, you actually get a region in the well where there are more negative charges than positive charges. And so
Starting point is 00:55:13 instead of behaving like a P-doked region, it actually behaves like an end-doped region. Now, if that happens, if we get this inversion layer, which forms a thin channel, it will link up the end-doped region under the source to the end-doped region under the drain and form a channel between them, where charge can flow from one side to the other, linking them up together. There'll still be a depletion region underneath the channel, but now you won't have a depletion region that essentially forms a wall blocking the source from the drain, but there's a thin channel connecting them together. This thin channel allows current to flow from source to drain,
Starting point is 00:55:48 and thus turns the switch on. So if we can get this inversion layer, this channel of an end-doped region to form between the source and the drain, we can link up the circuit and get current to flow. But how do we get this inversion layer of form? Because remember normally there is no such inversion layer. Normally you've just got the P-doped region there, which is what we put there. Well, the answer is we use the field effect.
Starting point is 00:56:11 Obviously, that's the whole point of the field effect transistor. If we apply a voltage, a positive voltage, a positive electrical potential to the gate, that will be mediated through the insulator. An electric potential can be mediated through an insulator, even though no charge can flow through. Remember, there's a difference between an electric potential. or a voltage, that's just a difference in electric potentials, and an actual flow of current. So we're just talking about a voltage here. If you apply a positive voltage to the gate, that gets mediated through the insulator and is felt in the well of the P-doped region just beneath the gate.
Starting point is 00:56:47 This positive potential attracts electrons to it, obviously, because electrons tend to move towards positive charges. You've got a positive potential here, negatively charged electrons will move towards it. as negatively charged electrons moving into this region that's just below the insulator, which in turn is just below the gate, they build up and get higher and higher concentration until you get this inversion layer. You get actually more electrons, at least in this thin strip just below the insulator, than you have holes. Normally you have more holes, but because of the supply and voltage,
Starting point is 00:57:22 you get the inversion layer, which means more electrons than holes, and thus a direct connection between the end of the region under the source and the end-doped region under the drain, and thus ability for current to flow from one to the other. Now, there's an extra complication here, because actually, if you increase the voltage further, the amount of current that can flow from source to drain increases, but there's a limit to it.
Starting point is 00:57:45 There's a limit to it because eventually the channel that links the two, the source to drain, pinches off, and so there's sort of a maximum amount of current that you can have flowing from the source to the drain. I won't go into the details of that, because it's a bit too hard to explain. But the key point to understand is that these transistors are carefully designed so that essentially either they're off and then there's no current flowing through them or they're on and there's a set higher amount of current flowing through them regardless of how much the voltage applied to the gate is. The voltage that is applied to the gate should always be enough to push it into the saturation mode so that it goes to the maximum current voltage.
Starting point is 00:58:24 And even if it's a bit more than that, the current that flows through, it still shouldn't be. increase beyond that. The reason we want this sort of either or none or a lot is because it's easier to implement the digital abstraction of zeros or ones if we have only effectively two levels of current, none or a lot. But that's an extra aside. That's not essential to understand. So in summary, applying a high voltage to the gate turns an N-Moss on because it produces an inversion layer of accumulated electrons under the gate, thereby connecting the end-doped regions under the source and drain, allowing current to flow through. A P-MOS is the exact opposite. In a P-MOS, the doped regions under the source and drain are P-doped regions, so they have
Starting point is 00:59:10 a deficiency of electrons, or in other words, in excess of holes, and the region in between them, forming the well, is end-doped. In this situation, when you apply a negative voltage to the gate, that leads to electrons being pushed away because they're going to move away from a negative potential and holes to be attracted to that region. This leads to an inversion layer of accumulated holes which connects the P-doped regions underneath the source and the drain leading to the circuit turning on.
Starting point is 00:59:43 So a high voltage turns on an N-MOS while a low voltage applied to the gate turns on a P-Moss. So they turn on and off with the opposite applied voltage, and that's very useful. CMOS is a particular way of combining mosfets together to produce logic gates. Now, logic gates I'll discuss in the next episode, but the reason we want transistors is in order to implement
Starting point is 01:00:09 digital logic, and that's done in logic gates. So it's very important to understand how we use these transistors to build those logic gates. Seamoss is a particular way, or a technique or technology, a pattern of combining together mosmet transistors to produce these logic gates. CMOS stands for complementary metal oxide semiconductor, and
Starting point is 01:00:30 the complementary is the key part because CMOS involves using one P-MOS and one N-MOS FET to counteract the limitations of just using one by themselves. The big advantage of CMOS logic is that it reduces power consumption because ideally no current flows
Starting point is 01:00:45 and thus no power is consumed except when you're actually flipping the inputs to the gates, or in other words when the gates are being switched from them zero to one or one to zero. But when they're actually just on or off, ideally no current should flow. In practice, a little bit of current will always flow. In CMOS, what we actually, although I've talked about switches in terms of current flowing or not flowing, really an alternative way of thinking about that is just changing the voltages from source to drain, whether source and drain
Starting point is 01:01:12 will have the same voltage or whether there will be a voltage difference between them. Really, it's an equivalent way of thinking about it, because if you connect one, if you connect the source to the drain via an electric circuit and there's no resistors in between them, they should have the same electric potential because essentially there's nowhere for the energy to have been lost. Resistors dissipate energy and therefore cause a loss in electrical energy. But there aren't any resistors between a source and a drain that are connected up together, so they should have the same voltage. A small amount of current will have to flow to equalize their voltage, but only a very small
Starting point is 01:01:44 amount. So practically speaking, it's nil. So the point of it is that although I've talked about current flowing from source to drain or no current flowing. Really electronically speaking in terms of what's relevant to the computer, it's actually the voltage difference or whether the voltage at the source or the drain is a high voltage or a low voltage. Because of the reason I mentioned that in a Seymus logic,
Starting point is 01:02:09 it only takes a small amount of current in order to equalize that voltage and not much current will flow in an ideal circumstance. It's sort of equivalent thinking about it either way. Now, there's one extra little wrinkle that I need to clarify here. So I mentioned that in order to turn on an N-MOS, you need to apply a high voltage. While in order to turn on a P-Moss, you need to apply a low voltage. Well, this seems to imply that both of them are off when you apply zero voltage, which is the off condition. Remember, in a circuit, we've only got two conditions, essentially zero volts, which is off, and then high-volts,
Starting point is 01:02:41 which may be five volts, maybe it's three volts. It depends exactly on the circuit. I'll talk about it as being five-volts, as being the on-condition, although, again, that does vary. But the point is there's only two possibilities that we should have on or off, low or high. But the way I've described it, it seems like there's three. There's high, zero, and low, or the negative voltage that you need to turn on a P-MOS. And that might be a bit confusing. The way that this is apparent conflict is resolved is by the way in which voltage is defined. Because remember, voltage refers to the potential difference.
Starting point is 01:03:14 The electric potential in one area minus the electric potential in another area. That's what voltage is. An area with high electric potential effectively has lots of positive charges bunched up close to each other, whereas an area of low electrical potential has a lot of negative charges bunched up close to each other.
Starting point is 01:03:31 So the way that this is set up in Seamos logic is as follows. The source terminal of an N-Moss, so this is one of those mossets in which the source and the drain have an N-doped material underneath them, The source in an N-MOS is always connected up to the ground, so zero volts. In a P-Moss, it's the opposite.
Starting point is 01:03:57 The source in a P-Moss is always connected up to a high-voltage source, so say 5 volts. So connecting them up in the opposite way is critical here for getting them to function the way we want. Because in an N-Moss, the source is connected up to the grounds, to a low voltage. If we apply a low-voltage, essentially zero-valts to the gate, then there's no potential difference between the gate and the source. Zero minus zero is zero. So there's no potential difference there, and thus there's no external field effect
Starting point is 01:04:27 that's able to pull the electrons, in this case towards the gate, and thus generate the channel that we need to electrically link up the source and the drain. So that's as it should be. In other words, an NMOS device is going to be off when we apply zero volts to the gate. If we apply a high voltage to the gate, now there's a positive potential difference between the gate and the source.
Starting point is 01:04:53 You know, 5 minus 0 is 5. So there's a positive potential difference there, positive voltage. That positive voltage means effectively a buildup of positive charge around the gate. That attracts electrons from the well towards the gate or towards the insulator that separates the gate
Starting point is 01:05:09 from the well underneath it. That buildup of negative charges produces an inversion layer, which forms a channel that electrically connects the source to the drain and turns on the switch. So that hopefully makes sense. That's how an N-Moss device works. What about a P-Moss device? Well, remember, I said that in a P-Moss device, we connect to the source up the other way. We connect the source up to the high voltage instead of the low-voltage. This means that in the case of a P-Moss device, if we apply zero-voltage to the gate, no longer do we have a zero-voltage difference between, the gate and the source, because the source isn't at zero volts. The source is at five volts. The source is always connected up to the high voltage. So in this case, our voltage, our potential difference is zero at the gate, minus five at the source, which is minus five. In other words,
Starting point is 01:05:58 a negative potential difference. And that's exactly what we need. A negative potential difference represents essentially a buildup of negative charge that attracts holes from the well region towards the insulator that separates the gate from the well underneath it. That leads to an inversion layer where holes build up, electrically linking the drain and the source, which are also made of p-dote materials, and thereby allowing current to flow. So in this case, because we've connected the source up to a high-voltage source, applying zero volts to the gate actually turns on a p-mos. So it's the opposite behavior of an n-mos. In order to turn off, a P-MOS, you actually have to apply a high voltage to the gate. Applying a high voltage to the gate,
Starting point is 01:06:44 when the source already has a high voltage, means that the voltage difference across gate to source is zero. Five minus five is zero. If there's no voltage difference across there, there's no buildup of charge, and thus no tendency for holes to be attracted towards that insulator, which demarcates the gate from the well. Thus, there's no inversion layer and no channel forming between the source. and the drain, and thus no electrical connection between the source and the drain, and thus no ability for current to flow, and hence the switch turns off. So it's because of this fact that we always connect the N-MOS source to a zero-voltage source, or ground, in other words, whereas we always connect the P-MOS source to a high-voltage source. That is what gives rise to the difference in behavior, the fact that a, or that and obviously the difference between the P-M-M-MOS and N moss is the different doping. But those two, those, that combination of differences is what allows
Starting point is 01:07:43 the difference in behavior of the fact that an N moss is turned on by a high voltage, whereas a P-mos is turned off by a high voltage. There's been a lot of content in this episode and some of these concepts are quite difficult. So let me just give a brief recap. The basic idea of the switch is that when you apply an appropriate voltage to the gate, the field effect will either allow a channel to form, electrically connecting the source to the drain, or it won't allow the channel to form, and thus the switch will be off. If the channel does form, the switch will be on. The channel forms as a result of an inversion layer, which effectively is just an inversion of the normal concentration of charge carrier that typically exists. So, for example, in an N-type moss-fet, an N-moss, the semiconductor region underneath both the source and the drain is N-doped, whereas that in the well region is P-doped. That means, that in order to get a depletion region to form, we need a higher concentration of negative charges in the region just under the gate. And that in turn can be generated by applying a positive voltage to the gate, thus attracting negative charges, forming an inversion layer, forming a channel that connects the source to the drain and allowing a current to flow,
Starting point is 01:08:57 which in turn equalizes the voltages from the source to the drain, and represents an on switch. If we remove that voltage from the gate, the inversion layer disappears, the channel disappears, is there's no ability to conduct electricity from source to drain and the switch turns off. And source and drain no longer share the same voltage. That's the case in an N-MOS. In a P-MOS, the situation is reversed. Because we connect up the source, in the case of a P-Moss, to a high-voltage source. In this case, when we apply a zero voltage to the gate,
Starting point is 01:09:29 that actually represents a negative voltage when considered between the difference in potential between gate to source. This negative voltage essentially represents a buildup of negative charge, which leads to positive charges, holes, being attracted to the gate region, to the region just under the insulator, that connects gate to well. This leads to a depletion region. This depletion region forms a channel between the P-doped regions under the source and the drain, and leads to conducting of a current between them. So when zero volts is applied to the gate in a P-MOS, current flows, and voltages are equalized between source and drain. If I apply a high voltage to the gate, that actually equalizes the voltage between gate and source,
Starting point is 01:10:16 meaning that the voltage difference between them is zero, which in turn means that there is no force that attracts the positive charges to form that inversion layer and form the channel. Hence, the channel doesn't form. There's no inversion layer. There's no electrical contact between source and drain. and hence the switch is off. And that's effectively, in a nutshell, how transistors work.
Starting point is 01:10:39 In the next episode, we will look at how complementary metal oxide semiconductors, Seamoss Logic, uses MOSFETs to construct logic gates and how we use those logic gates to construct logical components, which are used to implement the functions that we need to carry out computations in an electric circuit. So hopefully we enjoyed that episode. If you did, please consider leaving a favorable review of the podcast on an aggregator of your choice. You could also send me an email. My address is Fods12 at gmail.com.
Starting point is 01:11:15 That's FODS12 at gmail.com. Thank you very much for listening, and I'll talk to you next time.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.