How Simple On/Off Switches Store the Digital World | Working of Computer Memory — Transcript
Full transcript
- 0:00Have you ever wondered how computer
- 0:02memory actually works? Today, all the
- 0:04books you could read in your lifetime
- 0:06can fit into a single tiny memory chip.
- 0:09And it is not just books, your photos,
- 0:12music, movies, bank details, even your
- 0:15passport or medical records. Almost
- 0:17everything about you now lives in
- 0:19digital form. But how does this digital
- 0:22memory really work? We have all heard
- 0:24that computers use a binary language.
- 0:27But how can just two numbers 0 and 1
- 0:30represent such a wide variety of data?
- 0:33Back in the early days when we tried to
- 0:35know more about these machines, the only
- 0:38answers we got were confusing diagrams
- 0:40and technical terms like CPU, memory
- 0:43unit and so on. Today everyone carries a
- 0:46computer in their pocket in the form of
- 0:48a smartphone. Yet hardly anyone knows
- 0:51the simple secret behind it all. In this
- 0:54video, I will break down how computer
- 0:56memory really works in the simplest way
- 0:59possible. And by the end, you will see
- 1:01how the simple idea of on and off builds
- 1:05our entire digital world.
- 1:11Hi friends, welcome to a new video on
- 1:14science simplified for all. We often
- 1:16hear that computers work using the
- 1:18binary system. That means a computer has
- 1:21only two numbers to deal with 0 and one.
- 1:25Every book, every picture, every song,
- 1:28every movie stored inside a computer is
- 1:30represented only by these two numbers 0
- 1:33and 1. But how does that really happen?
- 1:36Let us understand this with a simple
- 1:37example. Imagine you are standing on a
- 1:40quiet road where not many vehicles pass.
- 1:43Someone asks you to count how many cars
- 1:45go by in 1 hour. You cannot just count.
- 1:48You must also record the number somehow,
- 1:51but you are not given a notebook or pen.
- 1:53Instead, you're given four light bulbs,
- 1:56each with its own switch. You can turn
- 1:58each bulb on or off whenever you like.
- 2:02At the end of 1 hour, you must use these
- 2:04bulbs to show exactly how many cars
- 2:07passed. You can do this in two ways.
- 2:10First method, switch on one bulb for the
- 2:12first car, the second bulb for the
- 2:14second car, and so on. This works fine,
- 2:17but only up to four cars. Once all four
- 2:20bulbs are on, you cannot record anymore.
- 2:23If a fifth car passes, you have no way
- 2:26to show it. So, there is a second
- 2:28method. When the first car goes by, you
- 2:30switch on the first bulb. When the
- 2:33second car comes, you switch off the
- 2:35first bulb and turn on the second. For
- 2:38the third car, you keep the second bulb
- 2:40on and also turn on the first again. For
- 2:43the fourth car, you turn off both the
- 2:45first and second bulbs and turn on the
- 2:48third bulb. For the fifth car, you keep
- 2:50the third bulb on and switch on the
- 2:53first again. If you continue like this,
- 2:55only when the 15th car passes will all
- 2:58four bulbs be on. That means with four
- 3:01bulbs, you can represent numbers from 0
- 3:04to 15. In other words, four bulbs with
- 3:08on and off states can create 16
- 3:10different combinations. These
- 3:12combinations are shown in this table.
- 3:15When all bulbs are off, that represents
- 3:17zero. When all are on, that represents
- 3:2015. Any other combination in between
- 3:24represents a number between 0 and 15.
- 3:27So, with just four bulbs, you can not
- 3:29only record the number, but anyone else
- 3:31looking at the bulbs later can also read
- 3:34the same number from it. This is very
- 3:36similar to how a computer's memory
- 3:38works. We often say that computers use
- 3:41binary and that memory is stored in
- 3:43zeros and ones. But in reality, there
- 3:46are no actual zeros and ones inside the
- 3:49computer. What exists are only two
- 3:51states on and off. We call off zero and
- 3:56on one. In our bulb example earlier, a
- 3:59glowing bulb can be called one and an
- 4:02unlit bulb can be called zero. In that
- 4:05case, this table can also be written in
- 4:07the form of zeros and ones as shown
- 4:10here. That is why we call it the binary
- 4:13system. But remember, at its core, there
- 4:16are no actual ones and zeros. It is
- 4:19simply on and off states. In the bulb
- 4:22example, to read the result, we had to
- 4:25look with our eyes and see which bulbs
- 4:27were glowing. But now imagine that
- 4:30instead of bulbs, we are using devices
- 4:32called capacitors. Some of you may
- 4:34already know what a capacitor is. For
- 4:37those who do not, you just need to
- 4:39remember this. A capacitor is a tiny
- 4:42device that can temporarily store a
- 4:44small amount of electric charge. You can
- 4:46think of it like a miniature battery.
- 4:48The difference is that unlike a battery,
- 4:51a capacitor can charge and discharge
- 4:53very quickly, though it cannot hold that
- 4:55charge for long. Now, let us replace the
- 4:58four bulbs with four capacitors. Instead
- 5:00of switching on a bulb, we charge a
- 5:03capacitor. Instead of switching off a
- 5:06bulb, we discharge it. If all four
- 5:08capacitors are discharged, that
- 5:10represents zero. If all four are
- 5:13charged, that represents 15. The
- 5:16intermediate states work exactly like
- 5:18they did in the bulb example. The
- 5:20advantage now is that we no longer need
- 5:22to count glowing bulbs with our eyes. We
- 5:25can simply connect an electrical circuit
- 5:27and it can detect which capacitors are
- 5:29charged and which are not. That means
- 5:32the numbers stored in these capacitors
- 5:34can be read directly by a circuit. In
- 5:37short, these capacitors can be used to
- 5:39store any number between 0 and 15 and we
- 5:43can read that number whenever needed.
- 5:45This is in principle how computer memory
- 5:48stores data. Instead of bulbs, computers
- 5:51use capacitors. And to control the flow
- 5:53of charge into and out of a capacitor,
- 5:56they use electronic switches called
- 5:58transistors. Instead of the mechanical
- 6:01switches we used in our example, so the
- 6:03smallest unit of memory is made up of a
- 6:06single capacitor and a single
- 6:08transistor. Millions and millions of
- 6:10such units are combined to make up
- 6:12computer memory. In this system, a
- 6:15charged capacitor is called a one and a
- 6:18discharged capacitor is called a zero.
- 6:21This is what we mean when we say
- 6:23computers use the binary system. The
- 6:25smallest unit made of one capacitor and
- 6:28one transistor is called a bit and each
- 6:30bit can only exist in one of two states
- 6:34zero or one. If this much is clear, we
- 6:37can now move to the next stage. Now the
- 6:40next thing we need to understand is
- 6:42this. How do different types of data
- 6:45like text, images and more get stored in
- 6:48this simple on and off format or in
- 6:50other words in the binary format of 0
- 6:53and one. From here on in the video we
- 6:56will mostly use the terms 0 and one.
- 6:59Remember one means either a glowing bulb
- 7:02or a charged capacitor. Zero means
- 7:05either an unlit bulb or a discharged
- 7:08capacitor. Keep this picture in mind.
- 7:11Earlier we saw that with four bulbs we
- 7:13could form 16 different combinations.
- 7:16That meant we could represent numbers
- 7:18from 0 to 15. By the same logic if we
- 7:22had eight bulbs then 256 different
- 7:25combinations would be possible. Here is
- 7:28why a single bulb has two possible
- 7:30states on or off. With two bulbs the
- 7:34total combinations are 2 * 2 = 4. With
- 7:38three bulbs, 2 * 2 * 2 equals 8
- 7:42combinations. With four bulbs, 2 to the
- 7:45power of 4, which equals 16
- 7:47combinations. That is what we saw
- 7:50earlier. So, continuing this pattern
- 7:52with eight bulbs, we get 2 to the power
- 7:55of 8 equals 256 possible combinations.
- 8:00That means with eight bulbs, we can
- 8:02represent every number from 0 to 255.
- 8:06This combination shown here represents
- 8:09zero and this one represents 255.
- 8:13All the other states in between
- 8:15represent the numbers from 1 to 254.
- 8:19With these 256 combinations, we can
- 8:22represent everything that qualifies as
- 8:24text. capital and small English
- 8:26alphabets, numbers from 0 to 9,
- 8:29punctuation marks like full stop, comma,
- 8:31apostrophe and even special characters
- 8:34such as number sign or asterisk. There
- 8:36are standard systems for this and one of
- 8:38the most widely used is called ASI code.
- 8:42According to ASI, every text character
- 8:44and symbol is assigned a unique code
- 8:47between 0 and 255.
- 8:50The table that lists all these codes is
- 8:52called the ASKI table. For example, the
- 8:55capital letter A has an ASKI code of 65.
- 8:59If you open a word file, hold the Alt
- 9:02key and type 65, the letter A will
- 9:05appear on the screen. In this way, every
- 9:08character in the table can be typed
- 9:10using its ASI code. Each ASKI code also
- 9:13has a corresponding binary code. For the
- 9:16letter A, the ASKI code is 65 and this
- 9:19is its binary form. When you type A on
- 9:22the keyboard, what actually happens
- 9:24inside the computer's memory is that
- 9:26eight capacitors switch to a particular
- 9:29onoff pattern that represents this
- 9:31binary number. That on and off state of
- 9:34the capacitors is what becomes the
- 9:36computer's version of the letter A. So
- 9:38to represent a single character, eight
- 9:41bits are required. That is eight
- 9:44capacitors. This set of eight bits is
- 9:46what we call a bite. One character
- 9:49equals one bite of memory. If you create
- 9:51a new text file and type only the letter
- 9:54A, the size of that file will be one
- 9:56bite. If you type hello five letters,
- 9:59the file size will be 5 bytes. This
- 10:02calculation works exactly if you do it
- 10:04in command prompt or in older DOS
- 10:07systems. In Windows, however, the file
- 10:09size will appear larger because Windows
- 10:12automatically adds extra formatting
- 10:14information. The important point is
- 10:16this. Whenever we type any text, every
- 10:19character has a corresponding ASKI code.
- 10:22That code has a corresponding binary
- 10:24code. And in memory, the on-off states
- 10:27of capacitors represent that binary
- 10:29code. This is how all text content is
- 10:32stored inside a computer. Now, let us
- 10:35see how an image or a picture is stored
- 10:37in computer memory. Things change a
- 10:40little here because images need to
- 10:42represent different colors. Inside a
- 10:44computer, an image is created by putting
- 10:47together tiny dots called pixels. If you
- 10:50zoom into an image closely, you can see
- 10:52the individual pixels that make it up.
- 10:54Suppose we have an image that is 100
- 10:57pixels wide and 100 pixels tall. That
- 11:00means the image has a total of 10,000
- 11:02pixels. Each of those pixels can have
- 11:05its own color. So when storing an image,
- 11:08it is not enough to save only how many
- 11:11pixels there are. The computer must also
- 11:14save the color of each pixel. For now,
- 11:17let us assume we are using a computer
- 11:19with an 8 bit color system. That means
- 11:21each pixel will be defined by 8 bits.
- 11:24Earlier, we saw that 8 bits can create
- 11:27256 different combinations. With these
- 11:31combinations, we can represent 256
- 11:34different colors. These are the colors
- 11:37shown here. The very first color
- 11:40corresponding to this binary code is
- 11:42black. The last one, the 256th color is
- 11:47white. All the other colors fall in
- 11:49between, each mapped to its own binary
- 11:52code. So in the 8- bit color system,
- 11:55each pixel is represented by 8 bits. For
- 11:58example, if the first pixel of our image
- 12:01is white, its binary code will look like
- 12:04this. 1 1 1 1 1.
- 12:07In this way, every pixel in the image
- 12:10has its own 8- bit binary code. Since 8
- 12:13bits make one bite, each pixel requires
- 12:16one bite of memory. That means for our
- 12:19example image with 10,000 pixels, the
- 12:21file size will be 10,000 bytes. So, the
- 12:25image you see on your screen with all
- 12:27its colors is ultimately stored in a
- 12:30computer as nothing more than zeros and
- 12:32ones. In other words, it is stored as a
- 12:35set of capacitors each in one of two
- 12:38states on or off. We have now seen how
- 12:41text is stored and how images are stored
- 12:44and the difference between them. In the
- 12:46same way, there are specific methods for
- 12:48storing music and for storing video. But
- 12:51in the end, no matter what type of data
- 12:54it is, everything in a computer is
- 12:56stored in the same simple way as on and
- 12:59off states. What we have explained so
- 13:02far is the most basic and simple way to
- 13:05understand how computer memory works. In
- 13:08reality, modern computers function in
- 13:11ways that are a little more complicated.
- 13:13Let me quickly mention some of those
- 13:15differences. Earlier, when we spoke
- 13:17about storing image colors, we
- 13:19considered an 8-bit color system. That
- 13:22system can only produce 256
- 13:25colors, but this gives only one or two
- 13:28shades for each main color. For example,
- 13:31the ASI table of 8-bit colors might show
- 13:34only three or four shades of yellow and
- 13:36red. But if we want to display a picture
- 13:39of a sunset, we need a smooth transition
- 13:41from yellow to red with many shades in
- 13:44between. That is not possible with only
- 13:478 bits. That is why today's computers
- 13:50use a 24bit system often called the true
- 13:53color system. Here 8 bits are used for
- 13:56red, 8 bits for green and 8 bits for
- 13:59blue together making 24 bits. With this
- 14:03system 256 * 256 * 256 = 16.7 million
- 14:11colors are possible. Of course, as the
- 14:14number of colors increases, the file
- 14:16size of the image also increases.
- 14:18Similarly, earlier we said that an image
- 14:21of size 100x 100 pixels or 10,000 pixels
- 14:25in total would need 10,000 bytes to
- 14:28store in memory. Saving an image like
- 14:31this is called the RAW format. But
- 14:34saving images in RAW format takes up a
- 14:37lot of space. That is why we often use
- 14:39compressed formats to reduce file size.
- 14:42One common format is JPEG. Using such
- 14:46compression, we can make image files
- 14:48much smaller. Now, let us return to
- 14:50memory itself. We said earlier that
- 14:53computers use capacitors and transistors
- 14:55to store data. This type of memory is
- 14:57called dynamic Ram. The smallest unit
- 15:01here is one capacitor and one transistor
- 15:04which together can store one bit. So
- 15:07when we say a computer has 4 GB of RAM,
- 15:11it means there are about 35 billion of
- 15:13these tiny memory units inside it. That
- 15:16sounds unbelievable. But remember these
- 15:19capacitors and transistors are not the
- 15:21large components we see in electronics
- 15:23shops. They are manufactured at the
- 15:25scale of nanometers. That is how
- 15:28billions of them can fit into a single 4
- 15:30GB memory chip. Modern computers use
- 15:34many other ways to store memory besides
- 15:36capacitors and transistors. For example,
- 15:39hard disks use magnetic discs and memory
- 15:42sticks use specially arranged
- 15:44transistors. There are many such
- 15:46technologies and I am not listing all of
- 15:49them here. But wherever it is stored,
- 15:52the principle remains the same. Data is
- 15:55ultimately stored as two states on and
- 15:58off. We represent these states as zero
- 16:01and one. the binary form. Computers are
- 16:04a rapidly developing field and by the
- 16:07time you watch this video, there may
- 16:09already be more advanced methods than
- 16:11the ones I have described. But I hope
- 16:13this video has given you a clear and
- 16:15simple understanding of how computer
- 16:17memory works. If you enjoyed this video,
- 16:20do not forget to like and share it. For
- 16:22more such videos, subscribe to this
- 16:24channel and enable the bell icon. And if
- 16:27you ever feel like asking yourself why
- 16:30should I know all this remember the
- 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.