If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

CPU, memory, input & output

Smart fabric designer Madison Maxey and founder and maker Danielle Applestone explain the different components that allow computers to input, store, process, and output information.

Want to join the conversation?

  • male robot hal style avatar for user Gaurav Negi
    OK its getting a little confusing if 1 means on and 0 off so how does a computer works when there is no electricity?
    (7 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Cameron
      There are two types of storage:
      - volatile, which requires electricity to remember the 0s and 1s (like RAM)
      - non-volatile, which doesn't require electricity to remember the 0s and 1s (like a hard drive, flash drive, floopy disk, mangnetic tape, ROM, CD , DVD, Blu Ray, etc.)

      When your computer is on, it stores 1s and 0s in RAM (volatile memory) which requires electricity. If you want to keep the 1s and 0s after the computer is turned off you need to store it in non-volatile memory (usually your hard drive).

      If you are wondering how the computer figures out how to load the operating system when it starts here's how:
      - Computers have a BIOS chip which stores the instructions (in ROM or flash memory, which is non-volatile) on how to load the operating system.
      - The first thing the computer does when it start is run the instructions on the BIOS chip
      See: https://en.wikipedia.org/wiki/BIOS
      (42 votes)
  • blobby green style avatar for user Cesar Nunez
    Hi everyone,
    I’m thankful for your videos. I’m having a hard time, though. It’s very difficult to understand how a computer “stores” information. It’s also challenging to comprehend how a computer “listens” or “interprets” electrical signals. I can’t seem to get the “how” - as much as the “what” - a computer does. I get visually that a letter can be represented by 1s and 0s, but I don’t get how the computer itself does what my eyes do? It’s hard to ask, but just how does a computer even “remember”? For example: I input “A,” the computer then “converts?” the “A” to binary (how?), then that binary (which is/are electrical signals?) is sent to storage/processing (what does that even mean? How can something be “stored”?), and then it’s output again as binary, but somehow represented as “A”? Sorry if I’m confusing, but my brain is taking this input and displaying a “?”. :).
    (14 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user zvemoxes
      You are asking all the right questions. Let me know if you still get notifications for this site and see my message, I will try and answer some of those questions for you. The things you ask about are the absolute most important part of computing, and yet they are rarely discussed in easy to understand language, because the processes are so complex.
      (3 votes)
  • blobby green style avatar for user Jeff Creamer
    At around , what's the source of this amazing footage of a darkened room where young men are jumping between platforms as they are being raised and lowered? Is this a Kinect demonstration? I'm fascinated.
    (7 votes)
    Default Khan Academy avatar avatar for user
  • leafers seed style avatar for user Ali Mowahed
    I know electrons, fields, electricity travel through wires. But how do numbers travel through wires? and why is it that I have never seen those two integers (0s and 1s) inside the computer anywhere? Do I need an electron microscope to see them? Furthermore, everybody says that it is (0s and 1s). Are they made of ink, glass, metal.. or? what about their color, what is their color? Maybe they are clear so it is hard to see them. And are they glued to something or just float around? I don't know if I don't know how to speak and understand English or is it that nobody knows what they are actually saying or how to speak proper English?
    Or is it that really that there is no such thing as 0s and 1s at all. However, a delusion of a very large global form possessed people and they repeat what the first person that came up with it said it without knowing what he/she was really saying and it took a life of its own.
    Maybe what is really traveling anywhere is not the image of 0s and 1s but simply electric signals. And electric signals have nothing to do with the integer 0 and 1. numbers, letters, pictures, sounds, videos don't travel through wires. Electric signals and pulses do. The also don't store anywhere either, energy and charges store not 0 and 1 digits.
    Somebody tell me that I make no sense at all but please prove it. Make your case.
    But if I am actually correct why don't people clearly say that what they mean by 0 is one type of signal and what they mean by 1 is another type of signal, instead of showing millions of 0's and 1's flowing through circuits and even screen?
    But strange as this is, why on earth nobody shows electrons moving through wires and 0's or positive charges as 1's when they explain how current moves through wires? They should. Bunch of 0's moving one way and bunch of 1's moving the opposite way etc.?
    (6 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user s20150464
    When the computer start up, does it operates like the following?
    [POST(power-on self-test) main duties replaced by BIOS]
    BIOS Boot process:
    1. the BIOS proceeds until locating boot loader software on boot device
    2. loads the first sector to identify whether it is bootable
    3. checks for the boot signature in last 2 bytes
    4. transfers control to the sector
    5. sector interprets data structure
    (all from wiki -> did I misinterpret it?)
    (4 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user ultrakanman
    What is the binary code or number for the 😃 symbol.
    Edit: why can't you copy and paste emoji into editors (you have to put a code instead of 😃).
    (4 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user Gottlieb, Sterling
    What are the differences between the AMD, Intel, and arm core processors? Also which lasts the longest?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • orange juice squid orange style avatar for user tylergraves
    Ever heard of the cat named bat he likes to play baseball with his cat.
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Bunyod Suvonov
    Assalom alaykum. I want to learn about computer's memory and how does it work. Please
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Shane McGookey
      There is actually quite a bit of content to cover in order to answer that question, and covering it within a single response would be impossible, but I will try to provide you with the best groundwork that I am able to.

      When we refer to "memory" in a computer, we are referring to various different types of memory. These types include:

      Main Memory (commonly referred to as RAM or Random Access Memory): Main Memory is byte-addressable memory, meaning that you can address specific objects that are stored in main memory. When a program is running, both the data that the program is using at that moment and the binary instructions that constitute the program are stored in Main Memory. Main Memory is made up of DRAM, or Dynamic Random Access Memory.

      Secondary Storage: The secondary storage on your device will likely be either a Hard Disk Drive or a Solid State Drive. Secondary storage is used to store data long-term, including when the device is powered down. Programs are saved into your secondary storage device, and are loaded into Main Memory when you run the program on your computer.

      Main Memory is volatile, whilst secondary storage is non-volatile. Volatile means that the data and instructions stored in memory will be lost when the machine loses power or is shut off. Non-volatile is the opposite; any data or program instructions stored in non-volatile memory will be maintained even if power is lost, or if the machine is shut down. To perhaps add some clarity, your Operating System (OS) is stored on your secondary storage device, so that it resides in non-volatile memory and can be loaded when the machine is booted up.

      You also have caches and registers. Cache memory is located very closely to the Central Processing Unit (CPU). Cache memory is very fast, very expensive, and relatively small. The benefit of cache memory is that the CPU can access the data in cache memory much faster than it can access data in Main Memory. Therefore, any data or instructions that are repeatedly used by the CPU will be stored in cache memory. Cache can have different levels such as L1, L2, L3, etc. Cache memory is made up of SRAM or Static Random Access Memory.

      The registers are your smallest units of memory, and they store one "word" of data (generally 32-bits or 64-bits of data). The CPU directly interfaces with the registers, and will load data from the registers and push data to them. A hierarchy exists, such that data is loaded from the cache into the registers, and is loaded from Main Memory into the cache, and from secondary storage into Main Memory. As you go up the hierarchy (with registers being at the bottom), it becomes slower and slower to access the data or instructions.

      If you want to fundamentally understand how memory works, that would involve a dive into Multiplexers, Data Flip-Flops, the computer's clock, and otherwise. It would be much too in-depth, so I will leave you here and will let your curiosity drive you to where you wish to adventure next.
      (5 votes)
  • blobby green style avatar for user cjm8l2
    How exactly does the computer know which ones and zeros stand for different things? For example, if you type the letter B, how does it distinguish it from a different type of input?
    (4 votes)
    Default Khan Academy avatar avatar for user

Video transcript

(rock music) - Hi, my name is Madison Maxey. I have a company called Loomia, and we focus on making smart fabrics for smart clothing and smart soft-good products. The sky's the limit when it comes to textiles. - My name is Danielle Applestone, and I'm CEO of Other Machine Copmany. We build a desktop milling machine. A milling machine takes a rotating cutting tool and moves it through material to create a 3-D object. - Under the hood, all computers do the same four basic things. They input information, store, and process the information, and then output information. Each of these things is done by a different part of the computer. There are input devices that take input from the outside world and convert it into binary information. There's memory to store this information. There's a central processing unit, or CPU, where all the calculations are done. And finally, there are output devices that take information and convert it into physical output. - [Danielle] Let's talk about input first. Computers can take many different types of input, like the keyboard of a computer, the touch pad of a phone, a camera, a microphone, or a GPS, but even the sensors on a car, a thermostat, or a drone are also different input devices. Now, let's look at a simple example of how input travels through a computer and becomes output. When you press a key on your keyboard, let's say the letter B, the keyboard converts the letter to a number. That number is sent as binary, ones and zeros, into the computer. Starting from this number, the CPU calculates how to display the letter B pixel-by-pixel. The CPU requests step-by-step instructions from memory, which tell it how to draw the letter B. The CPU runs these instructions and stores the results as pixels in memory. Finally, this pixel information is sent in binary to the screen. The screen is an output device, which converts the binary signals into the tiny lights and colors that make up what you see. - This all happens so quickly it feels instantaneous, but to display each letter, a computer runs thousands of instructions, starting from the moment your finger presses the keyboard. - In that example, the output device was the screen, but there are many different types of output, which take a binary signal from the computer and do something in the physical world. For example, a speaker will play sound and a 3-D printer will print an object. Output devices can also control physical motion, like a robotic arm, the motor of a car, or the cutting tool of the milling machine that my company makes. New types of inputs and outputs let computers interact with the world in entirely new ways. This has been helped out by improvements to the speed and size of the memory and CPU. The more complicated a task is and the more information that's input or output, the more processing power and memory a computer needs. Typing letters on a screen may be easy, but to do complicated 3-D graphics or record a high-definition movie, modern computers often have multiple CPUs to process all that information, and many gigabits of memory to store it. - No matter what it is you want to do with a computer, every single action is about inputting information from the physical world, storing and processing that information, and getting some output back into the physical world.