< Return to Video

Inside your computer - Bettina Bair

  • 0:15 - 0:17
    Do you remember when you first realized
  • 0:17 - 0:18
    that your computer was more
  • 0:18 - 0:20
    than just a monitor and keyboard?
  • 0:20 - 0:23
    That between the mouse click and the video playing,
  • 0:23 - 0:25
    there was something that captured your intention,
  • 0:25 - 0:26
    understood it,
  • 0:26 - 0:27
    and made it real?
  • 0:28 - 0:30
    What is that something?
  • 0:30 - 0:32
    Is it gremlins?
  • 0:32 - 0:33
    Let's imagine that we can shrink down
  • 0:33 - 0:35
    to the size of an electron
  • 0:35 - 0:37
    and inject ourselves into a click of a mouse.
  • 0:37 - 0:39
    If you took your mouse apart,
  • 0:39 - 0:42
    you'd see that it's really a very simple machine.
  • 0:42 - 0:43
    It has a couple buttons
  • 0:43 - 0:46
    and a system for detecting motion and distance.
  • 0:46 - 0:48
    You might have an optical mouse
  • 0:48 - 0:50
    that makes these measurements with lights or sensors,
  • 0:50 - 0:52
    but older ones did this with a hard rubber ball
  • 0:52 - 0:54
    and some plastic wheels.
  • 0:54 - 0:56
    Same concept.
  • 0:56 - 0:57
    When you click a button on your mouse,
  • 0:57 - 0:59
    it sends a message to the computer
  • 0:59 - 1:01
    with information about its position.
  • 1:01 - 1:03
    When your mouse click is received,
  • 1:03 - 1:06
    it's handled by the basic input/output subsystem.
  • 1:06 - 1:09
    This subsystem acts like the eyes and ears
  • 1:09 - 1:12
    and mouth and hands of the computer.
  • 1:12 - 1:13
    Basically, it provides a way for the computer
  • 1:13 - 1:16
    to interact with its environment.
  • 1:16 - 1:18
    But, it also acts like a buffer
  • 1:18 - 1:21
    to keep the CPU from being overwhelmed by distractions.
  • 1:21 - 1:23
    In this case, I/O subsystem decides
  • 1:23 - 1:25
    that your mouse click is pretty important
  • 1:25 - 1:28
    so it generates an interrupt to the CPU.
  • 1:28 - 1:31
    "Hey, CPU! Got a click here."
  • 1:31 - 1:34
    The CPU, or central processing unit,
  • 1:34 - 1:36
    is the brains of the whole computer.
  • 1:36 - 1:39
    Just like your brain doesn't take up your whole body,
  • 1:39 - 1:41
    the CPU doesn't take up the whole computer,
  • 1:41 - 1:44
    but it runs the show all the same.
  • 1:44 - 1:46
    And, the CPU's job, it's whole job,
  • 1:46 - 1:48
    is fetching instructions from memory
  • 1:48 - 1:50
    and executing them.
  • 1:50 - 1:52
    So, while you're typing, typing, typing,
  • 1:52 - 1:53
    maybe really fast,
  • 1:53 - 1:55
    like 60 words a minute,
  • 1:55 - 1:57
    the CPU is fetching and executing
  • 1:57 - 1:59
    billions of instructions a second.
  • 1:59 - 2:02
    Yes, billions every second:
  • 2:02 - 2:04
    instructions to move your mouse around on the screen,
  • 2:04 - 2:07
    to run that clock widget on your desktop,
  • 2:07 - 2:08
    play your internet radio,
  • 2:08 - 2:11
    manage the files you're editing on the hard drive,
  • 2:11 - 2:12
    and much, much more.
  • 2:12 - 2:16
    Your computer's CPU is one heck of a multitasker!
  • 2:16 - 2:17
    "But, oh my gosh,
  • 2:17 - 2:18
    there's a very important mouse click
  • 2:18 - 2:20
    coming through now!
  • 2:20 - 2:22
    Let's drop everything now and deal with that!"
  • 2:23 - 2:24
    There are programs for everything
  • 2:24 - 2:26
    that the CPU does.
  • 2:26 - 2:28
    A special program for the mouse,
  • 2:28 - 2:29
    for the clock widget,
  • 2:29 - 2:30
    for the internet radio,
  • 2:30 - 2:33
    and for dealing with letters sent by the keyboard.
  • 2:33 - 2:35
    Each program was initially written by a human
  • 2:35 - 2:37
    in a human-readable programming language,
  • 2:37 - 2:38
    like Java,
  • 2:38 - 2:39
    C++,
  • 2:39 - 2:41
    or Python.
  • 2:41 - 2:43
    But, human programs take up a lot of space
  • 2:43 - 2:47
    and contain a lot of unnecessary information to a computer,
  • 2:47 - 2:49
    so they are compiled and made smaller
  • 2:49 - 2:52
    and stored in bits of ones and zeros in memory.
  • 2:52 - 2:55
    The CPU realizes that it needs instructions
  • 2:55 - 2:57
    for how to deal with this mouse click,
  • 2:57 - 2:59
    so it looks up the address for the mouse program
  • 2:59 - 3:01
    and sends a request to the memory subsystem
  • 3:01 - 3:04
    for instructions stored there.
  • 3:05 - 3:07
    Each instruction in the mouse device driver
  • 3:07 - 3:09
    is duly fetched and executed.
  • 3:09 - 3:12
    And, that's not nearly the end of the story!
  • 3:12 - 3:14
    Because the CPU learns that the mouse was clicked
  • 3:14 - 3:16
    when the cursor was over a picture
  • 3:16 - 3:18
    of a button on the monitor screen,
  • 3:18 - 3:21
    and so, the CPU asks memory for the monitor program
  • 3:21 - 3:23
    to find out what that button is.
  • 3:23 - 3:25
    And, then CPU has to ask memory
  • 3:25 - 3:27
    for the program for the button,
  • 3:27 - 3:28
    which means that the CPU needs
  • 3:28 - 3:30
    the monitor program again
  • 3:30 - 3:32
    to show the video associated with the button,
  • 3:32 - 3:34
    and so it goes.
  • 3:34 - 3:37
    And, let's just say there are a lot of programs involved
  • 3:37 - 3:39
    before you even see the button on the screen
  • 3:39 - 3:41
    light up when you clicked it.
  • 3:41 - 3:43
    So, just a simple task of clicking your mouse
  • 3:43 - 3:46
    means visiting all of the critical components
  • 3:46 - 3:48
    of your computer's architecture:
  • 3:48 - 3:49
    peripherals,
  • 3:49 - 3:51
    the basic input-output system,
  • 3:51 - 3:52
    the CPU,
  • 3:52 - 3:53
    programs,
  • 3:53 - 3:54
    and memory,
  • 3:54 - 3:56
    and not one gremlin.
Title:
Inside your computer - Bettina Bair
Speaker:
Bettina Bair
Description:

View full lesson: http://ed.ted.com/lessons/inside-your-computer-bettina-bair

How does a computer work? The critical components of a computer are the peripherals (including the mouse), the input/output subsystem (which controls what and how much information comes in and out), and the central processing unit (the brains), as well as human-written programs and memory. Bettina Bair walks us through the steps your computer takes with every click of the mouse.

Lesson by Bettina Bair, animation by Flaming Medusa Studios.

more » « less
Video Language:
English
Team:
closed TED
Project:
TED-Ed
Duration:
04:12
Krystian Aparta edited English subtitles for Inside your computer
Jessica Ruby approved English subtitles for Inside your computer
Jessica Ruby accepted English subtitles for Inside your computer
Jessica Ruby edited English subtitles for Inside your computer
Jessica Ruby edited English subtitles for Inside your computer
Andrea McDonough edited English subtitles for Inside your computer

English subtitles

Revisions Compare revisions