< Return to Video

Inside your computer - Bettina Bair

  • 0:15 - 0:17
    Do you remember when you first realized
  • 0:17 - 0:19
    that your computer was more
  • 0:19 - 0:21
    than just a monitor and keyboard?
  • 0:21 - 0:23
    That between the mouse click
    and the video playing,
  • 0:23 - 0:26
    there was something
    that captured your intention,
  • 0:26 - 0:26
    understood it,
  • 0:26 - 0:28
    and made it real?
  • 0:29 - 0:30
    What is that something?
  • 0:30 - 0:32
    Is it gremlins?
  • 0:32 - 0:34
    Let's imagine that we can shrink down
  • 0:34 - 0:35
    to the size of an electron
  • 0:35 - 0:38
    and inject ourselves
    into a click of a mouse.
  • 0:38 - 0:40
    If you took your mouse apart,
  • 0:40 - 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:47
    and a system for detecting
    motion and distance.
  • 0:47 - 0:48
    You might have an optical mouse
  • 0:48 - 0:51
    that makes these measurements
    with lights and sensors,
  • 0:51 - 0:53
    but older ones did this
    with a hard rubber ball
  • 0:53 - 0:55
    and some plastic wheels.
  • 0:55 - 0:56
    Same concept.
  • 0:56 - 0:58
    When you click the button on your mouse,
  • 0:58 - 1:00
    it sends a message to the computer
  • 1:00 - 1:02
    with information about its position.
  • 1:02 - 1:03
    When your mouse click is received,
  • 1:03 - 1:07
    it's handled by the basic
    input/output subsystem.
  • 1:07 - 1:09
    This subsystem acts like the eyes and ears
  • 1:09 - 1:12
    and mouth and hands of the computer.
  • 1:12 - 1:14
    Basically, it provides
    a way for the computer
  • 1:14 - 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:22 - 1:24
    In this case, the I/O subsystem decides
  • 1:24 - 1:26
    that your mouse click is pretty important
  • 1:26 - 1:29
    so it generates an interrupt to the CPU.
  • 1:29 - 1:31
    "Hey, CPU! Got a click here."
  • 1:32 - 1:34
    The CPU, or central processing unit,
  • 1:34 - 1:36
    is the brains of the whole computer.
  • 1:37 - 1:39
    Just like your brain doesn't
    take up your whole body,
  • 1:39 - 1:42
    the CPU doesn't take
    up the whole computer,
  • 1:42 - 1:44
    but it runs the show all the same.
  • 1:44 - 1:46
    And the CPU's job, its whole job,
  • 1:47 - 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:54
    maybe really fast,
  • 1:54 - 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:05
    instructions to move your mouse
    around on the screen,
  • 2:05 - 2:07
    to run that clock widget on your desktop,
  • 2:07 - 2:09
    play your internet radio,
  • 2:09 - 2:11
    manage the files you're
    editing on the hard drive,
  • 2:11 - 2:13
    and much, much more.
  • 2:13 - 2:16
    Your computer's CPU
    is one heck of a multitasker!
  • 2:16 - 2:18
    "But oh my gosh
  • 2:18 - 2:19
    there's a very important mouse click
  • 2:19 - 2:20
    coming through now!
  • 2:20 - 2:23
    Let's drop everything now
    and deal with that!"
  • 2:23 - 2:25
    There are programs for everything
  • 2:25 - 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:36
    Each program was initially
    written by a human
  • 2:36 - 2:38
    in a human-readable programming language,
  • 2:38 - 2:39
    like Java,
  • 2:39 - 2:40
    C++,
  • 2:40 - 2:41
    or Python.
  • 2:41 - 2:44
    But human programs take up a lot of space
  • 2:44 - 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:53
    and stored in bits of ones
    and zeros in memory.
  • 2:53 - 2:55
    The CPU realizes that it
    needs instructions
  • 2:55 - 2:57
    for how to deal with this mouse click,
  • 2:57 - 3:00
    so it looks up the address
    for the mouse program
  • 3:00 - 3:02
    and sends a request
    to the memory subsystem
  • 3:02 - 3:04
    for instructions stored there.
  • 3:05 - 3:07
    Each instruction
    in the mouse device driver
  • 3:07 - 3:10
    is duly fetched and executed.
  • 3:10 - 3:12
    And that's not nearly
    the end of the story!
  • 3:12 - 3:15
    Because the CPU learns
    that the mouse was clicked
  • 3:15 - 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:26
    And then the CPU has to ask memory
  • 3:26 - 3:27
    for the program for the button,
  • 3:27 - 3:29
    which means that the CPU needs
  • 3:29 - 3:31
    the monitor program again
  • 3:31 - 3:33
    to show the video
    associated with the button,
  • 3:33 - 3:35
    and so it goes.
  • 3:35 - 3:37
    And let's just say there
    are a lot of programs involved
  • 3:37 - 3:40
    before you even see
    the button on the screen
  • 3:40 - 3:41
    light up when you clicked it.
  • 3:41 - 3:44
    So, just the simple task
    of clicking your mouse
  • 3:44 - 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