Return to Video

How computer memory works - Kanawat Senanan

  • 0:07 - 0:10
    In many ways,
    our memories make us who we are,
  • 0:10 - 0:12
    helping us remember our past,
  • 0:12 - 0:14
    learn and retain skills,
  • 0:14 - 0:16
    and plan for the future.
  • 0:16 - 0:20
    And for the computers that often act
    as extensions of ourselves,
  • 0:20 - 0:22
    memory plays much the same role,
  • 0:22 - 0:24
    whether it's a two-hour movie,
  • 0:24 - 0:25
    a two-word text file,
  • 0:25 - 0:28
    or the instructions for opening either,
  • 0:28 - 0:33
    everything in a computer's memory
    takes the form of basic units called bits,
  • 0:33 - 0:36
    or binary digits.
  • 0:36 - 0:38
    Each of these is stored in a memory cell
  • 0:38 - 0:42
    that can switch between two states
    for two possible values,
  • 0:42 - 0:44
    0 and 1.
  • 0:44 - 0:47
    Files and programs consist of millions
    of these bits,
  • 0:47 - 0:50
    all processed in
    the central processing unit,
  • 0:50 - 0:52
    or CPU,
  • 0:52 - 0:54
    that acts as the computer's brain.
  • 0:54 - 0:59
    And as the number of bits needing
    to be processed grows exponentially,
  • 0:59 - 1:02
    computer designers face
    a constant struggle
  • 1:02 - 1:05
    between size, cost, and speed.
  • 1:05 - 1:10
    Like us, computers have short-term memory
    for immediate tasks,
  • 1:10 - 1:13
    and long-term memory
    for more permanent storage.
  • 1:13 - 1:15
    When you run a program,
  • 1:15 - 1:19
    your operating system allocates area
    within the short-term memory
  • 1:19 - 1:21
    for performing those instructions.
  • 1:21 - 1:24
    For example, when you press a key
    in a word processor,
  • 1:24 - 1:30
    the CPU will access one of these locations
    to retrieve bits of data.
  • 1:30 - 1:34
    It could also modify them,
    or create new ones.
  • 1:34 - 1:38
    The time this takes is known
    as the memory's latency.
  • 1:38 - 1:44
    And because program instructions must be
    processed quickly and continuously,
  • 1:44 - 1:49
    all locations within the short-term memory
    can be accessed in any order,
  • 1:49 - 1:52
    hence the name random access memory.
  • 1:52 - 1:56
    The most common type of RAM
    is dynamic RAM, or DRAM.
  • 1:56 - 2:01
    There, each memory cell consists
    of a tiny transistor and a capacitor
  • 2:01 - 2:03
    that store electrical charges,
  • 2:03 - 2:08
    a 0 when there's no charge,
    or a 1 when charged.
  • 2:08 - 2:09
    Such memory is called dynamic
  • 2:09 - 2:13
    because it only holds charges briefly
    before they leak away,
  • 2:13 - 2:17
    requiring periodic recharging
    to retain data.
  • 2:17 - 2:20
    But even its low latency
    of 100 nanoseconds
  • 2:20 - 2:23
    is too long for modern CPUs,
  • 2:23 - 2:27
    so there's also a small,
    high-speed internal memory cache
  • 2:27 - 2:29
    made from static RAM.
  • 2:29 - 2:32
    That's usually made up
    of six interlocked transistors
  • 2:32 - 2:34
    which don't need refreshing.
  • 2:34 - 2:37
    SRAM is the fastest memory
    in a computer system,
  • 2:37 - 2:39
    but also the most expensive,
  • 2:39 - 2:42
    and takes up three times
    more space than DRAM.
  • 2:42 - 2:47
    But RAM and cache can only hold data
    as long as they're powered.
  • 2:47 - 2:50
    For data to remain
    once the device is turned off,
  • 2:50 - 2:53
    it must be transferred
    into a long-term storage device,
  • 2:53 - 2:55
    which comes in three major types.
  • 2:55 - 2:58
    In magnetic storage,
    which is the cheapest,
  • 2:58 - 3:04
    data is stored as a magnetic pattern on
    a spinning disc coated with magnetic film.
  • 3:04 - 3:07
    But because the disc must rotate
    to where the data is located
  • 3:07 - 3:09
    in order to be read,
  • 3:09 - 3:15
    the latency for such drives is 100,000
    times slower than that of DRAM.
  • 3:15 - 3:19
    On the other hand, optical-based storage
    like DVD and Blu-ray
  • 3:19 - 3:21
    also uses spinning discs,
  • 3:21 - 3:23
    but with a reflective coating.
  • 3:23 - 3:28
    Bits are encoded as light and dark spots
    using a dye that can be read by a laser.
  • 3:28 - 3:31
    While optical storage media are cheap
    and removable,
  • 3:31 - 3:35
    they have even slower latencies
    than magnetic storage
  • 3:35 - 3:37
    and lower capacity as well.
  • 3:37 - 3:43
    Finally, the newest and fastest types of
    long-term storage are solid-state drives,
  • 3:43 - 3:44
    like flash sticks.
  • 3:44 - 3:46
    These have no moving parts,
  • 3:46 - 3:49
    instead using floating gate transistors
  • 3:49 - 3:53
    that store bits by trapping
    or removing electrical charges
  • 3:53 - 3:56
    within their specially designed
    internal structures.
  • 3:56 - 4:00
    So how reliable
    are these billions of bits?
  • 4:00 - 4:03
    We tend to think of computer memory
    as stable and permanent,
  • 4:03 - 4:06
    but it actually degrades fairly quickly.
  • 4:06 - 4:09
    The heat generated from a device
    and its environment
  • 4:09 - 4:12
    will eventually demagnetize hard drives,
  • 4:12 - 4:14
    degrade the dye in optical media,
  • 4:14 - 4:17
    and cause charge leakage
    in floating gates.
  • 4:17 - 4:20
    Solid-state drives
    also have an additional weakness.
  • 4:20 - 4:24
    Repeatedly writing to floating gate
    transistors corrodes them,
  • 4:24 - 4:27
    eventually rendering them useless.
  • 4:27 - 4:29
    With data on most current storage media
  • 4:29 - 4:32
    having less than
    a ten-year life expectancy,
  • 4:32 - 4:36
    scientists are working to exploit
    the physical properties of materials
  • 4:36 - 4:39
    down to the quantum level
  • 4:39 - 4:41
    in the hopes of making
    memory devices faster,
  • 4:41 - 4:42
    smaller,
  • 4:42 - 4:44
    and more durable.
  • 4:44 - 4:49
    For now, immortality remains out of reach,
    for humans and computers alike.
Title:
How computer memory works - Kanawat Senanan
Speaker:
Kanawat Senanan
Description:

View full lesson: http://ed.ted.com/lessons/how-computer-memory-works-kanawat-senanan

In many ways, our memories make us who we are, helping us remember our past, learn and retain skills, and plan for the future. And for the computers that often act as extensions of ourselves, memory plays much the same role. Kanawat Senanan explains how computer memory works.

Lesson by Kanawat Senanan, animation by TED-Ed.

more » « less
Video Language:
English
Team:
closed TED
Project:
TED-Ed
Duration:
05:05
Jessica Ruby edited English subtitles for How computer memory works
Jessica Ruby approved English subtitles for How computer memory works
Jessica Ruby edited English subtitles for How computer memory works
Jessica Ruby accepted English subtitles for How computer memory works
Jessica Ruby edited English subtitles for How computer memory works
Jessica Ruby edited English subtitles for How computer memory works
Jennifer Cody edited English subtitles for How computer memory works
Jennifer Cody edited English subtitles for How computer memory works

English subtitles

Revisions Compare revisions