ОПД #1-3. Элементы и принципы функционирования ЭВМ — Transcript
Full transcript
- 0:00Today we need to, well, strictly
- 0:02speaking, figure out how any computing
- 0:05machine actually works. And at the
- 0:09beginning of the lecture, well,
- 0:10respectively, one of my favorite jokes,
- 0:13right, this thing on the picture to the
- 0:15right, what is that?
- 0:19Uh.
- 0:20Transformator.
- 0:21A transformer, yes. How does it work?
- 0:23One, zero. Well.
- 0:26The trans-form-a-tor.
- 0:28No, you remember the joke, right? A
- 0:30professor asks a student on an exam how
- 0:33a transformer works, what did the
- 0:35student answer? Mmm, yeah. So, well,
- 0:42currently, uh, respectively, in this
- 0:44light is most likely where your
- 0:46knowledge stands regarding how any
- 0:48computing machine works. Meaning, when
- 0:52they ask you how it works—
- 0:58No, well, I get it, yeah. And,
- 1:00respectively, well, like, the, uh—
- 1:04The screen lights up, right, the mouse
- 1:06moves, the computer works. That’s
- 1:09about the level of understanding that
- 1:11usually exists in your heads, because,
- 1:13well, in principle it’s not your
- 1:15fault, as you aren't really obligated
- 1:17to know what actually happens inside a
- 1:19computing machine in reality. Well,
- 1:22what do you think is happening in there
- 1:24? Signal.
- 1:26Ah, yes.
- 1:28There are ones and zeros.
- 1:30Ones and zeros, got it. But you see,
- 1:32this is just you talking right now,
- 1:34meaning you have this sort of bag, and
- 1:36in there, you know, there are ones,
- 1:38zeros, signals, so you sort of look in
- 1:40there and think, "My God, what is this?
- 1:42" Right. And can anyone else say, more
- 1:45specifically, how it works? There are
- 1:49zeros. Zeros are the absence of voltage
- 1:51, and the rest is voltage. Not exactly
- 1:55absence, it's just how the computer
- 1:57translates into binary, sort of more or
- 2:00less.
- 2:01And what do you do with this binary
- 2:03system next? Well, alright, okay. What?
- 2:21Well, once again, I believe you
- 2:23shouldn't have to know this yet, see.
- 2:27But right now your, well, assumptions
- 2:29are at a caveman level, because you
- 2:30can't connect, uh, this glowing blue
- 2:32screen with the operating system, like,
- 2:34Windows, to the fact that there are
- 2:36some ones and zeros inside. Meaning,
- 2:39for you, there are—you’ve heard
- 2:41that there are ones and zeros, and
- 2:43you’ve seen this very blue screen,
- 2:45but everything in between is this big,
- 2:47big, black emptiness—or, well, blue,
- 2:49by now.
- 2:51Well yeah, I completely agree with you
- 2:53regarding the blue screen. Second, so,
- 2:56here is a little Easter egg for you.
- 2:59Look at the pictures on the left. Who
- 3:01is that? What is she doing?
- 3:05That's Trinity from The Matrix.
- 3:06Right, excellent. The correct answer is
- 3:08Trinity from The Matrix. What is she
- 3:10doing? At that moment, information is
- 3:13being uploaded to her. I remember parts
- 3:15of it.
- 3:17Ah, well the correct answer is that, at
- 3:19that moment in time, a helicopter
- 3:21piloting program is being uploaded into
- 3:24her.
- 3:24There. And, accordingly, it literally
- 3:26takes a second, she blinks her eyes,
- 3:27meaning the upload is happening, and
- 3:29then he says something like "Let's go,
- 3:31we're flying." So, today, after this
- 3:33lecture ends, you should all roughly
- 3:35know how a computer works. I will try,
- 3:37in our slightly less than an hour and a
- 3:39half—in reality, our lecture is quite
- 3:41short—to upload into you information
- 3:43about how any computing machine works.
- 3:46And later on in the course, we will
- 3:48develop this knowledge a little bit
- 3:49with you. Oh, for starters, we still
- 3:59need to talk a little bit about history
- 4:01. That is, in principle, to understand
- 4:05how various signals coexist inside a
- 4:07computer, let’s, uh, recall, well,
- 4:09generally, how people actually tried to
- 4:12do calculations in the somewhat recent,
- 4:14foreseeable past. And it's clear that
- 4:19the first computing machines were
- 4:21analog, and
- 4:29we say "digital," but there are also
- 4:31analog computing machines.
- 4:36And how are calculations performed in
- 4:38those analog computing machines? No,
- 4:41well, some kind of proportional value,
- 4:44or...
- 4:45Well yes, you're starting to say more
- 4:47or less the right things here. In
- 4:50analog computing machines, there is, uh
- 4:53, accordingly, some real signal that
- 4:55exists in the real world, or a real
- 4:57measured quantity. And it is always
- 5:01mapped to a value that we call an
- 5:03analog. For example, you have a picture
- 5:08presented on the slide. Well, I don't
- 5:10know, this is a characteristic, one of
- 5:12the characteristic examples is an
- 5:14altimeter. And, accordingly, how do you
- 5:17measure the altitude of a flying object
- 5:19from the ground? Well, accordingly,
- 5:23there are corresponding devices; you
- 5:25can look at the pressure difference to
- 5:27determine the altitude approximately.
- 5:30Or you could use some kind of sonar
- 5:31based on the speed of the signal, where
- 5:33they send a signal to the ground, and
- 5:35then calculate the delay of how long it
- 5:37takes to come back. There. And, uh,
- 5:40accordingly, we have a real parameter.
- 5:42The real parameter is, for instance,
- 5:44altitude. There. And inside all
- 5:47computing devices, it is mapped to a
- 5:50voltage analog. A voltage that changes
- 5:54according to the same law as the real
- 5:56parameter changes. So, here we have an
- 6:02airplane flying; see, a mountain has
- 6:04formed there, so the altitude above the
- 6:06ground will change for us, and the
- 6:08sensors will detect this altitude and
- 6:11voltage, which, in this case, increases
- 6:13proportionally to the altitude. Though,
- 6:18in a real sensor, it would most likely
- 6:20decrease. Yeah. So, it would be an
- 6:22inverse image. Yeah. But again, we need
- 6:27to understand that both our measured
- 6:29parameter and the one we set as an
- 6:31analog—we are essentially trying to
- 6:33ensure they follow the same law. And
- 6:37most importantly, these two quantities
- 6:40are continuous. We can't, strictly
- 6:43speaking, make the altitude discrete,
- 6:45with some kind of steps in that
- 6:47altitude. Well, in reality, in the
- 6:50modern world, of course, this
- 6:52discretization does happen, and we will
- 6:55still have steps, but the step will be
- 6:57so tiny that it will be
- 6:58indistinguishable to us. Yeah. And,
- 7:02accordingly, we have a certain
- 7:03continuous signal from the sensor. And,
- 7:08accordingly, there is a continuously
- 7:10changing altitude and a continuous
- 7:12voltage used at the sensor output. You
- 7:17can do something with this voltage.
- 7:19Well, based on the principle of analog
- 7:22computers, a great many different
- 7:24devices exist. One of the well-known
- 7:27ones—I don't know if you used them in
- 7:29school or not—is the slide rule,
- 7:31which can perform fairly complex
- 7:33calculations. Yeah. And, in general, I
- 7:36was taught in school; I didn't really
- 7:38have computers as such, just the first
- 7:40calculators were appearing, and we had
- 7:42Bradis tables and slide rules. And we
- 7:44all calculated everything happily. On
- 7:46them. So, analog computers still exist
- 7:52today. Moreover, you can't get away
- 7:58from them in real life because,
- 8:00compared to digital computers, they
- 8:02have very high speed for a certain
- 8:04class of tasks. Digital computers
- 8:09simply cannot match the speed of analog
- 8:11computers for a certain class of
- 8:13operations. What do you think, then,
- 8:17which operations do digital computers
- 8:19perform worse than analog ones?
- 8:27Constant change of a number.
- 8:30Mm, heat.
- 8:32Fast. Or, for example, when something
- 8:35is measured periodically,
- 8:38when the signal is continuous.
- 8:40Well, in analog computers, the signal
- 8:43is always continuous. The question is
- 8:46simply what to do with this signal.
- 8:48Well, for example, okay, let's assume
- 8:50we are measuring altitude. Suppose we
- 8:53have two planes flying, and accordingly
- 8:55, we need to know—I don't know why,
- 8:58but—the total altitude of both planes
- 9:00at once. How can we perform this
- 9:03mathematical operation using voltage?
- 9:07What, like, how do we add two analog
- 9:09values? Apply it.
- 9:15Louder. Well, just apply it.
- 9:19Well, yes, simply connect two wires,
- 9:21figuratively speaking, and at the
- 9:23output, the amplitude will be twice as
- 9:26large as needed. Can you imagine how
- 9:28simple it is to add analog values? You
- 9:31just took two wires, connected them,
- 9:32and added them together. Now, with
- 9:34subtraction, it's a bit more
- 9:36complicated. Yeah. And so special
- 9:38devices are needed for that; addition,
- 9:40however, is very simple. But, uh,
- 9:43accordingly, in a computing machine,
- 9:45what do you need to do to add—all
- 9:47those things we'll talk about today,
- 9:49like adders—it's a fairly large
- 9:51number of different things just to take
- 9:53two binary numbers and add them. Yeah.
- 9:57But in analog, everything is very
- 9:59simple. And, uh, moreover, there are,
- 10:02as I said......machine is built, they
- 10:09will still be slower. Such operations
- 10:11include integration and differentiation
- 10:14. Yeah. And, uh, accordingly, like how
- 10:19we were taught in school, that you have
- 10:21to use all those primitives—oh, not
- 10:23primitives, those tables—yourself
- 10:25according to the rules of derivatives,
- 10:28which......well, that is, like, read...
- 10:36...and, accordingly, numerical methods.
- 10:39Yeah. The machine places a small
- 10:42element that performs this
- 10:44differentiation online, right on the
- 10:46fly. That is, a signal arrives at the
- 10:49input, the derivative is taken
- 10:51immediately, and it happens in
- 10:53real-time. A computer can never handle
- 10:56that. Accordingly, how do you think,
- 11:00for example, a sine is calculated in an
- 11:02analog computer?
- 11:04Fast, obviously. By applying...Well, in
- 11:07what way can you calculate, for example
- 11:10, a sine?
- 11:16Ah, well, just apply alternating
- 11:18voltage.
- 11:22Hmm, you are very close to the correct
- 11:25answer. And, in fact, it's
- 11:26approximately like that. Well, that is,
- 11:28uh, from the gallery above, they are
- 11:30suggesting that you need to somehow
- 11:32construct a triangle and, accordingly,
- 11:34calculate that specific ratio. In
- 11:36reality, the computational operation of
- 11:39sine and cosine is performed by
- 11:41so-called rotating transformers. That
- 11:43is, there is an armature, and it turns
- 11:45at a certain angle relative to the
- 11:47windings, and accordingly, a current is
- 11:50induced in the windings that is
- 11:51precisely proportional to the sine and
- 11:54cosine of the voltage. It corresponds
- 11:56there. There you go. And furthermore,
- 11:59the guys who go to the military
- 12:00department will most likely even see
- 12:03analog computing and problem-solving
- 12:05devices. They are quite specific, as
- 12:06they were primarily used back in the
- 12:08day for various fire control tasks.
- 12:10There. But we were still taught them at
- 12:12the military department. It's a huge
- 12:13room, like that. And there's a bunch of
- 12:15all sorts of devices that rotate and
- 12:17move around. I mean, when you, uh,
- 12:19conditionally speaking, enter
- 12:21coordinates or a ship's bearing, the
- 12:23whole room comes to life, starts
- 12:25buzzing, everything moves, and it,
- 12:27accordingly, remembers the, well,
- 12:28conditionally speaking, the bearing you
- 12:31entered, and then you can fire a
- 12:32torpedo. So, uh, accordingly, analog
- 12:37computers are cool, that is, they are
- 12:40now used mainly, well, in all sorts of
- 12:42devices that require, well, first of
- 12:45all, real-time computation. And
- 12:50basically, they are used in control,
- 12:52well, in control computing systems,
- 12:55that is, those related to space,
- 12:57airplanes, and so on. Not all of them,
- 13:01of course, but parts of these analog
- 13:03computers are now quite strongly
- 13:05integrated with digital ones in their
- 13:07analog sections, and together they
- 13:09perform certain mathematical operations
- 13:11. And another advantage, besides high
- 13:19performance for such a narrow class of
- 13:21tasks, is that, in principle, the total
- 13:24calculation error of analog computers
- 13:26is lower. But the thing is, error has
- 13:31the property of accumulating over time.
- 13:34Yeah. But with an analog one, it has
- 13:37its resolution, and that's about what
- 13:39you'll get at the output. Well, with
- 13:43certain reservations, of course. So,
- 13:49what are we actually supposed to do? Uh
- 13:54, how do we, in principle, work with
- 13:56this analog voltage? Well, smart people
- 14:02know that since analog voltage repeats
- 14:05our value, we usually need to calculate
- 14:07it in some way. I mean, the final
- 14:12result that we want to see must be
- 14:13prepared in some way for a person. If I
- 14:18have a voltage change graph and a
- 14:20voltmeter, well, for you, it usually
- 14:22means nothing, just some kind of value.
- 14:25It's difficult for a human to perceive
- 14:27analog values directly. And in order to
- 14:32convert them and potentially use them
- 14:34later in digital machines, we need to
- 14:36find a way to determine what the
- 14:38voltage value is at the output of our
- 14:40analog computing device at any given
- 14:42moment. And, well, accordingly, people,
- 14:47uh, they took a fairly simple approach.
- 14:50They created, well, sort of a special
- 14:52scale. An example of this very
- 14:55discretization of an analog value into
- 14:57several levels is shown here on the
- 14:59slide. And, accordingly, with the help
- 15:03of, well, strangely enough, complex
- 15:05technical solutions, the voltage at the
- 15:08output of your analog computing device
- 15:10is compared with, well, with this, uh,
- 15:13specific value set for us. For example,
- 15:16we have 1 volt. So, we take the value
- 15:18and compare it to one volt, whether
- 15:20it’s higher or lower. Then the next
- 15:22one, two, three, and so on. And so we
- 15:24can obtain a real voltage value with a
- 15:27certain, well, degree of resolution.
- 15:30Right. And this part in analog
- 15:32computers. Calculating a sine or an
- 15:34integral is not difficult, it’s
- 15:36actually quite simple. But, uh,
- 15:39accordingly, to output, that is, to
- 15:41measure that voltage with sufficient
- 15:44accuracy is usually, well, not always
- 15:46very easy. Right. And this is linked
- 15:51precisely to the errors of the
- 15:52resolution device itself. Accordingly,
- 15:55all these devices were complex, and
- 15:57people thought, "How can we get rid of
- 16:00this?" That is, if we take this analog
- 16:04signal and it changes, and we try to
- 16:06measure it, and each time we make some
- 16:08error in that measurement, how do we
- 16:10make it so that, well, we make fewer
- 16:12mistakes? Well, smart people, they
- 16:19thought, "Let's not do it that way;
- 16:21let's just make two signal levels." It
- 16:23will be quite simple to measure them.
- 16:25Right. And, accordingly, we will
- 16:27perceive this information only as zero
- 16:29or one at a specific moment in time,
- 16:31and, accordingly, transmit these pulses
- 16:33of information in batches. That is how
- 16:36digital computers appeared. Well, more
- 16:38on that in the next slide. To finish
- 16:40with analog computers, I will say once
- 16:42more to you that they still exist today
- 16:47. Well, uh, for such, let's say,
- 16:49general-purpose analog computers or,
- 16:52well, like computers, you know,
- 16:54computers that we as users are used to,
- 16:56typing things in, using our
- 16:58applications. There are certainly no
- 17:00analog computers of that same principle
- 17:02, of course. So, you can't just take
- 17:06and program any arbitrary program on an
- 17:08analog computer right now. In my youth,
- 17:13I even saw these kinds of
- 17:15general-purpose analog computers. And
- 17:18they looked like a large stand. There
- 17:20were various elements inside this stand
- 17:22. And they were connected to each other
- 17:24. Essentially, you would assemble an
- 17:27analog computing circuit, feed signals
- 17:29into the input, and take something from
- 17:31the output. Right. But, in principle,
- 17:36they used to exist as general-purpose
- 17:38machines, occupying a huge amount of
- 17:40space because the analog devices
- 17:42themselves, which performed the analog
- 17:44operations, were quite bulky. Take that
- 17:49fire control system at the military
- 17:51department, for instance—it took up
- 17:53an entire room of about 30 meters. It
- 17:56was set up along the wall in an L-shape
- 17:58. Right. And on the opposite wall, its
- 18:01diagrams were hanging. Right. So,
- 18:03imagine, a diagram covering the entire
- 18:06wall. Right. And that was just one
- 18:08small block from this device. And our
- 18:10captains loved to grill us using these
- 18:12diagrams. "What is this thing for?"
- 18:14Well, and as always, we never really
- 18:16answered properly. Right. Uh, what's
- 18:24next? Then computers appeared. And as I
- 18:31already said, let's replace the many
- 18:34signal levels with just two and decide
- 18:36that we will have either a zero or a
- 18:38one, defined by specific voltage levels
- 18:40. On the slide, you can see this signal
- 18:47in its ideal form, as a rectangle, just
- 18:49as it is usually depicted in various
- 18:52timing diagrams. And, naturally, the
- 18:56real signal that you might see on an
- 18:58oscilloscope screen if you ever wanted
- 19:00to look inside your computer to see
- 19:02what's happening. Well, and these
- 19:06voltages, depending on the logic, can
- 19:09vary. Here on the slide, we have what's
- 19:12called TTL logic. And, accordingly,
- 19:16this logic has two levels. The lower
- 19:19level is the signal that is perceived
- 19:21as a zero. There is a corresponding
- 19:24upper level, above which the signal is
- 19:26perceived as a one. If the signal is,
- 19:29accordingly, between these two levels,
- 19:31what happens? Well, that's an undefined
- 19:36state, right? So, we can't accurately
- 19:40say what kind of signal it is. Moreover
- 19:43, each element, due to its own physical
- 19:45parameters and characteristics, will
- 19:47have some components interpret it as a
- 19:49one, while others interpret it as a
- 19:51zero. Consequently, chaos, confusion,
- 19:54and disorder occur in the computer at
- 19:56that moment. Accordingly, uh, therefore
- 20:02, well, any computing devices are
- 20:04designed so that they can clearly
- 20:06determine which signal is present at
- 20:11the output in a given case. Well, and
- 20:14you can see that here, compared to the
- 20:16previous slide, it is actually much
- 20:18easier to determine a zero or a one
- 20:21than to choose one level out of, say,
- 20:23256. Yeah. So, the circuit will be
- 20:27substantially simpler. Yeah. Well, and
- 20:32digital computers, naturally, conquered
- 20:35, uh, accordingly, uh, what they would
- 20:41call the market in the modern world.
- 20:43Yeah. And before, they simply, well,
- 20:45people learned how to make them, uh,
- 20:48substantially, that is, make them
- 20:50simpler than analog ones. And,
- 20:54accordingly, the base of any digital
- 20:56computer is logic gates. You are well
- 21:00familiar with logic gates as such. I
- 21:03probably don't need to explain what
- 21:05they are. Well, uh, the functions,
- 21:08which, well, naturally, an inexhaustive
- 21:11list of functions that logic gates
- 21:13perform, are presented here on your
- 21:15slide. Well, the only thing I did was
- 21:18present this in two notations. The
- 21:22notation adopted in our electronic
- 21:24circuits corresponding to GOST and,
- 21:26accordingly, uh, the notation according
- 21:29to American standards. You will most
- 21:34likely encounter them in all modern,
- 21:36well, development tools for computing
- 21:38components and electronic devices. That
- 21:41is, there you most likely won't see our
- 21:44GOST designations. Yeah. Uh,
- 21:46accordingly, how is the function of a
- 21:49logic gate defined? Tell me, please.
- 21:54Mm,
- 21:54a table,
- 21:55yes, truth tables. Well, I, accordingly
- 21:58, have presented these very, these very
- 22:00truth tables to you on the right. Well,
- 22:02you can see them. Well, and I provided,
- 22:05uh, accordingly, a few well-known
- 22:07functions as examples. And in general,
- 22:10I hope you won't have any problems with
- 22:16truth tables; you should have covered
- 22:18this in computer science, and now they
- 22:20are probably, uh, accordingly, talking
- 22:22about it in discrete math, right? That
- 22:25is, as it were, here at the university
- 22:27they will teach you to interact with
- 22:29logical functions as such in principle.
- 22:31The only thing I wanted to add here is
- 22:33to show, accordingly, uh, how they look
- 22:36as integrated circuits. That is, well,
- 22:39I am showing you here the package of
- 22:41one of the famous series of chips from
- 22:43back in the day. Well, and usually, in
- 22:46a package like this, there were four
- 22:48elements. Accordingly, well, this is,
- 22:51for example, a chip, it is indicated as
- 22:56having 14 pins. Well, accordingly,
- 23:00those 14 pins include, uh, 12 pins for
- 23:03the elements, right? That is, as it
- 23:06were, why 12? Because there are two
- 23:09inputs and one output, four elements
- 23:11multiplied by three, we get 12 pins.
- 23:13And what are the other two for?
- 23:18Power and the common ground wire,
- 23:20because electricity usually flows in a
- 23:22closed circuit. There. Accordingly, all
- 23:27of this together adds up to 14 pins.
- 23:30The types of these modern packages are
- 23:32very diverse. That is, if you look
- 23:35inside your computer, you will see a
- 23:37huge microchip there with a bunch of
- 23:39pins around it. Or you might see tiny,
- 23:42barely noticeable microchips. The world
- 23:47, compared to the one I knew, has
- 23:49changed significantly in terms of the
- 23:52physical form factor of microchips. But
- 23:56, accordingly, the first computers were
- 23:58built entirely on such logic elements.
- 24:03So, if you open up some old computer,
- 24:05you will see that they completely cover
- 24:07the circuit board. And to talk further
- 24:20about how a computer works, we need to
- 24:22understand how we store, transmit, and
- 24:24process information. Well. On the slide
- 24:32, you see two typical computer, two
- 24:40diagrams for storage, which show modern
- 24:43storage of information inside a
- 24:45computing machine. There are two ways
- 24:49to store information, with so-called
- 24:51static memory existing. That is SDRAM
- 24:55and dynamic memory. You use dynamic
- 24:58memory as your main RAM. You have seen
- 25:02those DRAM modules that are inserted
- 25:04into your computer. They are designed
- 25:08exactly as shown in the picture on the
- 25:10right. Accordingly, where do you think
- 25:14the information is stored here? It is
- 25:16clear that it must store either a one
- 25:18or a zero. And each of these elements.
- 25:20So where is the information stored in
- 25:22DRAM? A capacitor.
- 25:24No, actually,
- 25:27the transistor is used as a charging
- 25:29and discharging circuit. The
- 25:32information is stored on the capacitor,
- 25:34but the catch is that this capacitor
- 25:36does not exist. It is actually part of
- 25:39the transistor. This is called
- 25:41parasitic capacitance. There. And like
- 25:44any capacitor—do you know how a
- 25:46capacitor works, what a capacitor does?
- 25:49You can think of it like this: when
- 25:51studying electricity, an analogy with
- 25:53water is often used up to a certain
- 25:55level of abstraction. A capacitor is
- 25:58like a leaky glass. You can,
- 26:01figuratively speaking, pour water into
- 26:03it and store some amount of energy
- 26:05there. Accordingly, the voltage level
- 26:09at the capacitor's output will
- 26:11correspond to the water level. There.
- 26:14But, uh, real capacitors—in an ideal
- 26:16capacitor the cup would be, well,
- 26:18normal, with no hole at the bottom, but
- 26:20in a real one there is a small hole,
- 26:22and water slowly leaks out of it. So.
- 26:24And, accordingly, well, it's like the
- 26:27charge disappears. Accordingly, if we
- 26:29look at a DRAM cell, we realize that,
- 26:32yes, our information is stored in a
- 26:34capacitor, but it is constantly being
- 26:37lost. If it disappeared completely,
- 26:39your computers wouldn't remember
- 26:41anything. But inside along with these
- 26:46memory chips, there is also a special
- 26:48device that triggers the regeneration
- 26:50of this memory. That is, it reads this
- 26:53memory once every certain cycle, every
- 26:56certain amount of time, thereby
- 26:58recharging this very capacitor. So, how
- 27:02often do you think, uh, what is the
- 27:05duration between two recharge pulses
- 27:07for a single memory cell? Depending on
- 27:11the memory.
- 27:13Well, no, actually, it's most likely
- 27:15the characteristics of the transistor
- 27:17itself that is in this dynamic memory,
- 27:19because the transistor depends on how
- 27:22it is made, and accordingly the
- 27:23capacitance depends on this parasitic
- 27:26capacitance that comes with it. So,
- 27:29what time interval do you think we need
- 27:31to recharge our memory? Again, you will
- 27:33never notice this because, well, you
- 27:35work on your computer and think that
- 27:37memory is always constant. In reality,
- 27:39it discharges just the same and is
- 27:41constantly being recharged. What
- 27:42frequency do you think it is?
- 27:47Well, uh, actually it is 64
- 27:49microseconds, uh, the delay between
- 27:52these very charging pulses.
- 27:56And doesn't it depend on the...
- 27:58It depends on the structural elements,
- 28:00right? That is, as if the larger the
- 28:02capacity, the larger the dimensions
- 28:03should be, and accordingly, the less
- 28:05often it could be recharged. But we
- 28:07have what we have because we want to
- 28:09make memory more capacious. Accordingly
- 28:11, we always reduce the physical
- 28:13elements, right? Accordingly, the
- 28:14capacity decreases as well. And the
- 28:18more, uh, memory there is, the more
- 28:20often we need to recharge it. So. And,
- 28:24well, so what is the advantage of this
- 28:27dynamic memory?
- 28:28Fast,
- 28:29speed. It's so-so,
- 28:35but compared to this SRAM cell, it is
- 28:37significantly slower.
- 28:39It is structurally simpler to look...
- 28:41Yes, you are absolutely right. It is
- 28:43cheaper and simpler. That is, its
- 28:47actual volume per unit of area can
- 28:49become significantly larger. That is
- 28:53why it is still used today, because one
- 28:55bit of information is stored on one
- 28:57transistor. What else? How much simpler
- 29:00can it get? Well, like this. So how
- 29:04many gigabytes are there now?
- 29:06A lot. Like how many? Just imagine, the
- 29:09number of cells is the number of, well,
- 29:11transistors. How many millions or
- 29:13billions of transistors do you have on
- 29:15a modern stick?
- 29:17Yeah. Right. So what are we counting?
- 29:19One transistor, one bit.
- 29:20Do it yourself.
- 29:22You don't know the giga-prefix, do you?
- 29:25Giga is 10 to what power? The tenth.
- 29:29Ah.
- 29:3010 to the...
- 29:32giga.
- 29:35Right.
- 29:39Let's see if you remember your math and
- 29:41physics.
- 29:4610 to the third is what?
- 29:49Kilo. Excellent. 10 to the sixth is how
- 29:52much?
- 29:52Mega.
- 29:53Mega. Well done. 10 to the ninth is
- 29:55what?
- 29:56Giga. Giga. I won't even ask you about
- 30:00the ones beyond that, though in
- 30:01principle, you should know tera and
- 30:03peta. And that is why, yes,
- 30:08if we had some way to, well, recharge
- 30:11the whole thing,
- 30:12we wouldn't need to, right?
- 30:14But why can't we make it?
- 30:16Listen, why aren't there any perfect
- 30:20things in this world at all? Like the
- 30:22Philosopher's Stone, why has no one
- 30:24invented it yet? It's the same reason
- 30:27we haven't made perfect capacitors.
- 30:31Well, physically everything is
- 30:33determined by electrical processes. I
- 30:36don't know physics very well, but from
- 30:38what I understand, the charge just sort
- 30:40of, well, doesn't stay put. Meaning,
- 30:43the dielectric is poor, it leaks; I
- 30:44mean, a capacitor holds a charge, with
- 30:47a positive charge on one side and a
- 30:48negative one on the other. And so
- 30:50there's still a current between them;
- 30:52they interact. And consequently, the
- 30:55charge gradually drains away.
- 30:59In short, there are no perfect things
- 31:01in the world. I want to make a joke,
- 31:06but I'll hold off for now.
- 31:07Go ahead.
- 31:10No, okay, let's get back to memory, to
- 31:12static memory. Accordingly, as you can
- 31:17see, it is significantly more complex.
- 31:21Some transistors, and they're connected
- 31:22to each other somehow. And I'm not
- 31:26forcing you to figure out exactly how
- 31:28this circuit works. I'll just give you
- 31:31a hint as to what to look for. See this
- 31:34? A cross shape, like the letter X.
- 31:38Well, X means excellent. So, this cross
- 31:44shape is positive feedback, meaning the
- 31:46output. Of one transistor, or one stage
- 31:53, is fed to the input of another, and
- 31:55they are connected in such a way that
- 31:57they support each other. That's if you
- 32:01don't go into the details of its
- 32:02operation. So, roughly speaking, if
- 32:06this cell is in a stable state, it will
- 32:08always stay in that state, because the
- 32:10currents mutually sustain each other
- 32:12through those feedback loops.
- 32:16Accordingly, to switch, well, this cell
- 32:22to another state, you need to provide a
- 32:24control signal, and avalanche processes
- 32:26occur within it that flip this cell
- 32:28into another, opposite state. It can
- 32:30just as easily store either a zero or a
- 32:32one. And such a simplest cell is called
- 32:34a flip-flop. Well, we will look further
- 32:36at how it is composed of logic gates so
- 32:38that it is clearer. There. But, uh, the
- 32:42transient processes in this cell, due
- 32:44to the positive feedback, are very fast
- 32:47. That is, this very memory is
- 32:52significantly faster than memory based
- 32:54on dynamic elements. And so, in modern
- 32:59computing machines, this memory is
- 33:01usually used in the form of caches,
- 33:03like the level one or level two cache
- 33:05on a processor. It is built that way,
- 33:08and the registers inside the processor
- 33:09are also built on static elements. What
- 33:12is the downside?
- 33:14It is large, complex, and expensive.
- 33:17That is, its relative capacity is
- 33:19smaller compared to regular dynamic
- 33:21memory, although its performance is
- 33:22higher. Well, I don't know, modern
- 33:27processor cache, what is the usual size
- 33:29of a level two cache? Ah,
- 33:36well yes, up to gigabytes, actually. So
- 33:39the scale of this cache can be
- 33:41significant, but it's still not enough,
- 33:44because system RAM, well, again, in any
- 33:46modern computer—my laptop has 16 GB
- 33:48of RAM. There. But it's not possible
- 33:54yet. Well, anyway, okay. Here, uh,
- 33:59accordingly, are these two standard
- 34:01storage cells. And we, accordingly,
- 34:06understand that computers usually store
- 34:08information in cells of these types. Uh
- 34:13, each cell, as we said on the previous
- 34:16slide, stores one bit. If we try to
- 34:21synthesize a cell using logic gates,
- 34:23which is used in a computing machine,
- 34:25then, accordingly, we will arrive at
- 34:27the circuit of so-called flip-flops.
- 34:31There are quite a few different types
- 34:33of flip-flops. On the slide, you are
- 34:35presented with a flip-flop, the
- 34:37so-called D-flip-flop. This D-flip-flop
- 34:40has two inputs. The D input is the
- 34:44input where we send the data we want to
- 34:46save. There. And the C input comes from
- 34:50the word "clock." A control signal is
- 34:52sent there. If this control signal is
- 34:57equal to one, then information from the
- 34:59D input flows, or rather is transmitted
- 35:01, into the internal storage circuit.
- 35:06The internal storage circuit, you see,
- 35:08is represented by two logic gates. It
- 35:11has the same similar feedback that you
- 35:13saw on the previous picture. This is
- 35:17also, accordingly, positive. And,
- 35:19accordingly, as soon as we provide this
- 35:21information, you can trace the zeros
- 35:23and ones through this circuit yourself.
- 35:28You will see that you have applied a
- 35:30one, applied a control signal C, which
- 35:32is also, let's say, a one, and the
- 35:33information from the D input has been
- 35:35copied to the Q output. It lives there
- 35:42and exists until you turn off the power
- 35:43. Accordingly, if you continue to
- 35:47provide something to the D input, no
- 35:48matter what you provide, nothing in the
- 35:50internal circuit will change as long as
- 35:52there is no control signal. Whether
- 35:57it's a zero or a one there, as long as
- 35:59the C input is equal to zero, nothing
- 36:01will happen; the information remains
- 36:02stored within it. And the D-flip-flop
- 36:07is named after the word "data." There
- 36:08is a massive number of types of
- 36:10flip-flops. There are RS flip-flops,
- 36:12there are JK flip-flops. When it
- 36:14becomes necessary for us during the
- 36:16course, we will examine how they work.
- 36:19Yes. Furthermore, in later years there
- 36:21will be digital circuit design. You
- 36:24will get to know them in detail there.
- 36:28I am simplifying the situation here
- 36:30because there are, accordingly,
- 36:31synchronous flip-flops. Asynchronous
- 36:34flip-flops. That is a whole separate
- 36:36story. I don't want to confuse you with
- 36:38that just yet. Yes. And again, a
- 36:42flip-flop only stores one bit of
- 36:44information, either a zero or a one.
- 36:48Hmm, is one bit of information a lot or
- 36:51a little? In principle, it's a little.
- 36:55Why a little? Well, if you imagine some
- 37:03kind of modern file into which you
- 37:05write information, then one bit is not
- 37:07much. Yes. But if you imagine some kind
- 37:12of control signal, then one bit is
- 37:14quite enough. The correct answer to my
- 37:15provocative questions about whether
- 37:17it's a lot or a little is: it depends
- 37:19on what it's for. Accordingly, in
- 37:22principle, from the point of view of
- 37:24storage, it is not enough. Therefore,
- 37:29usually, to store a larger amount of
- 37:31information, smart people came up with
- 37:34combining single-bit cells into
- 37:36registers. Registers are simply a
- 37:39collection of a certain number of these
- 37:41one-bit cells. Schematically, this is
- 37:46depicted as shown on the slide on your
- 37:48right. Yes. And accordingly, you can
- 37:53see that a register is a collection of
- 37:55individual flip-flops whose control
- 37:57inputs C are simply combined into one.
- 38:05That is, in this case, you provide four
- 38:07information bits, you provide a clock
- 38:09input, and the information is
- 38:11simultaneously written into these
- 38:13flip-flops. So, it's as if all four
- 38:19bits are placed there simultaneously.
- 38:23If, accordingly, you can, you need to
- 38:26store more information, then you can
- 38:28collect as many of these individual
- 38:30flip-flops as you need. In our diagrams
- 38:35, we will draw registers, accordingly,
- 38:38well, as shown on the slide at the
- 38:40bottom left. There. Well, here you see
- 38:44a 16-bit register, which contains 16
- 38:47bits of information. Accordingly, as a
- 38:51single, some kind of meaningful value.
- 38:57Any questions? Uh-huh.
- 38:59You said to create a register from
- 39:01cells.
- 39:02Well, a register consists of flip-flops
- 39:05. That is, a memory cell, in principle,
- 39:08is also a simple one, like a flip-flop,
- 39:11and, accordingly, the simplest storage
- 39:13element. But usually, we want
- 39:16information to be stored in flip-flops
- 39:18all the time, and we don't need to
- 39:20restore it. Therefore, as a single
- 39:22element, well, flip-flops of the SDRM
- 39:24type are used, which store information
- 39:27within themselves. Accordingly, not on
- 39:29parasitic capacitance. Well, and here I
- 39:32have drawn how they are arranged. That
- 39:34is, in any register. That's clear.
- 39:42Let's move on. Well, we already know
- 39:48one way or another how information is
- 39:51stored. And the second question is how
- 39:53it needs to be transmitted. There. Well
- 39:56, usually, information, as you
- 39:58understand, is transmitted via wires.
- 40:01These wires, each of the wires can,
- 40:03well, if information is transmitted in
- 40:06parallel, theoretically transmit one
- 40:08bit of information. Uh, accordingly, in
- 40:11order to transmit 16 bits of
- 40:13information, how many wires do we need?
- 40:17Well, at least 16 data wires. And there
- 40:20are also usually service ones, like a
- 40:22ground common wire, or, for example,
- 40:24these ground wires, like in a twisted
- 40:26pair, which transmit information back,
- 40:28there are also 16 of them. And so on.
- 40:30That is, roughly speaking, 16 data
- 40:32wires and a certain number of service
- 40:34auxiliary ones that we need. Well, and
- 40:37accordingly, there are many wires.
- 40:41Wires need to be somehow combined with
- 40:44each other, because, well, actually, to
- 40:46transmit information from one device to
- 40:48another. They usually try to compose
- 40:51them physically together. Well, like,
- 40:54the element that combines several wires
- 40:57is usually called a bus. A bus can
- 41:03simply be perceived as a collection of
- 41:05wires through which information is
- 41:07transmitted, well, of a similar or
- 41:09single purpose. So, in its simplest
- 41:14form, it looks as shown on the slide,
- 41:17on the right, as just a bundle of wires
- 41:19. If you look at a printed circuit
- 41:22board, you will usually see buses as
- 41:24parallel tracks running from one chip
- 41:26to another. Right. The point is the
- 41:31same; the output of an entire register
- 41:33must be connected to the input of that
- 41:35same register using some kind of medium
- 41:37. Uh, what else? Well, we will
- 41:45represent buses in our diagrams as,
- 41:47well, a thick line. That is, we won't
- 41:51draw out every single individual wire.
- 41:53If you see a thick conductor on a
- 41:55diagram, you immediately understand
- 41:57it's a bus, and the bus width is
- 41:59sometimes indicated by crossing the bus
- 42:01and writing the number of bits it
- 42:03carries simultaneously. Any questions?
- 42:08Well, so far everything is simple. So,
- 42:13one of the important elements in a
- 42:15computer is an element called a gate.
- 42:20And this element is designed to control
- 42:22the transmission of information. That
- 42:24is, well, again, if we draw an analogy
- 42:27with water, what do we know? We have a
- 42:30faucet at home, right? When we want to
- 42:33turn on the water, what do we do?
- 42:35We turn the handle, and the water flows
- 42:38. If we don't want it anymore, we turn
- 42:40the handle back, and the water stops
- 42:42flowing. So, we have an explicit
- 42:45control action that we exert on the
- 42:47device, and it flows or doesn't flow
- 42:50depending on our desire. If we
- 42:54installed, for example, an electric
- 42:56valve or a water valve, then with a
- 42:58control signal, the water in the main
- 43:01pipe would flow. If we remove the
- 43:04signal, the water stops flowing. From
- 43:10the point of view of our logic, a gate
- 43:12is usually represented by an AND logic
- 43:14circuit. Why AND? Well, please look
- 43:20carefully at the truth table shown here
- 43:22. You see that we have a control input
- 43:25and an information input. Right. And
- 43:28there is the output of this element. If
- 43:34you apply a one to the control input,
- 43:36as you can see from the truth table,
- 43:38what will we have at the element's
- 43:39output?
- 43:43Whatever is applied to the information
- 43:44input. Yes, if it's a one, there will
- 43:46be a one, and if it's a zero, there
- 43:48will be a zero. If you apply a zero to
- 43:50the control input,
- 43:52it will always be zero. This is a
- 43:55characteristic device that controls the
- 43:57transmission of information. And if you
- 44:02need to transfer information from one
- 44:04register to another, you can put this
- 44:06logic circuit on every wire of the bus
- 44:08and connect all the control inputs of
- 44:10these AND logic circuits together. And
- 44:15then you get a setup where you send one
- 44:17control signal, and information is
- 44:18transferred from one register to
- 44:20another entirely, all at once. You know
- 44:23, if you wanted to transfer information
- 44:25from a source to some kind of receiver,
- 44:27and immediately, just by sending a one
- 44:30or a zero, all the information is
- 44:31rewritten from one to the other.
- 44:36Questions? Well, again, for now
- 44:40everything looks fairly simple. Each of
- 44:43these elements is trivial and simple on
- 44:45its own. Except for perhaps the only
- 44:50complex one, well, more or less complex
- 44:52element, which is called an adder. So,
- 44:56in order to mathematically add two
- 44:59single-bit numbers, what do we need to
- 45:01do? I mean, roughly speaking, we have
- 45:06one one-bit number and a second one-bit
- 45:08number. We want to add them together.
- 45:12How many outputs should such an element
- 45:14have?
- 45:17Why two?
- 45:19Because the sum of two single-bit
- 45:20numbers can be one.
- 45:22Right, so a second bit will be produced
- 45:24. And this second bit is called the
- 45:26carry-out. If you try to add two
- 45:34single-bit, well, binary numbers in
- 45:35columns, then you have a carry from the
- 45:37previous digit, and this unit, which
- 45:39becomes the next carry, is simply added
- 45:42to the next pair. Accordingly, this
- 45:50will be the so-called carry-out. Right.
- 45:52And if we consider, say, two digits in
- 45:54the middle of a number, besides the
- 45:56carry-out, we will also have a carry-in
- 45:58, right, which also needs to be taken
- 46:00into account in the addition. Therefore
- 46:04, the adder, conditionally speaking,
- 46:06has three inputs and two outputs.
- 46:10And the third input is this carry,
- 46:14right?
- 46:15Yes. So, there are two data inputs.
- 46:17Well, you see, here we have a number,
- 46:19for example, number A and number B.
- 46:21These are the zero-th digits of this
- 46:23very number. We have each digit of this
- 46:27number plus some kind of carry-in that
- 46:29also participates in the addition. Well
- 46:31, let's assume from the previous digit.
- 46:35In the first one, it will most likely
- 46:37be equal to zero, but somewhere in the
- 46:39middle, oh, in the zero-th one it will
- 46:41be zero, and somewhere in the first one
- 46:43it might already be non-zero. And here
- 46:48is the truth table of the simplest
- 46:50adder. It is presented here for you on
- 46:53the slide. Let's take a close look at
- 46:56it to understand, well, to fully grasp
- 46:58how it works. Well, the inputs are
- 47:02again C-in, A-i, and B-i. Accordingly,
- 47:08the outputs are C-out and the sum S of
- 47:11the i-th digit. Let's take this case as
- 47:15an example, for instance. Two ones with
- 47:19a carry equal to zero, respectively.
- 47:23Accordingly, our sum must naturally be
- 47:251 + 1 = 10, with a zero in this current
- 47:27bit and an outgoing carry of one. Is
- 47:31that clear? It's basically the same
- 47:34column addition you're used to, just in
- 47:36binary instead of decimal. There's
- 47:38really no difference at all. Let's take
- 47:44another example, say the last row,
- 47:46where A and B were both one, and we
- 47:47also had a carry from the previous bit
- 47:49from column addition. So, what do we
- 47:54get? We should get 11. Accordingly, the
- 47:58information bit should be one, and the
- 48:00carry to the next bit should also be
- 48:01one. If you try adding two binary
- 48:06numbers in columns, you'll see how
- 48:08these carries move from one bit to the
- 48:09next and affect the final sum. So, if
- 48:16we build a simple adder using this type
- 48:18of logic gate, it will be enough to add
- 48:20single-bit numbers. But if we want to
- 48:26add two 16-bit numbers, or numbers of
- 48:28any bit depth, what do we need to do?
- 48:33Just like in column addition, we must
- 48:35feed the outgoing carry from the lower
- 48:37bit to the next, higher bit. And as you
- 48:43can see, there is a connection wire
- 48:45here that connects the bitwise carry
- 48:47transmission in exactly that way. We
- 48:53must do the same thing for all
- 48:54subsequent elements. At the same time,
- 48:59the very last bit will also have an
- 49:01outgoing carry, which is typically used
- 49:03in computers as an overflow signal.
- 49:08What does overflow mean?
- 49:14Yes, you're right, it means the number
- 49:16doesn't fit in the bit grid. For
- 49:22example, to add two 16-bit numbers, how
- 49:24many bits should we have in the
- 49:25register where we plan to store the
- 49:27result?
- 49:3116.
- 49:32No,
- 49:33to avoid an overflow, 17.
- 49:37And if all our registers are 16-bit, we
- 49:40can add the two numbers, but if they
- 49:42don't fit, we simply signal that an
- 49:44error has occurred. There you go.
- 49:48Accordingly, computing usually uses two
- 49:50flags for such error occurrences. One
- 49:53is overflow, and the second is carry.
- 49:58Right. We will talk about when they are
- 50:02used a bit later. Both overflow and
- 50:08carry are used as a signal of
- 50:09insufficient bit depth for our numbers,
- 50:12that is, going beyond the significant
- 50:14part of the number itself. That is the
- 50:17first observation. So, and also, yes,
- 50:20if you are, for example, adding two 16-
- 50:22bit numbers, we have determined that,
- 50:24well, the result must be at least 17
- 50:27bits. And if you multiply two 16-bit
- 50:31numbers, what is the size of the
- 50:33register you need, respectively, to
- 50:35store the result?
- 50:3832,
- 50:39yes, of course, 32 bits. So you
- 50:41understand, right, that with modern
- 50:43adders everything is still simple.
- 50:45There. But with the multiplication
- 50:48operation, we explicitly need twice the
- 50:51volume of our resulting register,
- 50:58double the volume compared to the
- 51:00incoming operands. That is the first
- 51:05problem. The second problem is, what do
- 51:10you think happens because we—oops,
- 51:12back again? Because we connected the
- 51:18elements in sequence like this.
- 51:23What? What?
- 51:23What?
- 51:26Well, yes, I agree with you there.
- 51:31Correct, the speed of the adder is
- 51:33significantly lower. Well, not
- 51:37significantly lower, but exactly as
- 51:39many times slower as there are bits in
- 51:41the adder compared to the performance
- 51:44of a single logic element. So, you have
- 51:48fed two numbers into it. Right. And
- 51:52physically, the output of each adder,
- 51:54due to the fact that the carry happens
- 51:56sequentially through all bits, causes
- 51:59the result to change, as it were,
- 52:01online, right? So, as if for the result
- 52:08to become correct, you need to wait a
- 52:09certain amount of time. If the trigger
- 52:13of one logic element is, say, time x,
- 52:16then you need to wait 16x to wait for
- 52:18the time when all 16 bits have
- 52:20triggered. And this can be quite
- 52:25critical in certain intervals, at
- 52:26certain moments. So, you must clearly
- 52:32understand that the performance of
- 52:34certain elements is, well, not as fast
- 52:36as the simplest logic operations in a
- 52:38computer. And the last thing I want to
- 52:43say about adders. The fact is that
- 52:45adders are part of the ALU. ALU in a
- 52:49machine stands for Arithmetic Logic
- 52:51Unit. And basically, it is intended to
- 52:56perform, as the name implies, hello,
- 52:58arithmetic and logical operations. We
- 53:02can see here that we have, accordingly,
- 53:04an arithmetic operation. Here we are
- 53:07calculating addition. What other
- 53:11arithmetic operation do you think an
- 53:13adder can perform?
- 53:15Subtraction. Due to what? Due to,
- 53:20well, due to the fact that a number can
- 53:22be represented as two's complement. We
- 53:23will talk about two's complement
- 53:25separately later. I am intentionally
- 53:28telling you things you might study in
- 53:30other subjects here, because you need
- 53:32to get a bit of a feel for it. Right.
- 53:35Accordingly, addition and subtraction
- 53:38on an adder. Modern processors don't
- 53:42just use an ALU; all the operations
- 53:44performed by the processor are handled
- 53:47by several such devices, which are
- 53:49called execution units. In other words,
- 53:52roughly speaking, they perform addition
- 53:54, subtraction, multiplication, and some
- 53:56other special functions. Right. And
- 53:58there isn't just one in the processor;
- 54:00there are many of them. For instance,
- 54:02there might be, say, four adders. Well,
- 54:05for example, in a modern Intel
- 54:07processor, I believe there are about
- 54:09sixteen execution units. Right. And
- 54:12each of them works in parallel; modern
- 54:15computers, or rather, processors, are
- 54:17superscalar, meaning they can perform
- 54:19several operations simultaneously. We
- 54:25will take a brief look at how that is
- 54:26done in other lectures. Let's move on.
- 54:30We have just a little bit left to
- 54:32understand how a computer works. The
- 54:37next important point that we need in
- 54:39computers, without which no computer
- 54:41works. It is sometimes also called the
- 54:45heart of the computer. That is the
- 54:47clock generator. What does the clock
- 54:49generator do?
- 54:50It provides a frequency signal,
- 54:52well, it generates pulses with a set
- 54:54frequency, and, well, some other
- 54:56parameters. The main point for us is
- 55:02that the frequency of these pulses must
- 55:04be constant. Why constant? Because we
- 55:11rely on the performance of our logic
- 55:13elements, and we set clock pulses such
- 55:15that all operations performed by our
- 55:17machine fit within a clock pulse. For
- 55:22example, if we need to add a 16-bit
- 55:25value, we must be absolutely certain
- 55:27that all these 16 addition operations
- 55:29happen. And that is why we cannot
- 55:35increase the frequency of clock
- 55:36generators. Well, not only for that
- 55:38reason, but just without limit. So,
- 55:41what is the frequency of the clock
- 55:42generator in modern computer processors
- 55:45?
- 55:45Well, tell me the limit. GHz.
- 55:49Well yes, typical values on your
- 55:51computer are 3 GHz, and 5 GHz is, I
- 55:53don't know, maybe with liquid cooling.
- 55:56Right. But they exist nonetheless.
- 55:59Well yes. Right. Accordingly, they do
- 56:04exist at a higher frequency, but
- 56:06working with them is not that simple,
- 56:08which we will discuss later. We are
- 56:13already approaching the physical
- 56:15limitations of our surrounding world. I
- 56:18mean, 3 GHz is very close to the speed
- 56:21of light. That is the maximum speed
- 56:24that we have in existence. What is that
- 56:26? Uh-huh. Nothing. Well, so, that is
- 56:30the first point. Every computer has a
- 56:33clock generator, at the frequency of
- 56:35which a regular central processor
- 56:37operates. The diagram of a clock
- 56:40generator is presented here. There are
- 56:43many different circuits like this. And
- 56:46this is one of the simplest clock
- 56:48generator circuits. Yeah. As you can
- 56:51see, the main element in it is a
- 56:53capacitor. The capacitor charges in a
- 56:55certain amount of time and discharges
- 56:57in a certain amount of time. There is a
- 57:00constant oscillatory circuit of charge
- 57:01and discharge of this capacitor
- 57:03happening here. Again, I won't go into
- 57:05the physics of the process so as not to
- 57:07confuse you. What is important is that
- 57:11at the output, thanks to the constant
- 57:13charging and discharging of this
- 57:15capacitor, you get a certain number of
- 57:17constant pulses with a set interval
- 57:19between them. The capacity determines
- 57:26the frequency; if the capacity is
- 57:28larger, the pulses will be longer,
- 57:30meaning the frequency will be lower.
- 57:34Yeah. In modern computers, instead of a
- 57:37capacitor, quartz resonators are
- 57:39usually used. Yeah. The principle is
- 57:43basically the same; they just allow for
- 57:45a more precise frequency measurement.
- 57:48Yeah. There is one single problem with
- 57:51clock generators in a computing machine
- 57:53. All the elements working inside one
- 57:57computer usually operate from a single
- 57:59clock generator. If you try to use two,
- 58:03your computer will most likely not work
- 58:06properly because between two pulses of
- 58:08two—even if they are absolutely
- 58:10identical—clock generators, what
- 58:12exists? A shift, or as people like to
- 58:16say, a phase shift, meaning the signal
- 58:18phase is different because they were,
- 58:20for instance, turned on at slightly
- 58:22different moments in time. Yeah. And
- 58:25accordingly, despite the frequency
- 58:27being the same, the phase is different,
- 58:29which is a significant obstacle to the
- 58:31joint operation of computing machines
- 58:33running on different clock generators.
- 58:37We will talk about this in detail in
- 58:38the next semester. We will discuss how
- 58:41to deal with this. For now, you just
- 58:43need to accept this, memorize it, and
- 58:45take it as a given. Questions? Yeah.
- 58:51Yes, the higher the frequency, the
- 58:54better,
- 58:56the more what?
- 59:00Well, yes, you increase the clock
- 59:02frequency of operations. Well, so to
- 59:07speak, it happens per clock cycle.
- 59:09Roughly speaking, if they are
- 59:10superscalar, they can do more than one
- 59:12operation per cycle, or maybe just one
- 59:14addition per cycle for your computer.
- 59:16So if it’s 3 GHz, then you’ll have
- 59:19what, milli...billion
- 59:21billions of operations per second,
- 59:22right? There. And if it’s four
- 59:25gigahertz 4 25 percent faster turned
- 59:34the knob, and everything immediately
- 59:36became fine. That doesn't happen. What
- 59:40do overclockers run into? The fact that
- 59:43you can turn the generator up.
- 59:46That’s the one, yes,
- 59:47yes, yes, yes, yes, yes, yes. The more
- 59:53you start turning it, the more heat you
- 59:54get.
- 1:00:00Oh, it’s a complex relationship. No,
- 1:00:03not linear. Then
- 1:00:09then, yes, the further you go, the
- 1:00:11closer you get to physical limitations,
- 1:00:13and accordingly, the harder it is to
- 1:00:15implement. And this is, to put it very
- 1:00:18roughly, in terms of physics—well, I
- 1:00:20don’t think we should delve into the
- 1:00:22physics of these processes, because
- 1:00:24it’s complicated and it depends
- 1:00:25heavily on the component base and how
- 1:00:27it’s made. So, it’s a whole
- 1:00:29different story. I also know the
- 1:00:31general point that the higher the
- 1:00:33frequency, the greater the [heat]. Well
- 1:00:39, at a low frequency, in principle,
- 1:00:42modern energy-saving computers, when
- 1:00:44you aren't doing anything, they
- 1:00:46intentionally lower the frequency so as
- 1:00:48not to waste energy unnecessarily. And
- 1:00:52my computer, like yours, probably,
- 1:00:54loves to do this right now. Sometimes
- 1:00:57it slowly drives you crazy when it does
- 1:00:59it at the wrong moment. Mine suffers
- 1:01:02from this. It has some kind of Chinese
- 1:01:04battery, and when it runs on battery,
- 1:01:06it sometimes drops the frequency to
- 1:01:07almost zero, and you have to put it to
- 1:01:09sleep and wake it up again. And after
- 1:01:11that, it starts working normally.
- 1:01:13That’s the glitch it has. Oh well.
- 1:01:16Well, that’s about it. We have, in
- 1:01:18principle, examined everything in order
- 1:01:20to understand how to put it all
- 1:01:22together and how to make a computer out
- 1:01:24of all these simplest elements. Let’s
- 1:01:28look at this using the example of a
- 1:01:30calculator. How does a calculator work?
- 1:01:34Mm, no, it doesn't work like that. Ah,
- 1:01:38well, let’s define from the user’s
- 1:01:41point of view how a calculator works.
- 1:01:43Usually, you know, a calculator, you
- 1:01:45type numbers into it. Accordingly, you
- 1:01:48enter the first number, press the
- 1:01:50operation, enter the second number, and
- 1:01:53press equals. What happens at the
- 1:01:57moment when you, er, type in, uh, the
- 1:01:59first, say, addition sign; what is
- 1:02:02going on inside the calculator? The
- 1:02:05screen flickers in a characteristic way
- 1:02:07, right? And what exactly is going on
- 1:02:10inside that flicker?
- 1:02:14No. So, again, this isn't magic. That
- 1:02:18is, the calculator only calculates
- 1:02:19because that's how people designed it.
- 1:02:23So, to see how a calculator counts,
- 1:02:25look closely at this simple calculator
- 1:02:27diagram. Strangely enough, it has two
- 1:02:30registers: register X and register Y.
- 1:02:33Register X and register Y. Yes. And, uh
- 1:02:39, accordingly, these registers hold,
- 1:02:41well, they register the exact number
- 1:02:43you see on your screen. Now, register Y
- 1:02:49is auxiliary; it's needed so that when
- 1:02:51you enter the first number and press
- 1:02:53the addition sign, it gets placed into
- 1:02:55that register. Well, to be stored there
- 1:02:58until some calculations are performed
- 1:03:00with it. Exactly. It's an intermediate
- 1:03:02buffer for storing that very first
- 1:03:04number that you enter. That's clear to
- 1:03:06everyone, right?
- 1:03:08Yes. Now, let's take a look at what our
- 1:03:10calculator is actually composed of,
- 1:03:12moving forward. We've already
- 1:03:15identified the two registers. Well, the
- 1:03:18registers can be of whatever bit-depth
- 1:03:20we need. Yes. Besides everything else,
- 1:03:23there's a screen. The contents of
- 1:03:27register X are sent to this screen, and
- 1:03:29it is displayed there at all times. In
- 1:03:37addition, the calculator has an
- 1:03:38arithmetic logic unit that performs all
- 1:03:40the operations we want the calculator
- 1:03:42to carry out. Now, in this case, to
- 1:03:48understand how a calculator works, we
- 1:03:50need to perform two—well, actually,
- 1:03:53three operations. We need to, uh, enter
- 1:03:56a zero. That will be one operation. See
- 1:03:58, it has a control signal U6, which is
- 1:04:00sent directly to the ALU. And,
- 1:04:02accordingly, as soon as we send it, the
- 1:04:04output will be zero. We also have,
- 1:04:09accordingly, operation U7, which means
- 1:04:12plus, and U8, which means a one-digit
- 1:04:14shift. A small digression is needed
- 1:04:18here. Our calculator doesn't work in
- 1:04:21binary, but in decimal. Do you know
- 1:04:24what the binary-coded decimal system is
- 1:04:26? Well, for everyone, that is, for
- 1:04:28those who know—that's good. For those
- 1:04:31who don't know—well, if we have a
- 1:04:33binary number represented simply by its
- 1:04:35bits, yes, and the weight of each bit
- 1:04:37can be determined by a known formula,
- 1:04:39then in binary-coded decimal, each
- 1:04:41digit of the number is represented by
- 1:04:43four bits. That is, the number itself,
- 1:04:47each digit, a decimal digit, is
- 1:04:49represented by binary numbers, and all
- 1:04:51together it's just a collection of
- 1:04:53several such digits in binary code.
- 1:04:56That is why it is called a binary-coded
- 1:04:58decimal number. Right. So, every digit
- 1:05:01is in binary code. The whole number is
- 1:05:04decimal. Our adder, our little screen.
- 1:05:07The screen, well, it's clear, it
- 1:05:08displays every decimal digit of this
- 1:05:10very number. And, accordingly, the
- 1:05:13arithmetic logic unit calculates in
- 1:05:15this binary-coded decimal system. Those
- 1:05:18exist as well. It looks a bit more
- 1:05:20complicated there than regular binary
- 1:05:22addition, but nevertheless, it exists.
- 1:05:25All the calculators that existed before
- 1:05:27, well, most of them, let's say, they
- 1:05:29all work in the binary-coded decimal
- 1:05:31system. Okay. What else do we see here
- 1:05:34in this picture? We see buttons, uh,
- 1:05:38which we usually press. And each press
- 1:05:45of this button leads to the fact that a
- 1:05:47special device inside the calculator,
- 1:05:49which is called the control unit—it
- 1:05:51is depicted as this blue square. As
- 1:05:58soon as you press any button, this
- 1:06:00device generates a sequence of pulses,
- 1:06:02which are then transmitted to our gates
- 1:06:03. You can see the gates on the diagram;
- 1:06:10they are depicted as those blue
- 1:06:12rectangles, and next to them are the
- 1:06:14control signals that control these
- 1:06:15gates. Well, that is, accordingly,
- 1:06:20there is U1, for example. What will
- 1:06:22opening gate U1 trigger? What does U1
- 1:06:30do? the output from register X, which
- 1:06:36directs to
- 1:06:38Correct. So, to put it more precisely,
- 1:06:42gate U1 triggers the transfer of
- 1:06:44information from register X to the left
- 1:06:46input of the ALU. What does gate, for
- 1:06:51example, U5 do? It takes this digit you
- 1:06:58entered, the code of this very digit in
- 1:07:01binary-coded decimal form, naturally,
- 1:07:03and feeds it to the right input of the
- 1:07:05ALU.
- 1:07:06Right. And what does gate 2 do? takes
- 1:07:11from the ALU to,
- 1:07:15that is, it writes the content
- 1:07:16currently at the ALU output into
- 1:07:18register X, and at the same time shows
- 1:07:20it on the screen, because, you see,
- 1:07:22register X is directly connected to the
- 1:07:24screen without any gates. Everything
- 1:07:29that is in register X, you see on that
- 1:07:31very screen. So, the control unit, when
- 1:07:36you type and press a button, simply
- 1:07:38generates a series of sequences of
- 1:07:40these very pulses to our gates, to U1,
- 1:07:42U2, and U3. Let's take a look at what
- 1:07:48we need to do to perform a calculation
- 1:07:50on the calculator using our circuit and
- 1:07:52our control unit. So, when we input the
- 1:07:58first digit of a number, what must we
- 1:08:00do? Well, our screen is still empty.
- 1:08:05Here is what we must do. We pressed the
- 1:08:07first digit. What should we logically
- 1:08:09do?
- 1:08:12Well, that's right. I mean, we pressed
- 1:08:14it, but it isn't saved anywhere yet.
- 1:08:16Where should we save this value?
- 1:08:19To the X register, yes. Accordingly,
- 1:08:24from the perspective of the pulse
- 1:08:26sequence, let's take a close look at
- 1:08:27what happens. Here on the timing
- 1:08:32diagram, we have the clock generator
- 1:08:34pulses drawn. There. And as soon as we
- 1:08:39press any first digit, let's say it's
- 1:08:41the number seven, the control unit
- 1:08:42issues a series of these pulses. The
- 1:08:45first of these pulses will be U3. Look,
- 1:08:48you see, it's drawn here as U3. What
- 1:08:52does U3 do?
- 1:08:58It transfers from X to Y, right? I mean
- 1:09:01, the logic of the operation suggests
- 1:09:03that whatever was in the X register,
- 1:09:05since we are entering a new digit, the
- 1:09:07first digit of a new number, needs to
- 1:09:09be saved somewhere. Right? Where to
- 1:09:11save it? We don't have a second place
- 1:09:12in the calculator. There is only the Y
- 1:09:14register. So, the first value will be
- 1:09:17the transfer of information from the X
- 1:09:19register to the Y register. What
- 1:09:22happens in the second cycle?
- 1:09:28Which control signals will be executed?
- 1:09:32I can't hear you.
- 1:09:34U2 and...
- 1:09:36U2 and U6. What does that mean, exactly
- 1:09:39? It will return a zero and place it in
- 1:09:43X,
- 1:09:44right? We need to reset the X register.
- 1:09:46So we take a zero. Our ALU generates a
- 1:09:49zero by applying this control signal,
- 1:09:51and then by opening gate 2, this zero
- 1:09:53will move to the X register. What needs
- 1:09:56to be done in the next cycle?
- 1:09:59In the next cycle, you must...well, as
- 1:10:02we see in the diagram, we apply pulses
- 1:10:05U1, U5, and U7. Here is what they do
- 1:10:09and which gates they open. U1 sends the
- 1:10:12X register to the left input of the ALU
- 1:10:15. U5...
- 1:10:19is the digit pressed on the calculator.
- 1:10:22This seven of ours is sent to the right
- 1:10:24input of the ALU. What is U7? The
- 1:10:30addition operation. Accordingly, the
- 1:10:34sum of these values is produced, and
- 1:10:36they are currently inside our ALU. The
- 1:10:40next thing that should happen is...and
- 1:10:44that's it. And this number seven will
- 1:10:46be written to the X register and will
- 1:10:48appear on our screen. We pressed the
- 1:10:51button, and some computer secretly and
- 1:10:53magically did its work. The digit seven
- 1:10:56appeared on the screen. All the magic
- 1:10:59is carried out by this sequential
- 1:11:01sending of pulses to the gates. The
- 1:11:05information was transmitted from one
- 1:11:07place, so it was recorded and appeared
- 1:11:09on your screen. Understood? The first
- 1:11:13thing is, well, pressing one button. If
- 1:11:17you don't understand, speak up, who
- 1:11:19doesn't understand?
- 1:11:22Then why are we silent when I ask if
- 1:11:23it's understood?
- 1:11:25It doesn't matter when the question
- 1:11:27comes, right? Or look, first we have y7
- 1:11:32, then Y1, then Y5, like they are not
- 1:11:35sequential,
- 1:11:36they arrive simultaneously. This is a
- 1:11:38clock cycle.
- 1:11:39So, what does the control unit do? It,
- 1:11:42uh, you pressed the button, and the
- 1:11:44button serves as a signal that a
- 1:11:45program is embedded in every pulse of
- 1:11:47the clock generator. Only this program
- 1:11:51isn't like the programming languages
- 1:11:53you're used to, but rather a sequence
- 1:11:54of binary numbers sent to the control
- 1:11:56unit. You press it, and each cycle
- 1:11:59emits its own sequence of numbers. And
- 1:12:01this sequence of numbers causes a state
- 1:12:03change in the entire device.
- 1:12:07Aha. Yes, why do you think the value is
- 1:12:11only written at the end on the third
- 1:12:13step?
- 1:12:16That's how people wrote the program.
- 1:12:19Well, I mean, that's how the programmer
- 1:12:23made it.
- 1:12:25Are all the gates closed by default?
- 1:12:26Yes, all gates are closed by default.
- 1:12:29They open only at the moment our
- 1:12:31control unit emits a series of these
- 1:12:33very pulses.
- 1:12:36Yes. Next. Let's reinforce the results
- 1:12:43we've obtained. Suppose we are entering
- 1:12:46the second and subsequent digits of a
- 1:12:48number. So, we had a seven on the
- 1:12:50screen, and we enter the digit five.
- 1:12:53Look at how smart we are. What should
- 1:12:55happen next when the second digit is
- 1:12:56entered? Our control unit must generate
- 1:12:59a sequence of pulses again. Let's take
- 1:13:01a look at what these pulses are and
- 1:13:03what they do. First. In the first cycle
- 1:13:07, pulses U1 and U8 will be emitted.
- 1:13:10What is this? Saving to
- 1:13:17this means gate U1 sends the contents
- 1:13:19of register X to the left input of the
- 1:13:21ALU.
- 1:13:23Shift.
- 1:13:24ALU. There is a zero at the right input
- 1:13:26of the ALU, so there is nothing there
- 1:13:27as such. And, accordingly, the
- 1:13:29operation we feed into the ALU is a
- 1:13:31shift. As a result, the ALU will shift
- 1:13:34the received number seven one digit to
- 1:13:36the left. There. And, accordingly, we
- 1:13:38get the number 70. Well, that is,
- 1:13:41roughly speaking, correct, inside the
- 1:13:43ALU. What should we do next? Next, we
- 1:13:46need to rewrite this into register X,
- 1:13:48right? Which gate exists for this?
- 1:13:52U2. Let's look at the cycle. We see
- 1:13:56that, uh, accordingly, U2 is emitted in
- 1:13:58the next cycle. Next cycle. Gates U1,
- 1:14:03U5, and U7 are emitted. What do they do
- 1:14:07?
- 1:14:11They take the digit you pressed. That's
- 1:14:13five. They feed it to the right input
- 1:14:16of the ALU. Gate U1 feeds X to the left
- 1:14:18input of the ALU. Gate U7. What is this
- 1:14:24?
- 1:14:24Addition.
- 1:14:25Addition. We add five to seventy, right
- 1:14:27? That makes 75. This 75 is currently
- 1:14:32in the ALU. Accordingly, what should be
- 1:14:35next?
- 1:14:36Write to register X. Pulse 2.
- 1:14:40Excellent. We now have 75. And what is
- 1:14:44left for us to do? Now we have to
- 1:14:47perform the operation itself with the
- 1:14:48previous number. Now, what we have in
- 1:14:53the register needs to be added to
- 1:14:54register X. Suppose we pressed,
- 1:14:56conditionally speaking, the button on
- 1:14:58our calculator. Accordingly, the first
- 1:15:02thing we need to do is open our
- 1:15:05favorite gates U1, U4, and U 7—not U5
- 1:15:08, but U4. U4 is the gate between
- 1:15:10register Y and the right input of the
- 1:15:12ALU. That is, we feed the contents of
- 1:15:14register Y to the right input of the
- 1:15:16ALU. Accordingly, what is gate U1? The
- 1:15:20contents of register X to the left. Are
- 1:15:24you following? What is U7?
- 1:15:28Addition. Now we have the sum of
- 1:15:31register Y and register X, which is,
- 1:15:33accordingly, in the ALU. What do we
- 1:15:36have left to do?
- 1:15:40Well, write it to register X and
- 1:15:42thereby display it on the screen. Gate
- 1:15:44U2 is intended for this. Trigger U2.
- 1:15:47Bam. The sum is on the screen. Magic.
- 1:15:50Magic.
- 1:15:51Magic. Now you all know how a computer
- 1:15:57works.
- 1:15:58They all work exactly like this.
- 1:16:03Basically, you use various control
- 1:16:05devices there to issue sequences of
- 1:16:07pulses and, accordingly, force
- 1:16:08information to be transferred from one
- 1:16:11register to another. That's it. There
- 1:16:16is nothing else in any computer. I
- 1:16:19guarantee it.
- 1:16:21Questions? What are they doing?
About this transcript
This page contains the full transcript of ОПД #1-3. Элементы и принципы функционирования ЭВМ by Serge Klimenkov, generated from the public captions YouTube serves with the video. The transcript has 10,415 words across 1,654 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.