YouTube2Text

ОПД #1-3. Элементы и принципы функционирования ЭВМ — Transcript

by Serge Klimenkov · 10,415 words · 1,654 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Today we need to, well, strictly
  2. 0:02speaking, figure out how any computing
  3. 0:05machine actually works. And at the
  4. 0:09beginning of the lecture, well,
  5. 0:10respectively, one of my favorite jokes,
  6. 0:13right, this thing on the picture to the
  7. 0:15right, what is that?
  8. 0:19Uh.
  9. 0:20Transformator.
  10. 0:21A transformer, yes. How does it work?
  11. 0:23One, zero. Well.
  12. 0:26The trans-form-a-tor.
  13. 0:28No, you remember the joke, right? A
  14. 0:30professor asks a student on an exam how
  15. 0:33a transformer works, what did the
  16. 0:35student answer? Mmm, yeah. So, well,
  17. 0:42currently, uh, respectively, in this
  18. 0:44light is most likely where your
  19. 0:46knowledge stands regarding how any
  20. 0:48computing machine works. Meaning, when
  21. 0:52they ask you how it works—
  22. 0:58No, well, I get it, yeah. And,
  23. 1:00respectively, well, like, the, uh—
  24. 1:04The screen lights up, right, the mouse
  25. 1:06moves, the computer works. That’s
  26. 1:09about the level of understanding that
  27. 1:11usually exists in your heads, because,
  28. 1:13well, in principle it’s not your
  29. 1:15fault, as you aren't really obligated
  30. 1:17to know what actually happens inside a
  31. 1:19computing machine in reality. Well,
  32. 1:22what do you think is happening in there
  33. 1:24? Signal.
  34. 1:26Ah, yes.
  35. 1:28There are ones and zeros.
  36. 1:30Ones and zeros, got it. But you see,
  37. 1:32this is just you talking right now,
  38. 1:34meaning you have this sort of bag, and
  39. 1:36in there, you know, there are ones,
  40. 1:38zeros, signals, so you sort of look in
  41. 1:40there and think, "My God, what is this?
  42. 1:42" Right. And can anyone else say, more
  43. 1:45specifically, how it works? There are
  44. 1:49zeros. Zeros are the absence of voltage
  45. 1:51, and the rest is voltage. Not exactly
  46. 1:55absence, it's just how the computer
  47. 1:57translates into binary, sort of more or
  48. 2:00less.
  49. 2:01And what do you do with this binary
  50. 2:03system next? Well, alright, okay. What?
  51. 2:21Well, once again, I believe you
  52. 2:23shouldn't have to know this yet, see.
  53. 2:27But right now your, well, assumptions
  54. 2:29are at a caveman level, because you
  55. 2:30can't connect, uh, this glowing blue
  56. 2:32screen with the operating system, like,
  57. 2:34Windows, to the fact that there are
  58. 2:36some ones and zeros inside. Meaning,
  59. 2:39for you, there are—you’ve heard
  60. 2:41that there are ones and zeros, and
  61. 2:43you’ve seen this very blue screen,
  62. 2:45but everything in between is this big,
  63. 2:47big, black emptiness—or, well, blue,
  64. 2:49by now.
  65. 2:51Well yeah, I completely agree with you
  66. 2:53regarding the blue screen. Second, so,
  67. 2:56here is a little Easter egg for you.
  68. 2:59Look at the pictures on the left. Who
  69. 3:01is that? What is she doing?
  70. 3:05That's Trinity from The Matrix.
  71. 3:06Right, excellent. The correct answer is
  72. 3:08Trinity from The Matrix. What is she
  73. 3:10doing? At that moment, information is
  74. 3:13being uploaded to her. I remember parts
  75. 3:15of it.
  76. 3:17Ah, well the correct answer is that, at
  77. 3:19that moment in time, a helicopter
  78. 3:21piloting program is being uploaded into
  79. 3:24her.
  80. 3:24There. And, accordingly, it literally
  81. 3:26takes a second, she blinks her eyes,
  82. 3:27meaning the upload is happening, and
  83. 3:29then he says something like "Let's go,
  84. 3:31we're flying." So, today, after this
  85. 3:33lecture ends, you should all roughly
  86. 3:35know how a computer works. I will try,
  87. 3:37in our slightly less than an hour and a
  88. 3:39half—in reality, our lecture is quite
  89. 3:41short—to upload into you information
  90. 3:43about how any computing machine works.
  91. 3:46And later on in the course, we will
  92. 3:48develop this knowledge a little bit
  93. 3:49with you. Oh, for starters, we still
  94. 3:59need to talk a little bit about history
  95. 4:01. That is, in principle, to understand
  96. 4:05how various signals coexist inside a
  97. 4:07computer, let’s, uh, recall, well,
  98. 4:09generally, how people actually tried to
  99. 4:12do calculations in the somewhat recent,
  100. 4:14foreseeable past. And it's clear that
  101. 4:19the first computing machines were
  102. 4:21analog, and
  103. 4:29we say "digital," but there are also
  104. 4:31analog computing machines.
  105. 4:36And how are calculations performed in
  106. 4:38those analog computing machines? No,
  107. 4:41well, some kind of proportional value,
  108. 4:44or...
  109. 4:45Well yes, you're starting to say more
  110. 4:47or less the right things here. In
  111. 4:50analog computing machines, there is, uh
  112. 4:53, accordingly, some real signal that
  113. 4:55exists in the real world, or a real
  114. 4:57measured quantity. And it is always
  115. 5:01mapped to a value that we call an
  116. 5:03analog. For example, you have a picture
  117. 5:08presented on the slide. Well, I don't
  118. 5:10know, this is a characteristic, one of
  119. 5:12the characteristic examples is an
  120. 5:14altimeter. And, accordingly, how do you
  121. 5:17measure the altitude of a flying object
  122. 5:19from the ground? Well, accordingly,
  123. 5:23there are corresponding devices; you
  124. 5:25can look at the pressure difference to
  125. 5:27determine the altitude approximately.
  126. 5:30Or you could use some kind of sonar
  127. 5:31based on the speed of the signal, where
  128. 5:33they send a signal to the ground, and
  129. 5:35then calculate the delay of how long it
  130. 5:37takes to come back. There. And, uh,
  131. 5:40accordingly, we have a real parameter.
  132. 5:42The real parameter is, for instance,
  133. 5:44altitude. There. And inside all
  134. 5:47computing devices, it is mapped to a
  135. 5:50voltage analog. A voltage that changes
  136. 5:54according to the same law as the real
  137. 5:56parameter changes. So, here we have an
  138. 6:02airplane flying; see, a mountain has
  139. 6:04formed there, so the altitude above the
  140. 6:06ground will change for us, and the
  141. 6:08sensors will detect this altitude and
  142. 6:11voltage, which, in this case, increases
  143. 6:13proportionally to the altitude. Though,
  144. 6:18in a real sensor, it would most likely
  145. 6:20decrease. Yeah. So, it would be an
  146. 6:22inverse image. Yeah. But again, we need
  147. 6:27to understand that both our measured
  148. 6:29parameter and the one we set as an
  149. 6:31analog—we are essentially trying to
  150. 6:33ensure they follow the same law. And
  151. 6:37most importantly, these two quantities
  152. 6:40are continuous. We can't, strictly
  153. 6:43speaking, make the altitude discrete,
  154. 6:45with some kind of steps in that
  155. 6:47altitude. Well, in reality, in the
  156. 6:50modern world, of course, this
  157. 6:52discretization does happen, and we will
  158. 6:55still have steps, but the step will be
  159. 6:57so tiny that it will be
  160. 6:58indistinguishable to us. Yeah. And,
  161. 7:02accordingly, we have a certain
  162. 7:03continuous signal from the sensor. And,
  163. 7:08accordingly, there is a continuously
  164. 7:10changing altitude and a continuous
  165. 7:12voltage used at the sensor output. You
  166. 7:17can do something with this voltage.
  167. 7:19Well, based on the principle of analog
  168. 7:22computers, a great many different
  169. 7:24devices exist. One of the well-known
  170. 7:27ones—I don't know if you used them in
  171. 7:29school or not—is the slide rule,
  172. 7:31which can perform fairly complex
  173. 7:33calculations. Yeah. And, in general, I
  174. 7:36was taught in school; I didn't really
  175. 7:38have computers as such, just the first
  176. 7:40calculators were appearing, and we had
  177. 7:42Bradis tables and slide rules. And we
  178. 7:44all calculated everything happily. On
  179. 7:46them. So, analog computers still exist
  180. 7:52today. Moreover, you can't get away
  181. 7:58from them in real life because,
  182. 8:00compared to digital computers, they
  183. 8:02have very high speed for a certain
  184. 8:04class of tasks. Digital computers
  185. 8:09simply cannot match the speed of analog
  186. 8:11computers for a certain class of
  187. 8:13operations. What do you think, then,
  188. 8:17which operations do digital computers
  189. 8:19perform worse than analog ones?
  190. 8:27Constant change of a number.
  191. 8:30Mm, heat.
  192. 8:32Fast. Or, for example, when something
  193. 8:35is measured periodically,
  194. 8:38when the signal is continuous.
  195. 8:40Well, in analog computers, the signal
  196. 8:43is always continuous. The question is
  197. 8:46simply what to do with this signal.
  198. 8:48Well, for example, okay, let's assume
  199. 8:50we are measuring altitude. Suppose we
  200. 8:53have two planes flying, and accordingly
  201. 8:55, we need to know—I don't know why,
  202. 8:58but—the total altitude of both planes
  203. 9:00at once. How can we perform this
  204. 9:03mathematical operation using voltage?
  205. 9:07What, like, how do we add two analog
  206. 9:09values? Apply it.
  207. 9:15Louder. Well, just apply it.
  208. 9:19Well, yes, simply connect two wires,
  209. 9:21figuratively speaking, and at the
  210. 9:23output, the amplitude will be twice as
  211. 9:26large as needed. Can you imagine how
  212. 9:28simple it is to add analog values? You
  213. 9:31just took two wires, connected them,
  214. 9:32and added them together. Now, with
  215. 9:34subtraction, it's a bit more
  216. 9:36complicated. Yeah. And so special
  217. 9:38devices are needed for that; addition,
  218. 9:40however, is very simple. But, uh,
  219. 9:43accordingly, in a computing machine,
  220. 9:45what do you need to do to add—all
  221. 9:47those things we'll talk about today,
  222. 9:49like adders—it's a fairly large
  223. 9:51number of different things just to take
  224. 9:53two binary numbers and add them. Yeah.
  225. 9:57But in analog, everything is very
  226. 9:59simple. And, uh, moreover, there are,
  227. 10:02as I said......machine is built, they
  228. 10:09will still be slower. Such operations
  229. 10:11include integration and differentiation
  230. 10:14. Yeah. And, uh, accordingly, like how
  231. 10:19we were taught in school, that you have
  232. 10:21to use all those primitives—oh, not
  233. 10:23primitives, those tables—yourself
  234. 10:25according to the rules of derivatives,
  235. 10:28which......well, that is, like, read...
  236. 10:36...and, accordingly, numerical methods.
  237. 10:39Yeah. The machine places a small
  238. 10:42element that performs this
  239. 10:44differentiation online, right on the
  240. 10:46fly. That is, a signal arrives at the
  241. 10:49input, the derivative is taken
  242. 10:51immediately, and it happens in
  243. 10:53real-time. A computer can never handle
  244. 10:56that. Accordingly, how do you think,
  245. 11:00for example, a sine is calculated in an
  246. 11:02analog computer?
  247. 11:04Fast, obviously. By applying...Well, in
  248. 11:07what way can you calculate, for example
  249. 11:10, a sine?
  250. 11:16Ah, well, just apply alternating
  251. 11:18voltage.
  252. 11:22Hmm, you are very close to the correct
  253. 11:25answer. And, in fact, it's
  254. 11:26approximately like that. Well, that is,
  255. 11:28uh, from the gallery above, they are
  256. 11:30suggesting that you need to somehow
  257. 11:32construct a triangle and, accordingly,
  258. 11:34calculate that specific ratio. In
  259. 11:36reality, the computational operation of
  260. 11:39sine and cosine is performed by
  261. 11:41so-called rotating transformers. That
  262. 11:43is, there is an armature, and it turns
  263. 11:45at a certain angle relative to the
  264. 11:47windings, and accordingly, a current is
  265. 11:50induced in the windings that is
  266. 11:51precisely proportional to the sine and
  267. 11:54cosine of the voltage. It corresponds
  268. 11:56there. There you go. And furthermore,
  269. 11:59the guys who go to the military
  270. 12:00department will most likely even see
  271. 12:03analog computing and problem-solving
  272. 12:05devices. They are quite specific, as
  273. 12:06they were primarily used back in the
  274. 12:08day for various fire control tasks.
  275. 12:10There. But we were still taught them at
  276. 12:12the military department. It's a huge
  277. 12:13room, like that. And there's a bunch of
  278. 12:15all sorts of devices that rotate and
  279. 12:17move around. I mean, when you, uh,
  280. 12:19conditionally speaking, enter
  281. 12:21coordinates or a ship's bearing, the
  282. 12:23whole room comes to life, starts
  283. 12:25buzzing, everything moves, and it,
  284. 12:27accordingly, remembers the, well,
  285. 12:28conditionally speaking, the bearing you
  286. 12:31entered, and then you can fire a
  287. 12:32torpedo. So, uh, accordingly, analog
  288. 12:37computers are cool, that is, they are
  289. 12:40now used mainly, well, in all sorts of
  290. 12:42devices that require, well, first of
  291. 12:45all, real-time computation. And
  292. 12:50basically, they are used in control,
  293. 12:52well, in control computing systems,
  294. 12:55that is, those related to space,
  295. 12:57airplanes, and so on. Not all of them,
  296. 13:01of course, but parts of these analog
  297. 13:03computers are now quite strongly
  298. 13:05integrated with digital ones in their
  299. 13:07analog sections, and together they
  300. 13:09perform certain mathematical operations
  301. 13:11. And another advantage, besides high
  302. 13:19performance for such a narrow class of
  303. 13:21tasks, is that, in principle, the total
  304. 13:24calculation error of analog computers
  305. 13:26is lower. But the thing is, error has
  306. 13:31the property of accumulating over time.
  307. 13:34Yeah. But with an analog one, it has
  308. 13:37its resolution, and that's about what
  309. 13:39you'll get at the output. Well, with
  310. 13:43certain reservations, of course. So,
  311. 13:49what are we actually supposed to do? Uh
  312. 13:54, how do we, in principle, work with
  313. 13:56this analog voltage? Well, smart people
  314. 14:02know that since analog voltage repeats
  315. 14:05our value, we usually need to calculate
  316. 14:07it in some way. I mean, the final
  317. 14:12result that we want to see must be
  318. 14:13prepared in some way for a person. If I
  319. 14:18have a voltage change graph and a
  320. 14:20voltmeter, well, for you, it usually
  321. 14:22means nothing, just some kind of value.
  322. 14:25It's difficult for a human to perceive
  323. 14:27analog values directly. And in order to
  324. 14:32convert them and potentially use them
  325. 14:34later in digital machines, we need to
  326. 14:36find a way to determine what the
  327. 14:38voltage value is at the output of our
  328. 14:40analog computing device at any given
  329. 14:42moment. And, well, accordingly, people,
  330. 14:47uh, they took a fairly simple approach.
  331. 14:50They created, well, sort of a special
  332. 14:52scale. An example of this very
  333. 14:55discretization of an analog value into
  334. 14:57several levels is shown here on the
  335. 14:59slide. And, accordingly, with the help
  336. 15:03of, well, strangely enough, complex
  337. 15:05technical solutions, the voltage at the
  338. 15:08output of your analog computing device
  339. 15:10is compared with, well, with this, uh,
  340. 15:13specific value set for us. For example,
  341. 15:16we have 1 volt. So, we take the value
  342. 15:18and compare it to one volt, whether
  343. 15:20it’s higher or lower. Then the next
  344. 15:22one, two, three, and so on. And so we
  345. 15:24can obtain a real voltage value with a
  346. 15:27certain, well, degree of resolution.
  347. 15:30Right. And this part in analog
  348. 15:32computers. Calculating a sine or an
  349. 15:34integral is not difficult, it’s
  350. 15:36actually quite simple. But, uh,
  351. 15:39accordingly, to output, that is, to
  352. 15:41measure that voltage with sufficient
  353. 15:44accuracy is usually, well, not always
  354. 15:46very easy. Right. And this is linked
  355. 15:51precisely to the errors of the
  356. 15:52resolution device itself. Accordingly,
  357. 15:55all these devices were complex, and
  358. 15:57people thought, "How can we get rid of
  359. 16:00this?" That is, if we take this analog
  360. 16:04signal and it changes, and we try to
  361. 16:06measure it, and each time we make some
  362. 16:08error in that measurement, how do we
  363. 16:10make it so that, well, we make fewer
  364. 16:12mistakes? Well, smart people, they
  365. 16:19thought, "Let's not do it that way;
  366. 16:21let's just make two signal levels." It
  367. 16:23will be quite simple to measure them.
  368. 16:25Right. And, accordingly, we will
  369. 16:27perceive this information only as zero
  370. 16:29or one at a specific moment in time,
  371. 16:31and, accordingly, transmit these pulses
  372. 16:33of information in batches. That is how
  373. 16:36digital computers appeared. Well, more
  374. 16:38on that in the next slide. To finish
  375. 16:40with analog computers, I will say once
  376. 16:42more to you that they still exist today
  377. 16:47. Well, uh, for such, let's say,
  378. 16:49general-purpose analog computers or,
  379. 16:52well, like computers, you know,
  380. 16:54computers that we as users are used to,
  381. 16:56typing things in, using our
  382. 16:58applications. There are certainly no
  383. 17:00analog computers of that same principle
  384. 17:02, of course. So, you can't just take
  385. 17:06and program any arbitrary program on an
  386. 17:08analog computer right now. In my youth,
  387. 17:13I even saw these kinds of
  388. 17:15general-purpose analog computers. And
  389. 17:18they looked like a large stand. There
  390. 17:20were various elements inside this stand
  391. 17:22. And they were connected to each other
  392. 17:24. Essentially, you would assemble an
  393. 17:27analog computing circuit, feed signals
  394. 17:29into the input, and take something from
  395. 17:31the output. Right. But, in principle,
  396. 17:36they used to exist as general-purpose
  397. 17:38machines, occupying a huge amount of
  398. 17:40space because the analog devices
  399. 17:42themselves, which performed the analog
  400. 17:44operations, were quite bulky. Take that
  401. 17:49fire control system at the military
  402. 17:51department, for instance—it took up
  403. 17:53an entire room of about 30 meters. It
  404. 17:56was set up along the wall in an L-shape
  405. 17:58. Right. And on the opposite wall, its
  406. 18:01diagrams were hanging. Right. So,
  407. 18:03imagine, a diagram covering the entire
  408. 18:06wall. Right. And that was just one
  409. 18:08small block from this device. And our
  410. 18:10captains loved to grill us using these
  411. 18:12diagrams. "What is this thing for?"
  412. 18:14Well, and as always, we never really
  413. 18:16answered properly. Right. Uh, what's
  414. 18:24next? Then computers appeared. And as I
  415. 18:31already said, let's replace the many
  416. 18:34signal levels with just two and decide
  417. 18:36that we will have either a zero or a
  418. 18:38one, defined by specific voltage levels
  419. 18:40. On the slide, you can see this signal
  420. 18:47in its ideal form, as a rectangle, just
  421. 18:49as it is usually depicted in various
  422. 18:52timing diagrams. And, naturally, the
  423. 18:56real signal that you might see on an
  424. 18:58oscilloscope screen if you ever wanted
  425. 19:00to look inside your computer to see
  426. 19:02what's happening. Well, and these
  427. 19:06voltages, depending on the logic, can
  428. 19:09vary. Here on the slide, we have what's
  429. 19:12called TTL logic. And, accordingly,
  430. 19:16this logic has two levels. The lower
  431. 19:19level is the signal that is perceived
  432. 19:21as a zero. There is a corresponding
  433. 19:24upper level, above which the signal is
  434. 19:26perceived as a one. If the signal is,
  435. 19:29accordingly, between these two levels,
  436. 19:31what happens? Well, that's an undefined
  437. 19:36state, right? So, we can't accurately
  438. 19:40say what kind of signal it is. Moreover
  439. 19:43, each element, due to its own physical
  440. 19:45parameters and characteristics, will
  441. 19:47have some components interpret it as a
  442. 19:49one, while others interpret it as a
  443. 19:51zero. Consequently, chaos, confusion,
  444. 19:54and disorder occur in the computer at
  445. 19:56that moment. Accordingly, uh, therefore
  446. 20:02, well, any computing devices are
  447. 20:04designed so that they can clearly
  448. 20:06determine which signal is present at
  449. 20:11the output in a given case. Well, and
  450. 20:14you can see that here, compared to the
  451. 20:16previous slide, it is actually much
  452. 20:18easier to determine a zero or a one
  453. 20:21than to choose one level out of, say,
  454. 20:23256. Yeah. So, the circuit will be
  455. 20:27substantially simpler. Yeah. Well, and
  456. 20:32digital computers, naturally, conquered
  457. 20:35, uh, accordingly, uh, what they would
  458. 20:41call the market in the modern world.
  459. 20:43Yeah. And before, they simply, well,
  460. 20:45people learned how to make them, uh,
  461. 20:48substantially, that is, make them
  462. 20:50simpler than analog ones. And,
  463. 20:54accordingly, the base of any digital
  464. 20:56computer is logic gates. You are well
  465. 21:00familiar with logic gates as such. I
  466. 21:03probably don't need to explain what
  467. 21:05they are. Well, uh, the functions,
  468. 21:08which, well, naturally, an inexhaustive
  469. 21:11list of functions that logic gates
  470. 21:13perform, are presented here on your
  471. 21:15slide. Well, the only thing I did was
  472. 21:18present this in two notations. The
  473. 21:22notation adopted in our electronic
  474. 21:24circuits corresponding to GOST and,
  475. 21:26accordingly, uh, the notation according
  476. 21:29to American standards. You will most
  477. 21:34likely encounter them in all modern,
  478. 21:36well, development tools for computing
  479. 21:38components and electronic devices. That
  480. 21:41is, there you most likely won't see our
  481. 21:44GOST designations. Yeah. Uh,
  482. 21:46accordingly, how is the function of a
  483. 21:49logic gate defined? Tell me, please.
  484. 21:54Mm,
  485. 21:54a table,
  486. 21:55yes, truth tables. Well, I, accordingly
  487. 21:58, have presented these very, these very
  488. 22:00truth tables to you on the right. Well,
  489. 22:02you can see them. Well, and I provided,
  490. 22:05uh, accordingly, a few well-known
  491. 22:07functions as examples. And in general,
  492. 22:10I hope you won't have any problems with
  493. 22:16truth tables; you should have covered
  494. 22:18this in computer science, and now they
  495. 22:20are probably, uh, accordingly, talking
  496. 22:22about it in discrete math, right? That
  497. 22:25is, as it were, here at the university
  498. 22:27they will teach you to interact with
  499. 22:29logical functions as such in principle.
  500. 22:31The only thing I wanted to add here is
  501. 22:33to show, accordingly, uh, how they look
  502. 22:36as integrated circuits. That is, well,
  503. 22:39I am showing you here the package of
  504. 22:41one of the famous series of chips from
  505. 22:43back in the day. Well, and usually, in
  506. 22:46a package like this, there were four
  507. 22:48elements. Accordingly, well, this is,
  508. 22:51for example, a chip, it is indicated as
  509. 22:56having 14 pins. Well, accordingly,
  510. 23:00those 14 pins include, uh, 12 pins for
  511. 23:03the elements, right? That is, as it
  512. 23:06were, why 12? Because there are two
  513. 23:09inputs and one output, four elements
  514. 23:11multiplied by three, we get 12 pins.
  515. 23:13And what are the other two for?
  516. 23:18Power and the common ground wire,
  517. 23:20because electricity usually flows in a
  518. 23:22closed circuit. There. Accordingly, all
  519. 23:27of this together adds up to 14 pins.
  520. 23:30The types of these modern packages are
  521. 23:32very diverse. That is, if you look
  522. 23:35inside your computer, you will see a
  523. 23:37huge microchip there with a bunch of
  524. 23:39pins around it. Or you might see tiny,
  525. 23:42barely noticeable microchips. The world
  526. 23:47, compared to the one I knew, has
  527. 23:49changed significantly in terms of the
  528. 23:52physical form factor of microchips. But
  529. 23:56, accordingly, the first computers were
  530. 23:58built entirely on such logic elements.
  531. 24:03So, if you open up some old computer,
  532. 24:05you will see that they completely cover
  533. 24:07the circuit board. And to talk further
  534. 24:20about how a computer works, we need to
  535. 24:22understand how we store, transmit, and
  536. 24:24process information. Well. On the slide
  537. 24:32, you see two typical computer, two
  538. 24:40diagrams for storage, which show modern
  539. 24:43storage of information inside a
  540. 24:45computing machine. There are two ways
  541. 24:49to store information, with so-called
  542. 24:51static memory existing. That is SDRAM
  543. 24:55and dynamic memory. You use dynamic
  544. 24:58memory as your main RAM. You have seen
  545. 25:02those DRAM modules that are inserted
  546. 25:04into your computer. They are designed
  547. 25:08exactly as shown in the picture on the
  548. 25:10right. Accordingly, where do you think
  549. 25:14the information is stored here? It is
  550. 25:16clear that it must store either a one
  551. 25:18or a zero. And each of these elements.
  552. 25:20So where is the information stored in
  553. 25:22DRAM? A capacitor.
  554. 25:24No, actually,
  555. 25:27the transistor is used as a charging
  556. 25:29and discharging circuit. The
  557. 25:32information is stored on the capacitor,
  558. 25:34but the catch is that this capacitor
  559. 25:36does not exist. It is actually part of
  560. 25:39the transistor. This is called
  561. 25:41parasitic capacitance. There. And like
  562. 25:44any capacitor—do you know how a
  563. 25:46capacitor works, what a capacitor does?
  564. 25:49You can think of it like this: when
  565. 25:51studying electricity, an analogy with
  566. 25:53water is often used up to a certain
  567. 25:55level of abstraction. A capacitor is
  568. 25:58like a leaky glass. You can,
  569. 26:01figuratively speaking, pour water into
  570. 26:03it and store some amount of energy
  571. 26:05there. Accordingly, the voltage level
  572. 26:09at the capacitor's output will
  573. 26:11correspond to the water level. There.
  574. 26:14But, uh, real capacitors—in an ideal
  575. 26:16capacitor the cup would be, well,
  576. 26:18normal, with no hole at the bottom, but
  577. 26:20in a real one there is a small hole,
  578. 26:22and water slowly leaks out of it. So.
  579. 26:24And, accordingly, well, it's like the
  580. 26:27charge disappears. Accordingly, if we
  581. 26:29look at a DRAM cell, we realize that,
  582. 26:32yes, our information is stored in a
  583. 26:34capacitor, but it is constantly being
  584. 26:37lost. If it disappeared completely,
  585. 26:39your computers wouldn't remember
  586. 26:41anything. But inside along with these
  587. 26:46memory chips, there is also a special
  588. 26:48device that triggers the regeneration
  589. 26:50of this memory. That is, it reads this
  590. 26:53memory once every certain cycle, every
  591. 26:56certain amount of time, thereby
  592. 26:58recharging this very capacitor. So, how
  593. 27:02often do you think, uh, what is the
  594. 27:05duration between two recharge pulses
  595. 27:07for a single memory cell? Depending on
  596. 27:11the memory.
  597. 27:13Well, no, actually, it's most likely
  598. 27:15the characteristics of the transistor
  599. 27:17itself that is in this dynamic memory,
  600. 27:19because the transistor depends on how
  601. 27:22it is made, and accordingly the
  602. 27:23capacitance depends on this parasitic
  603. 27:26capacitance that comes with it. So,
  604. 27:29what time interval do you think we need
  605. 27:31to recharge our memory? Again, you will
  606. 27:33never notice this because, well, you
  607. 27:35work on your computer and think that
  608. 27:37memory is always constant. In reality,
  609. 27:39it discharges just the same and is
  610. 27:41constantly being recharged. What
  611. 27:42frequency do you think it is?
  612. 27:47Well, uh, actually it is 64
  613. 27:49microseconds, uh, the delay between
  614. 27:52these very charging pulses.
  615. 27:56And doesn't it depend on the...
  616. 27:58It depends on the structural elements,
  617. 28:00right? That is, as if the larger the
  618. 28:02capacity, the larger the dimensions
  619. 28:03should be, and accordingly, the less
  620. 28:05often it could be recharged. But we
  621. 28:07have what we have because we want to
  622. 28:09make memory more capacious. Accordingly
  623. 28:11, we always reduce the physical
  624. 28:13elements, right? Accordingly, the
  625. 28:14capacity decreases as well. And the
  626. 28:18more, uh, memory there is, the more
  627. 28:20often we need to recharge it. So. And,
  628. 28:24well, so what is the advantage of this
  629. 28:27dynamic memory?
  630. 28:28Fast,
  631. 28:29speed. It's so-so,
  632. 28:35but compared to this SRAM cell, it is
  633. 28:37significantly slower.
  634. 28:39It is structurally simpler to look...
  635. 28:41Yes, you are absolutely right. It is
  636. 28:43cheaper and simpler. That is, its
  637. 28:47actual volume per unit of area can
  638. 28:49become significantly larger. That is
  639. 28:53why it is still used today, because one
  640. 28:55bit of information is stored on one
  641. 28:57transistor. What else? How much simpler
  642. 29:00can it get? Well, like this. So how
  643. 29:04many gigabytes are there now?
  644. 29:06A lot. Like how many? Just imagine, the
  645. 29:09number of cells is the number of, well,
  646. 29:11transistors. How many millions or
  647. 29:13billions of transistors do you have on
  648. 29:15a modern stick?
  649. 29:17Yeah. Right. So what are we counting?
  650. 29:19One transistor, one bit.
  651. 29:20Do it yourself.
  652. 29:22You don't know the giga-prefix, do you?
  653. 29:25Giga is 10 to what power? The tenth.
  654. 29:29Ah.
  655. 29:3010 to the...
  656. 29:32giga.
  657. 29:35Right.
  658. 29:39Let's see if you remember your math and
  659. 29:41physics.
  660. 29:4610 to the third is what?
  661. 29:49Kilo. Excellent. 10 to the sixth is how
  662. 29:52much?
  663. 29:52Mega.
  664. 29:53Mega. Well done. 10 to the ninth is
  665. 29:55what?
  666. 29:56Giga. Giga. I won't even ask you about
  667. 30:00the ones beyond that, though in
  668. 30:01principle, you should know tera and
  669. 30:03peta. And that is why, yes,
  670. 30:08if we had some way to, well, recharge
  671. 30:11the whole thing,
  672. 30:12we wouldn't need to, right?
  673. 30:14But why can't we make it?
  674. 30:16Listen, why aren't there any perfect
  675. 30:20things in this world at all? Like the
  676. 30:22Philosopher's Stone, why has no one
  677. 30:24invented it yet? It's the same reason
  678. 30:27we haven't made perfect capacitors.
  679. 30:31Well, physically everything is
  680. 30:33determined by electrical processes. I
  681. 30:36don't know physics very well, but from
  682. 30:38what I understand, the charge just sort
  683. 30:40of, well, doesn't stay put. Meaning,
  684. 30:43the dielectric is poor, it leaks; I
  685. 30:44mean, a capacitor holds a charge, with
  686. 30:47a positive charge on one side and a
  687. 30:48negative one on the other. And so
  688. 30:50there's still a current between them;
  689. 30:52they interact. And consequently, the
  690. 30:55charge gradually drains away.
  691. 30:59In short, there are no perfect things
  692. 31:01in the world. I want to make a joke,
  693. 31:06but I'll hold off for now.
  694. 31:07Go ahead.
  695. 31:10No, okay, let's get back to memory, to
  696. 31:12static memory. Accordingly, as you can
  697. 31:17see, it is significantly more complex.
  698. 31:21Some transistors, and they're connected
  699. 31:22to each other somehow. And I'm not
  700. 31:26forcing you to figure out exactly how
  701. 31:28this circuit works. I'll just give you
  702. 31:31a hint as to what to look for. See this
  703. 31:34? A cross shape, like the letter X.
  704. 31:38Well, X means excellent. So, this cross
  705. 31:44shape is positive feedback, meaning the
  706. 31:46output. Of one transistor, or one stage
  707. 31:53, is fed to the input of another, and
  708. 31:55they are connected in such a way that
  709. 31:57they support each other. That's if you
  710. 32:01don't go into the details of its
  711. 32:02operation. So, roughly speaking, if
  712. 32:06this cell is in a stable state, it will
  713. 32:08always stay in that state, because the
  714. 32:10currents mutually sustain each other
  715. 32:12through those feedback loops.
  716. 32:16Accordingly, to switch, well, this cell
  717. 32:22to another state, you need to provide a
  718. 32:24control signal, and avalanche processes
  719. 32:26occur within it that flip this cell
  720. 32:28into another, opposite state. It can
  721. 32:30just as easily store either a zero or a
  722. 32:32one. And such a simplest cell is called
  723. 32:34a flip-flop. Well, we will look further
  724. 32:36at how it is composed of logic gates so
  725. 32:38that it is clearer. There. But, uh, the
  726. 32:42transient processes in this cell, due
  727. 32:44to the positive feedback, are very fast
  728. 32:47. That is, this very memory is
  729. 32:52significantly faster than memory based
  730. 32:54on dynamic elements. And so, in modern
  731. 32:59computing machines, this memory is
  732. 33:01usually used in the form of caches,
  733. 33:03like the level one or level two cache
  734. 33:05on a processor. It is built that way,
  735. 33:08and the registers inside the processor
  736. 33:09are also built on static elements. What
  737. 33:12is the downside?
  738. 33:14It is large, complex, and expensive.
  739. 33:17That is, its relative capacity is
  740. 33:19smaller compared to regular dynamic
  741. 33:21memory, although its performance is
  742. 33:22higher. Well, I don't know, modern
  743. 33:27processor cache, what is the usual size
  744. 33:29of a level two cache? Ah,
  745. 33:36well yes, up to gigabytes, actually. So
  746. 33:39the scale of this cache can be
  747. 33:41significant, but it's still not enough,
  748. 33:44because system RAM, well, again, in any
  749. 33:46modern computer—my laptop has 16 GB
  750. 33:48of RAM. There. But it's not possible
  751. 33:54yet. Well, anyway, okay. Here, uh,
  752. 33:59accordingly, are these two standard
  753. 34:01storage cells. And we, accordingly,
  754. 34:06understand that computers usually store
  755. 34:08information in cells of these types. Uh
  756. 34:13, each cell, as we said on the previous
  757. 34:16slide, stores one bit. If we try to
  758. 34:21synthesize a cell using logic gates,
  759. 34:23which is used in a computing machine,
  760. 34:25then, accordingly, we will arrive at
  761. 34:27the circuit of so-called flip-flops.
  762. 34:31There are quite a few different types
  763. 34:33of flip-flops. On the slide, you are
  764. 34:35presented with a flip-flop, the
  765. 34:37so-called D-flip-flop. This D-flip-flop
  766. 34:40has two inputs. The D input is the
  767. 34:44input where we send the data we want to
  768. 34:46save. There. And the C input comes from
  769. 34:50the word "clock." A control signal is
  770. 34:52sent there. If this control signal is
  771. 34:57equal to one, then information from the
  772. 34:59D input flows, or rather is transmitted
  773. 35:01, into the internal storage circuit.
  774. 35:06The internal storage circuit, you see,
  775. 35:08is represented by two logic gates. It
  776. 35:11has the same similar feedback that you
  777. 35:13saw on the previous picture. This is
  778. 35:17also, accordingly, positive. And,
  779. 35:19accordingly, as soon as we provide this
  780. 35:21information, you can trace the zeros
  781. 35:23and ones through this circuit yourself.
  782. 35:28You will see that you have applied a
  783. 35:30one, applied a control signal C, which
  784. 35:32is also, let's say, a one, and the
  785. 35:33information from the D input has been
  786. 35:35copied to the Q output. It lives there
  787. 35:42and exists until you turn off the power
  788. 35:43. Accordingly, if you continue to
  789. 35:47provide something to the D input, no
  790. 35:48matter what you provide, nothing in the
  791. 35:50internal circuit will change as long as
  792. 35:52there is no control signal. Whether
  793. 35:57it's a zero or a one there, as long as
  794. 35:59the C input is equal to zero, nothing
  795. 36:01will happen; the information remains
  796. 36:02stored within it. And the D-flip-flop
  797. 36:07is named after the word "data." There
  798. 36:08is a massive number of types of
  799. 36:10flip-flops. There are RS flip-flops,
  800. 36:12there are JK flip-flops. When it
  801. 36:14becomes necessary for us during the
  802. 36:16course, we will examine how they work.
  803. 36:19Yes. Furthermore, in later years there
  804. 36:21will be digital circuit design. You
  805. 36:24will get to know them in detail there.
  806. 36:28I am simplifying the situation here
  807. 36:30because there are, accordingly,
  808. 36:31synchronous flip-flops. Asynchronous
  809. 36:34flip-flops. That is a whole separate
  810. 36:36story. I don't want to confuse you with
  811. 36:38that just yet. Yes. And again, a
  812. 36:42flip-flop only stores one bit of
  813. 36:44information, either a zero or a one.
  814. 36:48Hmm, is one bit of information a lot or
  815. 36:51a little? In principle, it's a little.
  816. 36:55Why a little? Well, if you imagine some
  817. 37:03kind of modern file into which you
  818. 37:05write information, then one bit is not
  819. 37:07much. Yes. But if you imagine some kind
  820. 37:12of control signal, then one bit is
  821. 37:14quite enough. The correct answer to my
  822. 37:15provocative questions about whether
  823. 37:17it's a lot or a little is: it depends
  824. 37:19on what it's for. Accordingly, in
  825. 37:22principle, from the point of view of
  826. 37:24storage, it is not enough. Therefore,
  827. 37:29usually, to store a larger amount of
  828. 37:31information, smart people came up with
  829. 37:34combining single-bit cells into
  830. 37:36registers. Registers are simply a
  831. 37:39collection of a certain number of these
  832. 37:41one-bit cells. Schematically, this is
  833. 37:46depicted as shown on the slide on your
  834. 37:48right. Yes. And accordingly, you can
  835. 37:53see that a register is a collection of
  836. 37:55individual flip-flops whose control
  837. 37:57inputs C are simply combined into one.
  838. 38:05That is, in this case, you provide four
  839. 38:07information bits, you provide a clock
  840. 38:09input, and the information is
  841. 38:11simultaneously written into these
  842. 38:13flip-flops. So, it's as if all four
  843. 38:19bits are placed there simultaneously.
  844. 38:23If, accordingly, you can, you need to
  845. 38:26store more information, then you can
  846. 38:28collect as many of these individual
  847. 38:30flip-flops as you need. In our diagrams
  848. 38:35, we will draw registers, accordingly,
  849. 38:38well, as shown on the slide at the
  850. 38:40bottom left. There. Well, here you see
  851. 38:44a 16-bit register, which contains 16
  852. 38:47bits of information. Accordingly, as a
  853. 38:51single, some kind of meaningful value.
  854. 38:57Any questions? Uh-huh.
  855. 38:59You said to create a register from
  856. 39:01cells.
  857. 39:02Well, a register consists of flip-flops
  858. 39:05. That is, a memory cell, in principle,
  859. 39:08is also a simple one, like a flip-flop,
  860. 39:11and, accordingly, the simplest storage
  861. 39:13element. But usually, we want
  862. 39:16information to be stored in flip-flops
  863. 39:18all the time, and we don't need to
  864. 39:20restore it. Therefore, as a single
  865. 39:22element, well, flip-flops of the SDRM
  866. 39:24type are used, which store information
  867. 39:27within themselves. Accordingly, not on
  868. 39:29parasitic capacitance. Well, and here I
  869. 39:32have drawn how they are arranged. That
  870. 39:34is, in any register. That's clear.
  871. 39:42Let's move on. Well, we already know
  872. 39:48one way or another how information is
  873. 39:51stored. And the second question is how
  874. 39:53it needs to be transmitted. There. Well
  875. 39:56, usually, information, as you
  876. 39:58understand, is transmitted via wires.
  877. 40:01These wires, each of the wires can,
  878. 40:03well, if information is transmitted in
  879. 40:06parallel, theoretically transmit one
  880. 40:08bit of information. Uh, accordingly, in
  881. 40:11order to transmit 16 bits of
  882. 40:13information, how many wires do we need?
  883. 40:17Well, at least 16 data wires. And there
  884. 40:20are also usually service ones, like a
  885. 40:22ground common wire, or, for example,
  886. 40:24these ground wires, like in a twisted
  887. 40:26pair, which transmit information back,
  888. 40:28there are also 16 of them. And so on.
  889. 40:30That is, roughly speaking, 16 data
  890. 40:32wires and a certain number of service
  891. 40:34auxiliary ones that we need. Well, and
  892. 40:37accordingly, there are many wires.
  893. 40:41Wires need to be somehow combined with
  894. 40:44each other, because, well, actually, to
  895. 40:46transmit information from one device to
  896. 40:48another. They usually try to compose
  897. 40:51them physically together. Well, like,
  898. 40:54the element that combines several wires
  899. 40:57is usually called a bus. A bus can
  900. 41:03simply be perceived as a collection of
  901. 41:05wires through which information is
  902. 41:07transmitted, well, of a similar or
  903. 41:09single purpose. So, in its simplest
  904. 41:14form, it looks as shown on the slide,
  905. 41:17on the right, as just a bundle of wires
  906. 41:19. If you look at a printed circuit
  907. 41:22board, you will usually see buses as
  908. 41:24parallel tracks running from one chip
  909. 41:26to another. Right. The point is the
  910. 41:31same; the output of an entire register
  911. 41:33must be connected to the input of that
  912. 41:35same register using some kind of medium
  913. 41:37. Uh, what else? Well, we will
  914. 41:45represent buses in our diagrams as,
  915. 41:47well, a thick line. That is, we won't
  916. 41:51draw out every single individual wire.
  917. 41:53If you see a thick conductor on a
  918. 41:55diagram, you immediately understand
  919. 41:57it's a bus, and the bus width is
  920. 41:59sometimes indicated by crossing the bus
  921. 42:01and writing the number of bits it
  922. 42:03carries simultaneously. Any questions?
  923. 42:08Well, so far everything is simple. So,
  924. 42:13one of the important elements in a
  925. 42:15computer is an element called a gate.
  926. 42:20And this element is designed to control
  927. 42:22the transmission of information. That
  928. 42:24is, well, again, if we draw an analogy
  929. 42:27with water, what do we know? We have a
  930. 42:30faucet at home, right? When we want to
  931. 42:33turn on the water, what do we do?
  932. 42:35We turn the handle, and the water flows
  933. 42:38. If we don't want it anymore, we turn
  934. 42:40the handle back, and the water stops
  935. 42:42flowing. So, we have an explicit
  936. 42:45control action that we exert on the
  937. 42:47device, and it flows or doesn't flow
  938. 42:50depending on our desire. If we
  939. 42:54installed, for example, an electric
  940. 42:56valve or a water valve, then with a
  941. 42:58control signal, the water in the main
  942. 43:01pipe would flow. If we remove the
  943. 43:04signal, the water stops flowing. From
  944. 43:10the point of view of our logic, a gate
  945. 43:12is usually represented by an AND logic
  946. 43:14circuit. Why AND? Well, please look
  947. 43:20carefully at the truth table shown here
  948. 43:22. You see that we have a control input
  949. 43:25and an information input. Right. And
  950. 43:28there is the output of this element. If
  951. 43:34you apply a one to the control input,
  952. 43:36as you can see from the truth table,
  953. 43:38what will we have at the element's
  954. 43:39output?
  955. 43:43Whatever is applied to the information
  956. 43:44input. Yes, if it's a one, there will
  957. 43:46be a one, and if it's a zero, there
  958. 43:48will be a zero. If you apply a zero to
  959. 43:50the control input,
  960. 43:52it will always be zero. This is a
  961. 43:55characteristic device that controls the
  962. 43:57transmission of information. And if you
  963. 44:02need to transfer information from one
  964. 44:04register to another, you can put this
  965. 44:06logic circuit on every wire of the bus
  966. 44:08and connect all the control inputs of
  967. 44:10these AND logic circuits together. And
  968. 44:15then you get a setup where you send one
  969. 44:17control signal, and information is
  970. 44:18transferred from one register to
  971. 44:20another entirely, all at once. You know
  972. 44:23, if you wanted to transfer information
  973. 44:25from a source to some kind of receiver,
  974. 44:27and immediately, just by sending a one
  975. 44:30or a zero, all the information is
  976. 44:31rewritten from one to the other.
  977. 44:36Questions? Well, again, for now
  978. 44:40everything looks fairly simple. Each of
  979. 44:43these elements is trivial and simple on
  980. 44:45its own. Except for perhaps the only
  981. 44:50complex one, well, more or less complex
  982. 44:52element, which is called an adder. So,
  983. 44:56in order to mathematically add two
  984. 44:59single-bit numbers, what do we need to
  985. 45:01do? I mean, roughly speaking, we have
  986. 45:06one one-bit number and a second one-bit
  987. 45:08number. We want to add them together.
  988. 45:12How many outputs should such an element
  989. 45:14have?
  990. 45:17Why two?
  991. 45:19Because the sum of two single-bit
  992. 45:20numbers can be one.
  993. 45:22Right, so a second bit will be produced
  994. 45:24. And this second bit is called the
  995. 45:26carry-out. If you try to add two
  996. 45:34single-bit, well, binary numbers in
  997. 45:35columns, then you have a carry from the
  998. 45:37previous digit, and this unit, which
  999. 45:39becomes the next carry, is simply added
  1000. 45:42to the next pair. Accordingly, this
  1001. 45:50will be the so-called carry-out. Right.
  1002. 45:52And if we consider, say, two digits in
  1003. 45:54the middle of a number, besides the
  1004. 45:56carry-out, we will also have a carry-in
  1005. 45:58, right, which also needs to be taken
  1006. 46:00into account in the addition. Therefore
  1007. 46:04, the adder, conditionally speaking,
  1008. 46:06has three inputs and two outputs.
  1009. 46:10And the third input is this carry,
  1010. 46:14right?
  1011. 46:15Yes. So, there are two data inputs.
  1012. 46:17Well, you see, here we have a number,
  1013. 46:19for example, number A and number B.
  1014. 46:21These are the zero-th digits of this
  1015. 46:23very number. We have each digit of this
  1016. 46:27number plus some kind of carry-in that
  1017. 46:29also participates in the addition. Well
  1018. 46:31, let's assume from the previous digit.
  1019. 46:35In the first one, it will most likely
  1020. 46:37be equal to zero, but somewhere in the
  1021. 46:39middle, oh, in the zero-th one it will
  1022. 46:41be zero, and somewhere in the first one
  1023. 46:43it might already be non-zero. And here
  1024. 46:48is the truth table of the simplest
  1025. 46:50adder. It is presented here for you on
  1026. 46:53the slide. Let's take a close look at
  1027. 46:56it to understand, well, to fully grasp
  1028. 46:58how it works. Well, the inputs are
  1029. 47:02again C-in, A-i, and B-i. Accordingly,
  1030. 47:08the outputs are C-out and the sum S of
  1031. 47:11the i-th digit. Let's take this case as
  1032. 47:15an example, for instance. Two ones with
  1033. 47:19a carry equal to zero, respectively.
  1034. 47:23Accordingly, our sum must naturally be
  1035. 47:251 + 1 = 10, with a zero in this current
  1036. 47:27bit and an outgoing carry of one. Is
  1037. 47:31that clear? It's basically the same
  1038. 47:34column addition you're used to, just in
  1039. 47:36binary instead of decimal. There's
  1040. 47:38really no difference at all. Let's take
  1041. 47:44another example, say the last row,
  1042. 47:46where A and B were both one, and we
  1043. 47:47also had a carry from the previous bit
  1044. 47:49from column addition. So, what do we
  1045. 47:54get? We should get 11. Accordingly, the
  1046. 47:58information bit should be one, and the
  1047. 48:00carry to the next bit should also be
  1048. 48:01one. If you try adding two binary
  1049. 48:06numbers in columns, you'll see how
  1050. 48:08these carries move from one bit to the
  1051. 48:09next and affect the final sum. So, if
  1052. 48:16we build a simple adder using this type
  1053. 48:18of logic gate, it will be enough to add
  1054. 48:20single-bit numbers. But if we want to
  1055. 48:26add two 16-bit numbers, or numbers of
  1056. 48:28any bit depth, what do we need to do?
  1057. 48:33Just like in column addition, we must
  1058. 48:35feed the outgoing carry from the lower
  1059. 48:37bit to the next, higher bit. And as you
  1060. 48:43can see, there is a connection wire
  1061. 48:45here that connects the bitwise carry
  1062. 48:47transmission in exactly that way. We
  1063. 48:53must do the same thing for all
  1064. 48:54subsequent elements. At the same time,
  1065. 48:59the very last bit will also have an
  1066. 49:01outgoing carry, which is typically used
  1067. 49:03in computers as an overflow signal.
  1068. 49:08What does overflow mean?
  1069. 49:14Yes, you're right, it means the number
  1070. 49:16doesn't fit in the bit grid. For
  1071. 49:22example, to add two 16-bit numbers, how
  1072. 49:24many bits should we have in the
  1073. 49:25register where we plan to store the
  1074. 49:27result?
  1075. 49:3116.
  1076. 49:32No,
  1077. 49:33to avoid an overflow, 17.
  1078. 49:37And if all our registers are 16-bit, we
  1079. 49:40can add the two numbers, but if they
  1080. 49:42don't fit, we simply signal that an
  1081. 49:44error has occurred. There you go.
  1082. 49:48Accordingly, computing usually uses two
  1083. 49:50flags for such error occurrences. One
  1084. 49:53is overflow, and the second is carry.
  1085. 49:58Right. We will talk about when they are
  1086. 50:02used a bit later. Both overflow and
  1087. 50:08carry are used as a signal of
  1088. 50:09insufficient bit depth for our numbers,
  1089. 50:12that is, going beyond the significant
  1090. 50:14part of the number itself. That is the
  1091. 50:17first observation. So, and also, yes,
  1092. 50:20if you are, for example, adding two 16-
  1093. 50:22bit numbers, we have determined that,
  1094. 50:24well, the result must be at least 17
  1095. 50:27bits. And if you multiply two 16-bit
  1096. 50:31numbers, what is the size of the
  1097. 50:33register you need, respectively, to
  1098. 50:35store the result?
  1099. 50:3832,
  1100. 50:39yes, of course, 32 bits. So you
  1101. 50:41understand, right, that with modern
  1102. 50:43adders everything is still simple.
  1103. 50:45There. But with the multiplication
  1104. 50:48operation, we explicitly need twice the
  1105. 50:51volume of our resulting register,
  1106. 50:58double the volume compared to the
  1107. 51:00incoming operands. That is the first
  1108. 51:05problem. The second problem is, what do
  1109. 51:10you think happens because we—oops,
  1110. 51:12back again? Because we connected the
  1111. 51:18elements in sequence like this.
  1112. 51:23What? What?
  1113. 51:23What?
  1114. 51:26Well, yes, I agree with you there.
  1115. 51:31Correct, the speed of the adder is
  1116. 51:33significantly lower. Well, not
  1117. 51:37significantly lower, but exactly as
  1118. 51:39many times slower as there are bits in
  1119. 51:41the adder compared to the performance
  1120. 51:44of a single logic element. So, you have
  1121. 51:48fed two numbers into it. Right. And
  1122. 51:52physically, the output of each adder,
  1123. 51:54due to the fact that the carry happens
  1124. 51:56sequentially through all bits, causes
  1125. 51:59the result to change, as it were,
  1126. 52:01online, right? So, as if for the result
  1127. 52:08to become correct, you need to wait a
  1128. 52:09certain amount of time. If the trigger
  1129. 52:13of one logic element is, say, time x,
  1130. 52:16then you need to wait 16x to wait for
  1131. 52:18the time when all 16 bits have
  1132. 52:20triggered. And this can be quite
  1133. 52:25critical in certain intervals, at
  1134. 52:26certain moments. So, you must clearly
  1135. 52:32understand that the performance of
  1136. 52:34certain elements is, well, not as fast
  1137. 52:36as the simplest logic operations in a
  1138. 52:38computer. And the last thing I want to
  1139. 52:43say about adders. The fact is that
  1140. 52:45adders are part of the ALU. ALU in a
  1141. 52:49machine stands for Arithmetic Logic
  1142. 52:51Unit. And basically, it is intended to
  1143. 52:56perform, as the name implies, hello,
  1144. 52:58arithmetic and logical operations. We
  1145. 53:02can see here that we have, accordingly,
  1146. 53:04an arithmetic operation. Here we are
  1147. 53:07calculating addition. What other
  1148. 53:11arithmetic operation do you think an
  1149. 53:13adder can perform?
  1150. 53:15Subtraction. Due to what? Due to,
  1151. 53:20well, due to the fact that a number can
  1152. 53:22be represented as two's complement. We
  1153. 53:23will talk about two's complement
  1154. 53:25separately later. I am intentionally
  1155. 53:28telling you things you might study in
  1156. 53:30other subjects here, because you need
  1157. 53:32to get a bit of a feel for it. Right.
  1158. 53:35Accordingly, addition and subtraction
  1159. 53:38on an adder. Modern processors don't
  1160. 53:42just use an ALU; all the operations
  1161. 53:44performed by the processor are handled
  1162. 53:47by several such devices, which are
  1163. 53:49called execution units. In other words,
  1164. 53:52roughly speaking, they perform addition
  1165. 53:54, subtraction, multiplication, and some
  1166. 53:56other special functions. Right. And
  1167. 53:58there isn't just one in the processor;
  1168. 54:00there are many of them. For instance,
  1169. 54:02there might be, say, four adders. Well,
  1170. 54:05for example, in a modern Intel
  1171. 54:07processor, I believe there are about
  1172. 54:09sixteen execution units. Right. And
  1173. 54:12each of them works in parallel; modern
  1174. 54:15computers, or rather, processors, are
  1175. 54:17superscalar, meaning they can perform
  1176. 54:19several operations simultaneously. We
  1177. 54:25will take a brief look at how that is
  1178. 54:26done in other lectures. Let's move on.
  1179. 54:30We have just a little bit left to
  1180. 54:32understand how a computer works. The
  1181. 54:37next important point that we need in
  1182. 54:39computers, without which no computer
  1183. 54:41works. It is sometimes also called the
  1184. 54:45heart of the computer. That is the
  1185. 54:47clock generator. What does the clock
  1186. 54:49generator do?
  1187. 54:50It provides a frequency signal,
  1188. 54:52well, it generates pulses with a set
  1189. 54:54frequency, and, well, some other
  1190. 54:56parameters. The main point for us is
  1191. 55:02that the frequency of these pulses must
  1192. 55:04be constant. Why constant? Because we
  1193. 55:11rely on the performance of our logic
  1194. 55:13elements, and we set clock pulses such
  1195. 55:15that all operations performed by our
  1196. 55:17machine fit within a clock pulse. For
  1197. 55:22example, if we need to add a 16-bit
  1198. 55:25value, we must be absolutely certain
  1199. 55:27that all these 16 addition operations
  1200. 55:29happen. And that is why we cannot
  1201. 55:35increase the frequency of clock
  1202. 55:36generators. Well, not only for that
  1203. 55:38reason, but just without limit. So,
  1204. 55:41what is the frequency of the clock
  1205. 55:42generator in modern computer processors
  1206. 55:45?
  1207. 55:45Well, tell me the limit. GHz.
  1208. 55:49Well yes, typical values on your
  1209. 55:51computer are 3 GHz, and 5 GHz is, I
  1210. 55:53don't know, maybe with liquid cooling.
  1211. 55:56Right. But they exist nonetheless.
  1212. 55:59Well yes. Right. Accordingly, they do
  1213. 56:04exist at a higher frequency, but
  1214. 56:06working with them is not that simple,
  1215. 56:08which we will discuss later. We are
  1216. 56:13already approaching the physical
  1217. 56:15limitations of our surrounding world. I
  1218. 56:18mean, 3 GHz is very close to the speed
  1219. 56:21of light. That is the maximum speed
  1220. 56:24that we have in existence. What is that
  1221. 56:26? Uh-huh. Nothing. Well, so, that is
  1222. 56:30the first point. Every computer has a
  1223. 56:33clock generator, at the frequency of
  1224. 56:35which a regular central processor
  1225. 56:37operates. The diagram of a clock
  1226. 56:40generator is presented here. There are
  1227. 56:43many different circuits like this. And
  1228. 56:46this is one of the simplest clock
  1229. 56:48generator circuits. Yeah. As you can
  1230. 56:51see, the main element in it is a
  1231. 56:53capacitor. The capacitor charges in a
  1232. 56:55certain amount of time and discharges
  1233. 56:57in a certain amount of time. There is a
  1234. 57:00constant oscillatory circuit of charge
  1235. 57:01and discharge of this capacitor
  1236. 57:03happening here. Again, I won't go into
  1237. 57:05the physics of the process so as not to
  1238. 57:07confuse you. What is important is that
  1239. 57:11at the output, thanks to the constant
  1240. 57:13charging and discharging of this
  1241. 57:15capacitor, you get a certain number of
  1242. 57:17constant pulses with a set interval
  1243. 57:19between them. The capacity determines
  1244. 57:26the frequency; if the capacity is
  1245. 57:28larger, the pulses will be longer,
  1246. 57:30meaning the frequency will be lower.
  1247. 57:34Yeah. In modern computers, instead of a
  1248. 57:37capacitor, quartz resonators are
  1249. 57:39usually used. Yeah. The principle is
  1250. 57:43basically the same; they just allow for
  1251. 57:45a more precise frequency measurement.
  1252. 57:48Yeah. There is one single problem with
  1253. 57:51clock generators in a computing machine
  1254. 57:53. All the elements working inside one
  1255. 57:57computer usually operate from a single
  1256. 57:59clock generator. If you try to use two,
  1257. 58:03your computer will most likely not work
  1258. 58:06properly because between two pulses of
  1259. 58:08two—even if they are absolutely
  1260. 58:10identical—clock generators, what
  1261. 58:12exists? A shift, or as people like to
  1262. 58:16say, a phase shift, meaning the signal
  1263. 58:18phase is different because they were,
  1264. 58:20for instance, turned on at slightly
  1265. 58:22different moments in time. Yeah. And
  1266. 58:25accordingly, despite the frequency
  1267. 58:27being the same, the phase is different,
  1268. 58:29which is a significant obstacle to the
  1269. 58:31joint operation of computing machines
  1270. 58:33running on different clock generators.
  1271. 58:37We will talk about this in detail in
  1272. 58:38the next semester. We will discuss how
  1273. 58:41to deal with this. For now, you just
  1274. 58:43need to accept this, memorize it, and
  1275. 58:45take it as a given. Questions? Yeah.
  1276. 58:51Yes, the higher the frequency, the
  1277. 58:54better,
  1278. 58:56the more what?
  1279. 59:00Well, yes, you increase the clock
  1280. 59:02frequency of operations. Well, so to
  1281. 59:07speak, it happens per clock cycle.
  1282. 59:09Roughly speaking, if they are
  1283. 59:10superscalar, they can do more than one
  1284. 59:12operation per cycle, or maybe just one
  1285. 59:14addition per cycle for your computer.
  1286. 59:16So if it’s 3 GHz, then you’ll have
  1287. 59:19what, milli...billion
  1288. 59:21billions of operations per second,
  1289. 59:22right? There. And if it’s four
  1290. 59:25gigahertz 4 25 percent faster turned
  1291. 59:34the knob, and everything immediately
  1292. 59:36became fine. That doesn't happen. What
  1293. 59:40do overclockers run into? The fact that
  1294. 59:43you can turn the generator up.
  1295. 59:46That’s the one, yes,
  1296. 59:47yes, yes, yes, yes, yes, yes. The more
  1297. 59:53you start turning it, the more heat you
  1298. 59:54get.
  1299. 1:00:00Oh, it’s a complex relationship. No,
  1300. 1:00:03not linear. Then
  1301. 1:00:09then, yes, the further you go, the
  1302. 1:00:11closer you get to physical limitations,
  1303. 1:00:13and accordingly, the harder it is to
  1304. 1:00:15implement. And this is, to put it very
  1305. 1:00:18roughly, in terms of physics—well, I
  1306. 1:00:20don’t think we should delve into the
  1307. 1:00:22physics of these processes, because
  1308. 1:00:24it’s complicated and it depends
  1309. 1:00:25heavily on the component base and how
  1310. 1:00:27it’s made. So, it’s a whole
  1311. 1:00:29different story. I also know the
  1312. 1:00:31general point that the higher the
  1313. 1:00:33frequency, the greater the [heat]. Well
  1314. 1:00:39, at a low frequency, in principle,
  1315. 1:00:42modern energy-saving computers, when
  1316. 1:00:44you aren't doing anything, they
  1317. 1:00:46intentionally lower the frequency so as
  1318. 1:00:48not to waste energy unnecessarily. And
  1319. 1:00:52my computer, like yours, probably,
  1320. 1:00:54loves to do this right now. Sometimes
  1321. 1:00:57it slowly drives you crazy when it does
  1322. 1:00:59it at the wrong moment. Mine suffers
  1323. 1:01:02from this. It has some kind of Chinese
  1324. 1:01:04battery, and when it runs on battery,
  1325. 1:01:06it sometimes drops the frequency to
  1326. 1:01:07almost zero, and you have to put it to
  1327. 1:01:09sleep and wake it up again. And after
  1328. 1:01:11that, it starts working normally.
  1329. 1:01:13That’s the glitch it has. Oh well.
  1330. 1:01:16Well, that’s about it. We have, in
  1331. 1:01:18principle, examined everything in order
  1332. 1:01:20to understand how to put it all
  1333. 1:01:22together and how to make a computer out
  1334. 1:01:24of all these simplest elements. Let’s
  1335. 1:01:28look at this using the example of a
  1336. 1:01:30calculator. How does a calculator work?
  1337. 1:01:34Mm, no, it doesn't work like that. Ah,
  1338. 1:01:38well, let’s define from the user’s
  1339. 1:01:41point of view how a calculator works.
  1340. 1:01:43Usually, you know, a calculator, you
  1341. 1:01:45type numbers into it. Accordingly, you
  1342. 1:01:48enter the first number, press the
  1343. 1:01:50operation, enter the second number, and
  1344. 1:01:53press equals. What happens at the
  1345. 1:01:57moment when you, er, type in, uh, the
  1346. 1:01:59first, say, addition sign; what is
  1347. 1:02:02going on inside the calculator? The
  1348. 1:02:05screen flickers in a characteristic way
  1349. 1:02:07, right? And what exactly is going on
  1350. 1:02:10inside that flicker?
  1351. 1:02:14No. So, again, this isn't magic. That
  1352. 1:02:18is, the calculator only calculates
  1353. 1:02:19because that's how people designed it.
  1354. 1:02:23So, to see how a calculator counts,
  1355. 1:02:25look closely at this simple calculator
  1356. 1:02:27diagram. Strangely enough, it has two
  1357. 1:02:30registers: register X and register Y.
  1358. 1:02:33Register X and register Y. Yes. And, uh
  1359. 1:02:39, accordingly, these registers hold,
  1360. 1:02:41well, they register the exact number
  1361. 1:02:43you see on your screen. Now, register Y
  1362. 1:02:49is auxiliary; it's needed so that when
  1363. 1:02:51you enter the first number and press
  1364. 1:02:53the addition sign, it gets placed into
  1365. 1:02:55that register. Well, to be stored there
  1366. 1:02:58until some calculations are performed
  1367. 1:03:00with it. Exactly. It's an intermediate
  1368. 1:03:02buffer for storing that very first
  1369. 1:03:04number that you enter. That's clear to
  1370. 1:03:06everyone, right?
  1371. 1:03:08Yes. Now, let's take a look at what our
  1372. 1:03:10calculator is actually composed of,
  1373. 1:03:12moving forward. We've already
  1374. 1:03:15identified the two registers. Well, the
  1375. 1:03:18registers can be of whatever bit-depth
  1376. 1:03:20we need. Yes. Besides everything else,
  1377. 1:03:23there's a screen. The contents of
  1378. 1:03:27register X are sent to this screen, and
  1379. 1:03:29it is displayed there at all times. In
  1380. 1:03:37addition, the calculator has an
  1381. 1:03:38arithmetic logic unit that performs all
  1382. 1:03:40the operations we want the calculator
  1383. 1:03:42to carry out. Now, in this case, to
  1384. 1:03:48understand how a calculator works, we
  1385. 1:03:50need to perform two—well, actually,
  1386. 1:03:53three operations. We need to, uh, enter
  1387. 1:03:56a zero. That will be one operation. See
  1388. 1:03:58, it has a control signal U6, which is
  1389. 1:04:00sent directly to the ALU. And,
  1390. 1:04:02accordingly, as soon as we send it, the
  1391. 1:04:04output will be zero. We also have,
  1392. 1:04:09accordingly, operation U7, which means
  1393. 1:04:12plus, and U8, which means a one-digit
  1394. 1:04:14shift. A small digression is needed
  1395. 1:04:18here. Our calculator doesn't work in
  1396. 1:04:21binary, but in decimal. Do you know
  1397. 1:04:24what the binary-coded decimal system is
  1398. 1:04:26? Well, for everyone, that is, for
  1399. 1:04:28those who know—that's good. For those
  1400. 1:04:31who don't know—well, if we have a
  1401. 1:04:33binary number represented simply by its
  1402. 1:04:35bits, yes, and the weight of each bit
  1403. 1:04:37can be determined by a known formula,
  1404. 1:04:39then in binary-coded decimal, each
  1405. 1:04:41digit of the number is represented by
  1406. 1:04:43four bits. That is, the number itself,
  1407. 1:04:47each digit, a decimal digit, is
  1408. 1:04:49represented by binary numbers, and all
  1409. 1:04:51together it's just a collection of
  1410. 1:04:53several such digits in binary code.
  1411. 1:04:56That is why it is called a binary-coded
  1412. 1:04:58decimal number. Right. So, every digit
  1413. 1:05:01is in binary code. The whole number is
  1414. 1:05:04decimal. Our adder, our little screen.
  1415. 1:05:07The screen, well, it's clear, it
  1416. 1:05:08displays every decimal digit of this
  1417. 1:05:10very number. And, accordingly, the
  1418. 1:05:13arithmetic logic unit calculates in
  1419. 1:05:15this binary-coded decimal system. Those
  1420. 1:05:18exist as well. It looks a bit more
  1421. 1:05:20complicated there than regular binary
  1422. 1:05:22addition, but nevertheless, it exists.
  1423. 1:05:25All the calculators that existed before
  1424. 1:05:27, well, most of them, let's say, they
  1425. 1:05:29all work in the binary-coded decimal
  1426. 1:05:31system. Okay. What else do we see here
  1427. 1:05:34in this picture? We see buttons, uh,
  1428. 1:05:38which we usually press. And each press
  1429. 1:05:45of this button leads to the fact that a
  1430. 1:05:47special device inside the calculator,
  1431. 1:05:49which is called the control unit—it
  1432. 1:05:51is depicted as this blue square. As
  1433. 1:05:58soon as you press any button, this
  1434. 1:06:00device generates a sequence of pulses,
  1435. 1:06:02which are then transmitted to our gates
  1436. 1:06:03. You can see the gates on the diagram;
  1437. 1:06:10they are depicted as those blue
  1438. 1:06:12rectangles, and next to them are the
  1439. 1:06:14control signals that control these
  1440. 1:06:15gates. Well, that is, accordingly,
  1441. 1:06:20there is U1, for example. What will
  1442. 1:06:22opening gate U1 trigger? What does U1
  1443. 1:06:30do? the output from register X, which
  1444. 1:06:36directs to
  1445. 1:06:38Correct. So, to put it more precisely,
  1446. 1:06:42gate U1 triggers the transfer of
  1447. 1:06:44information from register X to the left
  1448. 1:06:46input of the ALU. What does gate, for
  1449. 1:06:51example, U5 do? It takes this digit you
  1450. 1:06:58entered, the code of this very digit in
  1451. 1:07:01binary-coded decimal form, naturally,
  1452. 1:07:03and feeds it to the right input of the
  1453. 1:07:05ALU.
  1454. 1:07:06Right. And what does gate 2 do? takes
  1455. 1:07:11from the ALU to,
  1456. 1:07:15that is, it writes the content
  1457. 1:07:16currently at the ALU output into
  1458. 1:07:18register X, and at the same time shows
  1459. 1:07:20it on the screen, because, you see,
  1460. 1:07:22register X is directly connected to the
  1461. 1:07:24screen without any gates. Everything
  1462. 1:07:29that is in register X, you see on that
  1463. 1:07:31very screen. So, the control unit, when
  1464. 1:07:36you type and press a button, simply
  1465. 1:07:38generates a series of sequences of
  1466. 1:07:40these very pulses to our gates, to U1,
  1467. 1:07:42U2, and U3. Let's take a look at what
  1468. 1:07:48we need to do to perform a calculation
  1469. 1:07:50on the calculator using our circuit and
  1470. 1:07:52our control unit. So, when we input the
  1471. 1:07:58first digit of a number, what must we
  1472. 1:08:00do? Well, our screen is still empty.
  1473. 1:08:05Here is what we must do. We pressed the
  1474. 1:08:07first digit. What should we logically
  1475. 1:08:09do?
  1476. 1:08:12Well, that's right. I mean, we pressed
  1477. 1:08:14it, but it isn't saved anywhere yet.
  1478. 1:08:16Where should we save this value?
  1479. 1:08:19To the X register, yes. Accordingly,
  1480. 1:08:24from the perspective of the pulse
  1481. 1:08:26sequence, let's take a close look at
  1482. 1:08:27what happens. Here on the timing
  1483. 1:08:32diagram, we have the clock generator
  1484. 1:08:34pulses drawn. There. And as soon as we
  1485. 1:08:39press any first digit, let's say it's
  1486. 1:08:41the number seven, the control unit
  1487. 1:08:42issues a series of these pulses. The
  1488. 1:08:45first of these pulses will be U3. Look,
  1489. 1:08:48you see, it's drawn here as U3. What
  1490. 1:08:52does U3 do?
  1491. 1:08:58It transfers from X to Y, right? I mean
  1492. 1:09:01, the logic of the operation suggests
  1493. 1:09:03that whatever was in the X register,
  1494. 1:09:05since we are entering a new digit, the
  1495. 1:09:07first digit of a new number, needs to
  1496. 1:09:09be saved somewhere. Right? Where to
  1497. 1:09:11save it? We don't have a second place
  1498. 1:09:12in the calculator. There is only the Y
  1499. 1:09:14register. So, the first value will be
  1500. 1:09:17the transfer of information from the X
  1501. 1:09:19register to the Y register. What
  1502. 1:09:22happens in the second cycle?
  1503. 1:09:28Which control signals will be executed?
  1504. 1:09:32I can't hear you.
  1505. 1:09:34U2 and...
  1506. 1:09:36U2 and U6. What does that mean, exactly
  1507. 1:09:39? It will return a zero and place it in
  1508. 1:09:43X,
  1509. 1:09:44right? We need to reset the X register.
  1510. 1:09:46So we take a zero. Our ALU generates a
  1511. 1:09:49zero by applying this control signal,
  1512. 1:09:51and then by opening gate 2, this zero
  1513. 1:09:53will move to the X register. What needs
  1514. 1:09:56to be done in the next cycle?
  1515. 1:09:59In the next cycle, you must...well, as
  1516. 1:10:02we see in the diagram, we apply pulses
  1517. 1:10:05U1, U5, and U7. Here is what they do
  1518. 1:10:09and which gates they open. U1 sends the
  1519. 1:10:12X register to the left input of the ALU
  1520. 1:10:15. U5...
  1521. 1:10:19is the digit pressed on the calculator.
  1522. 1:10:22This seven of ours is sent to the right
  1523. 1:10:24input of the ALU. What is U7? The
  1524. 1:10:30addition operation. Accordingly, the
  1525. 1:10:34sum of these values is produced, and
  1526. 1:10:36they are currently inside our ALU. The
  1527. 1:10:40next thing that should happen is...and
  1528. 1:10:44that's it. And this number seven will
  1529. 1:10:46be written to the X register and will
  1530. 1:10:48appear on our screen. We pressed the
  1531. 1:10:51button, and some computer secretly and
  1532. 1:10:53magically did its work. The digit seven
  1533. 1:10:56appeared on the screen. All the magic
  1534. 1:10:59is carried out by this sequential
  1535. 1:11:01sending of pulses to the gates. The
  1536. 1:11:05information was transmitted from one
  1537. 1:11:07place, so it was recorded and appeared
  1538. 1:11:09on your screen. Understood? The first
  1539. 1:11:13thing is, well, pressing one button. If
  1540. 1:11:17you don't understand, speak up, who
  1541. 1:11:19doesn't understand?
  1542. 1:11:22Then why are we silent when I ask if
  1543. 1:11:23it's understood?
  1544. 1:11:25It doesn't matter when the question
  1545. 1:11:27comes, right? Or look, first we have y7
  1546. 1:11:32, then Y1, then Y5, like they are not
  1547. 1:11:35sequential,
  1548. 1:11:36they arrive simultaneously. This is a
  1549. 1:11:38clock cycle.
  1550. 1:11:39So, what does the control unit do? It,
  1551. 1:11:42uh, you pressed the button, and the
  1552. 1:11:44button serves as a signal that a
  1553. 1:11:45program is embedded in every pulse of
  1554. 1:11:47the clock generator. Only this program
  1555. 1:11:51isn't like the programming languages
  1556. 1:11:53you're used to, but rather a sequence
  1557. 1:11:54of binary numbers sent to the control
  1558. 1:11:56unit. You press it, and each cycle
  1559. 1:11:59emits its own sequence of numbers. And
  1560. 1:12:01this sequence of numbers causes a state
  1561. 1:12:03change in the entire device.
  1562. 1:12:07Aha. Yes, why do you think the value is
  1563. 1:12:11only written at the end on the third
  1564. 1:12:13step?
  1565. 1:12:16That's how people wrote the program.
  1566. 1:12:19Well, I mean, that's how the programmer
  1567. 1:12:23made it.
  1568. 1:12:25Are all the gates closed by default?
  1569. 1:12:26Yes, all gates are closed by default.
  1570. 1:12:29They open only at the moment our
  1571. 1:12:31control unit emits a series of these
  1572. 1:12:33very pulses.
  1573. 1:12:36Yes. Next. Let's reinforce the results
  1574. 1:12:43we've obtained. Suppose we are entering
  1575. 1:12:46the second and subsequent digits of a
  1576. 1:12:48number. So, we had a seven on the
  1577. 1:12:50screen, and we enter the digit five.
  1578. 1:12:53Look at how smart we are. What should
  1579. 1:12:55happen next when the second digit is
  1580. 1:12:56entered? Our control unit must generate
  1581. 1:12:59a sequence of pulses again. Let's take
  1582. 1:13:01a look at what these pulses are and
  1583. 1:13:03what they do. First. In the first cycle
  1584. 1:13:07, pulses U1 and U8 will be emitted.
  1585. 1:13:10What is this? Saving to
  1586. 1:13:17this means gate U1 sends the contents
  1587. 1:13:19of register X to the left input of the
  1588. 1:13:21ALU.
  1589. 1:13:23Shift.
  1590. 1:13:24ALU. There is a zero at the right input
  1591. 1:13:26of the ALU, so there is nothing there
  1592. 1:13:27as such. And, accordingly, the
  1593. 1:13:29operation we feed into the ALU is a
  1594. 1:13:31shift. As a result, the ALU will shift
  1595. 1:13:34the received number seven one digit to
  1596. 1:13:36the left. There. And, accordingly, we
  1597. 1:13:38get the number 70. Well, that is,
  1598. 1:13:41roughly speaking, correct, inside the
  1599. 1:13:43ALU. What should we do next? Next, we
  1600. 1:13:46need to rewrite this into register X,
  1601. 1:13:48right? Which gate exists for this?
  1602. 1:13:52U2. Let's look at the cycle. We see
  1603. 1:13:56that, uh, accordingly, U2 is emitted in
  1604. 1:13:58the next cycle. Next cycle. Gates U1,
  1605. 1:14:03U5, and U7 are emitted. What do they do
  1606. 1:14:07?
  1607. 1:14:11They take the digit you pressed. That's
  1608. 1:14:13five. They feed it to the right input
  1609. 1:14:16of the ALU. Gate U1 feeds X to the left
  1610. 1:14:18input of the ALU. Gate U7. What is this
  1611. 1:14:24?
  1612. 1:14:24Addition.
  1613. 1:14:25Addition. We add five to seventy, right
  1614. 1:14:27? That makes 75. This 75 is currently
  1615. 1:14:32in the ALU. Accordingly, what should be
  1616. 1:14:35next?
  1617. 1:14:36Write to register X. Pulse 2.
  1618. 1:14:40Excellent. We now have 75. And what is
  1619. 1:14:44left for us to do? Now we have to
  1620. 1:14:47perform the operation itself with the
  1621. 1:14:48previous number. Now, what we have in
  1622. 1:14:53the register needs to be added to
  1623. 1:14:54register X. Suppose we pressed,
  1624. 1:14:56conditionally speaking, the button on
  1625. 1:14:58our calculator. Accordingly, the first
  1626. 1:15:02thing we need to do is open our
  1627. 1:15:05favorite gates U1, U4, and U 7—not U5
  1628. 1:15:08, but U4. U4 is the gate between
  1629. 1:15:10register Y and the right input of the
  1630. 1:15:12ALU. That is, we feed the contents of
  1631. 1:15:14register Y to the right input of the
  1632. 1:15:16ALU. Accordingly, what is gate U1? The
  1633. 1:15:20contents of register X to the left. Are
  1634. 1:15:24you following? What is U7?
  1635. 1:15:28Addition. Now we have the sum of
  1636. 1:15:31register Y and register X, which is,
  1637. 1:15:33accordingly, in the ALU. What do we
  1638. 1:15:36have left to do?
  1639. 1:15:40Well, write it to register X and
  1640. 1:15:42thereby display it on the screen. Gate
  1641. 1:15:44U2 is intended for this. Trigger U2.
  1642. 1:15:47Bam. The sum is on the screen. Magic.
  1643. 1:15:50Magic.
  1644. 1:15:51Magic. Now you all know how a computer
  1645. 1:15:57works.
  1646. 1:15:58They all work exactly like this.
  1647. 1:16:03Basically, you use various control
  1648. 1:16:05devices there to issue sequences of
  1649. 1:16:07pulses and, accordingly, force
  1650. 1:16:08information to be transferred from one
  1651. 1:16:11register to another. That's it. There
  1652. 1:16:16is nothing else in any computer. I
  1653. 1:16:19guarantee it.
  1654. 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.