## ← DRAM - Intro to Computer Science

• 3 Followers
• 50 Lines

### Get Embed Code x Embed video Use the following code to embed this video. See our usage guide for more details on embedding. Paste this in your document somewhere (closest to the closing body tag is preferable): ```<script type="text/javascript" src='https://amara.org/embedder-iframe'></script> ``` Paste this inside your HTML body, where you want to include the widget: ```<div class="amara-embed" data-url="http://www.youtube.com/watch?v=EqI-hPs8d-8" data-team="udacity"></div> ``` 6 Languages

Showing Revision 6 created 05/24/2016 by Udacity Robot.

1. [Narrator] I want to give you a better idea what these actually look like,
2. and my wife was kind enough to let me take some parts out of her computer.
3. Actually, she took them out of the computer so I could show you what they look like.
4. This is DRAM; this is 2 GB of DRAM,
5. and what a gigabyte means is approximately a billion bytes.
6. What it actually means I'll show you in the Python interpreter.
7. In Python we can do exponentiation by using a star star.
8. This is what we would write mathematically as 2 to the power 10.
9. So 2 to the power 10 is 1024.
10. This is called the kilobyte; we use the prefixes like the thousand prefixes,
11. but the actual values in computing are usually powers of 2 instead.
12. They're a little bit different than 1000.
13. It's actually 1024 when we talk about a kilobyte,
14. and a megabyte is 1024 KB.
15. That's equivalent to 2 to the power 20.
16. A megabyte is just over a million bytes.
17. A gigabyte is 2 to the power of 30,
18. which is just over a billion bytes,
19. and a terabyte is 2 to the power of 40,
20. which is just over a trillion bytes.
21. These are the main units we're going to talk about when we think about memory.
22. Here we have 2 GB of memory, so that means we have
23. 2 to the 30 that would be 1 GB.
24. We have 2 to the 30 times 2, which is 2 GB times 8,
25. which is the number of bits in a byte, and 1 bit is the equivalent to a light switch.
26. It can be in 1 of 2 states, so with 1 byte we have the equivalent of 8 light switches.
27. This is comparable to having 17 billion light switches.
28. The kind of memory that we have here is actually DRAM,
29. so it's really more like having 17 billion buckets,
30. and that means when you turn your computer off
31. everything that's stored in the DRAM is lost.
32. To keep the memory here, it's like a bucket,
33. but instead of storing water it's storing electrons.
34. It's a capacitor and when the power goes off that memory is lost.
35. There are many different types of memory inside your computer.
36. I mentioned registers briefly, that's the fastest memory
37. that is built right into the processor.
38. The main things that matter that distinguish the memory that you have
39. is the latency which is the time it takes to get a response.
40. So the latency you can think of as the time to retrieve a value from memory.
41. We'll talk about latency more next class in terms of what that means in networks,
42. which is really the same thing.
43. For this DRAM the latency is about 12 nanoseconds,
44. and as a reminder, a nanosecond is 1 billionth of a second.
45. The other thing that really distinguishes memory,
46. and the reason we have so many different types of it,
47. is the cost.
48. The cost varies depending on mostly the latency and the amount of memory you can store.
49. The cost for this memory, if you bought it today, is about \$10 for 2 GB.
50. That's 10 US dollars, about 7 Euros.