YouTube2Text

How Simple On/Off Switches Store the Digital World | Working of Computer Memory — Transcript

by Science Simplified 4 All · 2,605 words · 367 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Have you ever wondered how computer
  2. 0:02memory actually works? Today, all the
  3. 0:04books you could read in your lifetime
  4. 0:06can fit into a single tiny memory chip.
  5. 0:09And it is not just books, your photos,
  6. 0:12music, movies, bank details, even your
  7. 0:15passport or medical records. Almost
  8. 0:17everything about you now lives in
  9. 0:19digital form. But how does this digital
  10. 0:22memory really work? We have all heard
  11. 0:24that computers use a binary language.
  12. 0:27But how can just two numbers 0 and 1
  13. 0:30represent such a wide variety of data?
  14. 0:33Back in the early days when we tried to
  15. 0:35know more about these machines, the only
  16. 0:38answers we got were confusing diagrams
  17. 0:40and technical terms like CPU, memory
  18. 0:43unit and so on. Today everyone carries a
  19. 0:46computer in their pocket in the form of
  20. 0:48a smartphone. Yet hardly anyone knows
  21. 0:51the simple secret behind it all. In this
  22. 0:54video, I will break down how computer
  23. 0:56memory really works in the simplest way
  24. 0:59possible. And by the end, you will see
  25. 1:01how the simple idea of on and off builds
  26. 1:05our entire digital world.
  27. 1:11Hi friends, welcome to a new video on
  28. 1:14science simplified for all. We often
  29. 1:16hear that computers work using the
  30. 1:18binary system. That means a computer has
  31. 1:21only two numbers to deal with 0 and one.
  32. 1:25Every book, every picture, every song,
  33. 1:28every movie stored inside a computer is
  34. 1:30represented only by these two numbers 0
  35. 1:33and 1. But how does that really happen?
  36. 1:36Let us understand this with a simple
  37. 1:37example. Imagine you are standing on a
  38. 1:40quiet road where not many vehicles pass.
  39. 1:43Someone asks you to count how many cars
  40. 1:45go by in 1 hour. You cannot just count.
  41. 1:48You must also record the number somehow,
  42. 1:51but you are not given a notebook or pen.
  43. 1:53Instead, you're given four light bulbs,
  44. 1:56each with its own switch. You can turn
  45. 1:58each bulb on or off whenever you like.
  46. 2:02At the end of 1 hour, you must use these
  47. 2:04bulbs to show exactly how many cars
  48. 2:07passed. You can do this in two ways.
  49. 2:10First method, switch on one bulb for the
  50. 2:12first car, the second bulb for the
  51. 2:14second car, and so on. This works fine,
  52. 2:17but only up to four cars. Once all four
  53. 2:20bulbs are on, you cannot record anymore.
  54. 2:23If a fifth car passes, you have no way
  55. 2:26to show it. So, there is a second
  56. 2:28method. When the first car goes by, you
  57. 2:30switch on the first bulb. When the
  58. 2:33second car comes, you switch off the
  59. 2:35first bulb and turn on the second. For
  60. 2:38the third car, you keep the second bulb
  61. 2:40on and also turn on the first again. For
  62. 2:43the fourth car, you turn off both the
  63. 2:45first and second bulbs and turn on the
  64. 2:48third bulb. For the fifth car, you keep
  65. 2:50the third bulb on and switch on the
  66. 2:53first again. If you continue like this,
  67. 2:55only when the 15th car passes will all
  68. 2:58four bulbs be on. That means with four
  69. 3:01bulbs, you can represent numbers from 0
  70. 3:04to 15. In other words, four bulbs with
  71. 3:08on and off states can create 16
  72. 3:10different combinations. These
  73. 3:12combinations are shown in this table.
  74. 3:15When all bulbs are off, that represents
  75. 3:17zero. When all are on, that represents
  76. 3:2015. Any other combination in between
  77. 3:24represents a number between 0 and 15.
  78. 3:27So, with just four bulbs, you can not
  79. 3:29only record the number, but anyone else
  80. 3:31looking at the bulbs later can also read
  81. 3:34the same number from it. This is very
  82. 3:36similar to how a computer's memory
  83. 3:38works. We often say that computers use
  84. 3:41binary and that memory is stored in
  85. 3:43zeros and ones. But in reality, there
  86. 3:46are no actual zeros and ones inside the
  87. 3:49computer. What exists are only two
  88. 3:51states on and off. We call off zero and
  89. 3:56on one. In our bulb example earlier, a
  90. 3:59glowing bulb can be called one and an
  91. 4:02unlit bulb can be called zero. In that
  92. 4:05case, this table can also be written in
  93. 4:07the form of zeros and ones as shown
  94. 4:10here. That is why we call it the binary
  95. 4:13system. But remember, at its core, there
  96. 4:16are no actual ones and zeros. It is
  97. 4:19simply on and off states. In the bulb
  98. 4:22example, to read the result, we had to
  99. 4:25look with our eyes and see which bulbs
  100. 4:27were glowing. But now imagine that
  101. 4:30instead of bulbs, we are using devices
  102. 4:32called capacitors. Some of you may
  103. 4:34already know what a capacitor is. For
  104. 4:37those who do not, you just need to
  105. 4:39remember this. A capacitor is a tiny
  106. 4:42device that can temporarily store a
  107. 4:44small amount of electric charge. You can
  108. 4:46think of it like a miniature battery.
  109. 4:48The difference is that unlike a battery,
  110. 4:51a capacitor can charge and discharge
  111. 4:53very quickly, though it cannot hold that
  112. 4:55charge for long. Now, let us replace the
  113. 4:58four bulbs with four capacitors. Instead
  114. 5:00of switching on a bulb, we charge a
  115. 5:03capacitor. Instead of switching off a
  116. 5:06bulb, we discharge it. If all four
  117. 5:08capacitors are discharged, that
  118. 5:10represents zero. If all four are
  119. 5:13charged, that represents 15. The
  120. 5:16intermediate states work exactly like
  121. 5:18they did in the bulb example. The
  122. 5:20advantage now is that we no longer need
  123. 5:22to count glowing bulbs with our eyes. We
  124. 5:25can simply connect an electrical circuit
  125. 5:27and it can detect which capacitors are
  126. 5:29charged and which are not. That means
  127. 5:32the numbers stored in these capacitors
  128. 5:34can be read directly by a circuit. In
  129. 5:37short, these capacitors can be used to
  130. 5:39store any number between 0 and 15 and we
  131. 5:43can read that number whenever needed.
  132. 5:45This is in principle how computer memory
  133. 5:48stores data. Instead of bulbs, computers
  134. 5:51use capacitors. And to control the flow
  135. 5:53of charge into and out of a capacitor,
  136. 5:56they use electronic switches called
  137. 5:58transistors. Instead of the mechanical
  138. 6:01switches we used in our example, so the
  139. 6:03smallest unit of memory is made up of a
  140. 6:06single capacitor and a single
  141. 6:08transistor. Millions and millions of
  142. 6:10such units are combined to make up
  143. 6:12computer memory. In this system, a
  144. 6:15charged capacitor is called a one and a
  145. 6:18discharged capacitor is called a zero.
  146. 6:21This is what we mean when we say
  147. 6:23computers use the binary system. The
  148. 6:25smallest unit made of one capacitor and
  149. 6:28one transistor is called a bit and each
  150. 6:30bit can only exist in one of two states
  151. 6:34zero or one. If this much is clear, we
  152. 6:37can now move to the next stage. Now the
  153. 6:40next thing we need to understand is
  154. 6:42this. How do different types of data
  155. 6:45like text, images and more get stored in
  156. 6:48this simple on and off format or in
  157. 6:50other words in the binary format of 0
  158. 6:53and one. From here on in the video we
  159. 6:56will mostly use the terms 0 and one.
  160. 6:59Remember one means either a glowing bulb
  161. 7:02or a charged capacitor. Zero means
  162. 7:05either an unlit bulb or a discharged
  163. 7:08capacitor. Keep this picture in mind.
  164. 7:11Earlier we saw that with four bulbs we
  165. 7:13could form 16 different combinations.
  166. 7:16That meant we could represent numbers
  167. 7:18from 0 to 15. By the same logic if we
  168. 7:22had eight bulbs then 256 different
  169. 7:25combinations would be possible. Here is
  170. 7:28why a single bulb has two possible
  171. 7:30states on or off. With two bulbs the
  172. 7:34total combinations are 2 * 2 = 4. With
  173. 7:38three bulbs, 2 * 2 * 2 equals 8
  174. 7:42combinations. With four bulbs, 2 to the
  175. 7:45power of 4, which equals 16
  176. 7:47combinations. That is what we saw
  177. 7:50earlier. So, continuing this pattern
  178. 7:52with eight bulbs, we get 2 to the power
  179. 7:55of 8 equals 256 possible combinations.
  180. 8:00That means with eight bulbs, we can
  181. 8:02represent every number from 0 to 255.
  182. 8:06This combination shown here represents
  183. 8:09zero and this one represents 255.
  184. 8:13All the other states in between
  185. 8:15represent the numbers from 1 to 254.
  186. 8:19With these 256 combinations, we can
  187. 8:22represent everything that qualifies as
  188. 8:24text. capital and small English
  189. 8:26alphabets, numbers from 0 to 9,
  190. 8:29punctuation marks like full stop, comma,
  191. 8:31apostrophe and even special characters
  192. 8:34such as number sign or asterisk. There
  193. 8:36are standard systems for this and one of
  194. 8:38the most widely used is called ASI code.
  195. 8:42According to ASI, every text character
  196. 8:44and symbol is assigned a unique code
  197. 8:47between 0 and 255.
  198. 8:50The table that lists all these codes is
  199. 8:52called the ASKI table. For example, the
  200. 8:55capital letter A has an ASKI code of 65.
  201. 8:59If you open a word file, hold the Alt
  202. 9:02key and type 65, the letter A will
  203. 9:05appear on the screen. In this way, every
  204. 9:08character in the table can be typed
  205. 9:10using its ASI code. Each ASKI code also
  206. 9:13has a corresponding binary code. For the
  207. 9:16letter A, the ASKI code is 65 and this
  208. 9:19is its binary form. When you type A on
  209. 9:22the keyboard, what actually happens
  210. 9:24inside the computer's memory is that
  211. 9:26eight capacitors switch to a particular
  212. 9:29onoff pattern that represents this
  213. 9:31binary number. That on and off state of
  214. 9:34the capacitors is what becomes the
  215. 9:36computer's version of the letter A. So
  216. 9:38to represent a single character, eight
  217. 9:41bits are required. That is eight
  218. 9:44capacitors. This set of eight bits is
  219. 9:46what we call a bite. One character
  220. 9:49equals one bite of memory. If you create
  221. 9:51a new text file and type only the letter
  222. 9:54A, the size of that file will be one
  223. 9:56bite. If you type hello five letters,
  224. 9:59the file size will be 5 bytes. This
  225. 10:02calculation works exactly if you do it
  226. 10:04in command prompt or in older DOS
  227. 10:07systems. In Windows, however, the file
  228. 10:09size will appear larger because Windows
  229. 10:12automatically adds extra formatting
  230. 10:14information. The important point is
  231. 10:16this. Whenever we type any text, every
  232. 10:19character has a corresponding ASKI code.
  233. 10:22That code has a corresponding binary
  234. 10:24code. And in memory, the on-off states
  235. 10:27of capacitors represent that binary
  236. 10:29code. This is how all text content is
  237. 10:32stored inside a computer. Now, let us
  238. 10:35see how an image or a picture is stored
  239. 10:37in computer memory. Things change a
  240. 10:40little here because images need to
  241. 10:42represent different colors. Inside a
  242. 10:44computer, an image is created by putting
  243. 10:47together tiny dots called pixels. If you
  244. 10:50zoom into an image closely, you can see
  245. 10:52the individual pixels that make it up.
  246. 10:54Suppose we have an image that is 100
  247. 10:57pixels wide and 100 pixels tall. That
  248. 11:00means the image has a total of 10,000
  249. 11:02pixels. Each of those pixels can have
  250. 11:05its own color. So when storing an image,
  251. 11:08it is not enough to save only how many
  252. 11:11pixels there are. The computer must also
  253. 11:14save the color of each pixel. For now,
  254. 11:17let us assume we are using a computer
  255. 11:19with an 8 bit color system. That means
  256. 11:21each pixel will be defined by 8 bits.
  257. 11:24Earlier, we saw that 8 bits can create
  258. 11:27256 different combinations. With these
  259. 11:31combinations, we can represent 256
  260. 11:34different colors. These are the colors
  261. 11:37shown here. The very first color
  262. 11:40corresponding to this binary code is
  263. 11:42black. The last one, the 256th color is
  264. 11:47white. All the other colors fall in
  265. 11:49between, each mapped to its own binary
  266. 11:52code. So in the 8- bit color system,
  267. 11:55each pixel is represented by 8 bits. For
  268. 11:58example, if the first pixel of our image
  269. 12:01is white, its binary code will look like
  270. 12:04this. 1 1 1 1 1.
  271. 12:07In this way, every pixel in the image
  272. 12:10has its own 8- bit binary code. Since 8
  273. 12:13bits make one bite, each pixel requires
  274. 12:16one bite of memory. That means for our
  275. 12:19example image with 10,000 pixels, the
  276. 12:21file size will be 10,000 bytes. So, the
  277. 12:25image you see on your screen with all
  278. 12:27its colors is ultimately stored in a
  279. 12:30computer as nothing more than zeros and
  280. 12:32ones. In other words, it is stored as a
  281. 12:35set of capacitors each in one of two
  282. 12:38states on or off. We have now seen how
  283. 12:41text is stored and how images are stored
  284. 12:44and the difference between them. In the
  285. 12:46same way, there are specific methods for
  286. 12:48storing music and for storing video. But
  287. 12:51in the end, no matter what type of data
  288. 12:54it is, everything in a computer is
  289. 12:56stored in the same simple way as on and
  290. 12:59off states. What we have explained so
  291. 13:02far is the most basic and simple way to
  292. 13:05understand how computer memory works. In
  293. 13:08reality, modern computers function in
  294. 13:11ways that are a little more complicated.
  295. 13:13Let me quickly mention some of those
  296. 13:15differences. Earlier, when we spoke
  297. 13:17about storing image colors, we
  298. 13:19considered an 8-bit color system. That
  299. 13:22system can only produce 256
  300. 13:25colors, but this gives only one or two
  301. 13:28shades for each main color. For example,
  302. 13:31the ASI table of 8-bit colors might show
  303. 13:34only three or four shades of yellow and
  304. 13:36red. But if we want to display a picture
  305. 13:39of a sunset, we need a smooth transition
  306. 13:41from yellow to red with many shades in
  307. 13:44between. That is not possible with only
  308. 13:478 bits. That is why today's computers
  309. 13:50use a 24bit system often called the true
  310. 13:53color system. Here 8 bits are used for
  311. 13:56red, 8 bits for green and 8 bits for
  312. 13:59blue together making 24 bits. With this
  313. 14:03system 256 * 256 * 256 = 16.7 million
  314. 14:11colors are possible. Of course, as the
  315. 14:14number of colors increases, the file
  316. 14:16size of the image also increases.
  317. 14:18Similarly, earlier we said that an image
  318. 14:21of size 100x 100 pixels or 10,000 pixels
  319. 14:25in total would need 10,000 bytes to
  320. 14:28store in memory. Saving an image like
  321. 14:31this is called the RAW format. But
  322. 14:34saving images in RAW format takes up a
  323. 14:37lot of space. That is why we often use
  324. 14:39compressed formats to reduce file size.
  325. 14:42One common format is JPEG. Using such
  326. 14:46compression, we can make image files
  327. 14:48much smaller. Now, let us return to
  328. 14:50memory itself. We said earlier that
  329. 14:53computers use capacitors and transistors
  330. 14:55to store data. This type of memory is
  331. 14:57called dynamic Ram. The smallest unit
  332. 15:01here is one capacitor and one transistor
  333. 15:04which together can store one bit. So
  334. 15:07when we say a computer has 4 GB of RAM,
  335. 15:11it means there are about 35 billion of
  336. 15:13these tiny memory units inside it. That
  337. 15:16sounds unbelievable. But remember these
  338. 15:19capacitors and transistors are not the
  339. 15:21large components we see in electronics
  340. 15:23shops. They are manufactured at the
  341. 15:25scale of nanometers. That is how
  342. 15:28billions of them can fit into a single 4
  343. 15:30GB memory chip. Modern computers use
  344. 15:34many other ways to store memory besides
  345. 15:36capacitors and transistors. For example,
  346. 15:39hard disks use magnetic discs and memory
  347. 15:42sticks use specially arranged
  348. 15:44transistors. There are many such
  349. 15:46technologies and I am not listing all of
  350. 15:49them here. But wherever it is stored,
  351. 15:52the principle remains the same. Data is
  352. 15:55ultimately stored as two states on and
  353. 15:58off. We represent these states as zero
  354. 16:01and one. the binary form. Computers are
  355. 16:04a rapidly developing field and by the
  356. 16:07time you watch this video, there may
  357. 16:09already be more advanced methods than
  358. 16:11the ones I have described. But I hope
  359. 16:13this video has given you a clear and
  360. 16:15simple understanding of how computer
  361. 16:17memory works. If you enjoyed this video,
  362. 16:20do not forget to like and share it. For
  363. 16:22more such videos, subscribe to this
  364. 16:24channel and enable the bell icon. And if
  365. 16:27you ever feel like asking yourself why
  366. 16:30should I know all this remember the
  367. 16:33reward of knowing is knowledge itself.

About this transcript

This page contains the full transcript of How Simple On/Off Switches Store the Digital World | Working of Computer Memory by Science Simplified 4 All, generated from the public captions YouTube serves with the video. The transcript has 2,605 words across 367 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 translate the transcript into 100+ languages.

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, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.