WEBVTT 00:00:06.879 --> 00:00:10.030 In many ways, our memories make us who we are, 00:00:10.030 --> 00:00:12.059 helping us remember our past, 00:00:12.059 --> 00:00:13.989 learn and retain skills, 00:00:13.989 --> 00:00:16.273 and plan for the future. 00:00:16.273 --> 00:00:19.916 And for the computers that often act as extensions of ourselves, 00:00:19.916 --> 00:00:22.126 memory plays much the same role, 00:00:22.126 --> 00:00:23.711 whether it's a two-hour movie, 00:00:23.711 --> 00:00:25.283 a two-word text file, 00:00:25.283 --> 00:00:27.833 or the instructions for opening either, 00:00:27.833 --> 00:00:33.372 everything in a computer's memory takes the form of basic units called bits, 00:00:33.372 --> 00:00:35.846 or binary digits. 00:00:35.846 --> 00:00:38.387 Each of these is stored in a memory cell 00:00:38.387 --> 00:00:42.185 that can switch between two states for two possible values, 00:00:42.185 --> 00:00:44.057 0 and 1. 00:00:44.057 --> 00:00:47.177 Files and programs consist of millions of these bits, 00:00:47.177 --> 00:00:50.428 all processed in the central processing unit, 00:00:50.428 --> 00:00:51.746 or CPU, 00:00:51.746 --> 00:00:54.096 that acts as the computer's brain. 00:00:54.096 --> 00:00:58.671 And as the number of bits needing to be processed grows exponentially, 00:00:58.671 --> 00:01:01.532 computer designers face a constant struggle 00:01:01.532 --> 00:01:05.295 between size, cost, and speed. 00:01:05.295 --> 00:01:10.126 Like us, computers have short-term memory for immediate tasks, 00:01:10.126 --> 00:01:13.407 and long-term memory for more permanent storage. 00:01:13.407 --> 00:01:15.277 When you run a program, 00:01:15.277 --> 00:01:18.950 your operating system allocates area within the short-term memory 00:01:18.950 --> 00:01:20.845 for performing those instructions. 00:01:20.845 --> 00:01:24.392 For example, when you press a key in a word processor, 00:01:24.392 --> 00:01:29.536 the CPU will access one of these locations to retrieve bits of data. 00:01:29.536 --> 00:01:33.861 It could also modify them, or create new ones. 00:01:33.861 --> 00:01:38.258 The time this takes is known as the memory's latency. 00:01:38.258 --> 00:01:43.801 And because program instructions must be processed quickly and continuously, 00:01:43.801 --> 00:01:48.563 all locations within the short-term memory can be accessed in any order, 00:01:48.563 --> 00:01:51.714 hence the name random access memory. 00:01:51.714 --> 00:01:55.900 The most common type of RAM is dynamic RAM, or DRAM. 00:01:55.900 --> 00:02:00.989 There, each memory cell consists of a tiny transistor and a capacitor 00:02:00.989 --> 00:02:02.987 that store electrical charges, 00:02:02.987 --> 00:02:07.555 a 0 when there's no charge, or a 1 when charged. 00:02:07.555 --> 00:02:09.167 Such memory is called dynamic 00:02:09.167 --> 00:02:13.380 because it only holds charges briefly before they leak away, 00:02:13.380 --> 00:02:16.759 requiring periodic recharging to retain data. 00:02:16.759 --> 00:02:20.006 But even its low latency of 100 nanoseconds 00:02:20.006 --> 00:02:22.651 is too long for modern CPUs, 00:02:22.651 --> 00:02:26.563 so there's also a small, high-speed internal memory cache 00:02:26.563 --> 00:02:28.513 made from static RAM. 00:02:28.513 --> 00:02:31.722 That's usually made up of six interlocked transistors 00:02:31.722 --> 00:02:33.624 which don't need refreshing. 00:02:33.624 --> 00:02:36.779 SRAM is the fastest memory in a computer system, 00:02:36.779 --> 00:02:38.680 but also the most expensive, 00:02:38.680 --> 00:02:42.414 and takes up three times more space than DRAM. 00:02:42.414 --> 00:02:46.597 But RAM and cache can only hold data as long as they're powered. 00:02:46.597 --> 00:02:49.625 For data to remain once the device is turned off, 00:02:49.625 --> 00:02:53.005 it must be transferred into a long-term storage device, 00:02:53.005 --> 00:02:55.291 which comes in three major types. 00:02:55.291 --> 00:02:57.739 In magnetic storage, which is the cheapest, 00:02:57.739 --> 00:03:03.560 data is stored as a magnetic pattern on a spinning disc coated with magnetic film. 00:03:03.560 --> 00:03:07.203 But because the disc must rotate to where the data is located 00:03:07.203 --> 00:03:08.621 in order to be read, 00:03:08.621 --> 00:03:14.510 the latency for such drives is 100,000 times slower than that of DRAM. 00:03:14.510 --> 00:03:18.626 On the other hand, optical-based storage like DVD and Blu-ray 00:03:18.626 --> 00:03:20.621 also uses spinning discs, 00:03:20.621 --> 00:03:22.813 but with a reflective coating. 00:03:22.813 --> 00:03:28.029 Bits are encoded as light and dark spots using a dye that can be read by a laser. 00:03:28.029 --> 00:03:31.151 While optical storage media are cheap and removable, 00:03:31.151 --> 00:03:34.878 they have even slower latencies than magnetic storage 00:03:34.878 --> 00:03:37.236 and lower capacity as well. 00:03:37.236 --> 00:03:42.871 Finally, the newest and fastest types of long-term storage are solid-state drives, 00:03:42.871 --> 00:03:44.025 like flash sticks. 00:03:44.025 --> 00:03:45.957 These have no moving parts, 00:03:45.957 --> 00:03:48.627 instead using floating gate transistors 00:03:48.627 --> 00:03:53.134 that store bits by trapping or removing electrical charges 00:03:53.134 --> 00:03:56.453 within their specially designed internal structures. 00:03:56.453 --> 00:03:59.739 So how reliable are these billions of bits? 00:03:59.739 --> 00:04:03.463 We tend to think of computer memory as stable and permanent, 00:04:03.463 --> 00:04:06.363 but it actually degrades fairly quickly. 00:04:06.363 --> 00:04:09.000 The heat generated from a device and its environment 00:04:09.000 --> 00:04:11.739 will eventually demagnetize hard drives, 00:04:11.739 --> 00:04:13.991 degrade the dye in optical media, 00:04:13.991 --> 00:04:17.115 and cause charge leakage in floating gates. 00:04:17.115 --> 00:04:20.081 Solid-state drives also have an additional weakness. 00:04:20.081 --> 00:04:24.095 Repeatedly writing to floating gate transistors corrodes them, 00:04:24.095 --> 00:04:26.705 eventually rendering them useless. 00:04:26.705 --> 00:04:29.215 With data on most current storage media 00:04:29.215 --> 00:04:31.958 having less than a ten-year life expectancy, 00:04:31.958 --> 00:04:36.333 scientists are working to exploit the physical properties of materials 00:04:36.333 --> 00:04:38.649 down to the quantum level 00:04:38.649 --> 00:04:40.998 in the hopes of making memory devices faster, 00:04:40.998 --> 00:04:42.063 smaller, 00:04:42.063 --> 00:04:43.609 and more durable. 00:04:43.609 --> 00:04:49.045 For now, immortality remains out of reach, for humans and computers alike.