1 00:00:00,460 --> 00:00:04,980 A computer without a program running on it is just a hunk of hardware. 2 00:00:04,980 --> 00:00:09,580 Hardware is anything that's well, hard, like a desktop, tablet, or smartphone. 3 00:00:10,600 --> 00:00:14,800 In order for a piece of hardware to do anything, it has to run programs. 4 00:00:14,800 --> 00:00:15,300 In order for 5 00:00:15,300 --> 00:00:20,310 programs to work, they need to be written in a way a computer can understand. 6 00:00:20,310 --> 00:00:22,290 This is where binary and data come into play. 7 00:00:23,650 --> 00:00:27,970 Programs themselves and what you create when using them are all stored as data, 8 00:00:27,970 --> 00:00:31,970 which are just a lot of binary digits, ones and zeroes. 9 00:00:31,970 --> 00:00:35,646 [SOUND] One of the first programs you see when you turn on [SOUND] your computer is 10 00:00:35,646 --> 00:00:37,088 the operating [SOUND] system. 11 00:00:37,088 --> 00:00:42,027 The job of the operating system is to help all [SOUND] other computer programs work 12 00:00:42,027 --> 00:00:46,609 by handling the messy details of controlling the computer's hardware. 13 00:00:46,609 --> 00:00:50,789 [SOUND] The operating system is the core software component of a computer and 14 00:00:50,789 --> 00:00:54,649 provides an interface between the [SOUND] hardware and the software. 15 00:00:54,649 --> 00:00:57,888 Say, for example, you wanted to open an application. 16 00:00:57,888 --> 00:01:02,728 You would have to click on it either with your mouse or tap it with your finger. 17 00:01:02,728 --> 00:01:05,588 That click or [SOUND] touch is called an event. 18 00:01:05,588 --> 00:01:09,637 [SOUND] When you send that click through your mouse, touchscreen or 19 00:01:09,637 --> 00:01:13,988 keyboard, it's the operating system's job to watch for that event. 20 00:01:13,988 --> 00:01:18,564 [SOUND] When you click an application, part of the operating system's job is to 21 00:01:18,564 --> 00:01:22,948 stash the mouse click's information in memory until it can be processed. 22 00:01:22,948 --> 00:01:27,376 In addition to storing events as data, applications are data, and what's inside 23 00:01:27,376 --> 00:01:32,640 those applications are data, like documents, photographs, video, and music. 24 00:01:32,640 --> 00:01:34,570 In order to save all this data, 25 00:01:34,570 --> 00:01:39,100 your computer uses a few different types of electronic storage depending on 26 00:01:39,100 --> 00:01:41,920 the priority and type of data you want to store. 27 00:01:41,920 --> 00:01:44,570 To store data into memory in an efficient way, 28 00:01:44,570 --> 00:01:48,380 there are a few different types of memory to choose from. 29 00:01:48,380 --> 00:01:52,220 RAM and virtual memory are temporary storage areas. 30 00:01:52,220 --> 00:01:55,930 And a ROM and hard drives are permanent storage areas. 31 00:01:55,930 --> 00:01:58,489 Let's see an example of how these work. 32 00:01:58,489 --> 00:02:03,225 [SOUND] From the moment you turn your computer on to the moment you turn it off, 33 00:02:03,225 --> 00:02:05,968 your computer is constantly using memory. 34 00:02:05,968 --> 00:02:10,408 When you turn on your [SOUND] computer and it loads the operating system, 35 00:02:10,408 --> 00:02:14,709 it's usually loading this from the hard drive to the system's RAM. 36 00:02:14,709 --> 00:02:19,800 This allows the central processing unit, or CPU, to [SOUND] have immediate access 37 00:02:19,800 --> 00:02:25,288 to the operating system, which enhances the overall performance and functionality. 38 00:02:25,288 --> 00:02:30,090 Similarity, when you open an application, it's loaded into RAM. 39 00:02:30,090 --> 00:02:31,956 In order to conserve RAM usage, 40 00:02:31,956 --> 00:02:36,599 many [SOUND] applications load only the essential parts of the program at first. 41 00:02:36,599 --> 00:02:39,999 It will only load other [SOUND] pieces when you ask for them. 42 00:02:39,999 --> 00:02:43,158 Say you click on the Word application on your computer. 43 00:02:43,158 --> 00:02:47,878 Your [SOUND] operating system receives that request and Word is loaded into RAM. 44 00:02:47,878 --> 00:02:50,918 [SOUND] Then you want to open up a story you're writing. 45 00:02:50,918 --> 00:02:55,558 When you click on your story document, that file's then loaded into RAM. 46 00:02:55,558 --> 00:02:59,798 After reading for awhile, you make some changes and then [SOUND] save your work. 47 00:02:59,798 --> 00:03:04,598 When you save, the edited [SOUND] file is written to the specified storage device. 48 00:03:04,598 --> 00:03:06,759 [SOUND] If you don't save your work, 49 00:03:06,759 --> 00:03:10,518 it won't transfer the data to a more permanent storage area. 50 00:03:10,518 --> 00:03:14,867 And it will be lost if you suddenly [SOUND] quit the application or 51 00:03:14,867 --> 00:03:15,778 it crashes. 52 00:03:15,778 --> 00:03:18,929 When you exit Word, [SOUND] the application and any 53 00:03:18,929 --> 00:03:24,118 documents are purged from RAM in order to make room for new applications and data. 54 00:03:24,118 --> 00:03:27,136 [SOUND] This repeated quick-loading and 55 00:03:27,136 --> 00:03:30,958 emptying is why is RAM is a temporary storage area. 56 00:03:30,958 --> 00:03:34,975 [SOUND] I'm always curious about what these things actually look like, so 57 00:03:34,975 --> 00:03:37,578 let's check out the teardown on ifixit.com. 58 00:03:37,578 --> 00:03:40,364 I'm going to be using the Macbook Pro teardown to show you 59 00:03:40,364 --> 00:03:45,200 what computers look like, but it's always good to look at the device you're using. 60 00:03:45,200 --> 00:03:48,588 When you get a chance, search for the teardown of your own device. 61 00:03:48,588 --> 00:03:51,607 If you get the chance to deconstruct a computer at home, 62 00:03:51,607 --> 00:03:55,620 remember to disconnect your device from any power supply. 63 00:03:55,620 --> 00:03:59,350 And disconnect and remove the battery as soon as you can get to it. 64 00:03:59,350 --> 00:03:59,950 Okay. 65 00:03:59,950 --> 00:04:01,790 Now that I'm finished with my PSA, 66 00:04:01,790 --> 00:04:05,390 let's check out the teardown of my computer a MacBook Pro. 67 00:04:05,390 --> 00:04:10,420 Right after they disconnect the battery, the first thing they remove is the RAM. 68 00:04:10,420 --> 00:04:14,570 Remember this is the fast temporary storage nearly all data goes through. 69 00:04:16,150 --> 00:04:17,560 Next they remove the hard drive. 70 00:04:18,600 --> 00:04:21,980 Let's jump over to a teardown of the hard drive so we can see inside. 71 00:04:23,470 --> 00:04:26,396 Here we can see there's a large disk or 72 00:04:26,396 --> 00:04:30,801 a few large disks called platters and a read-write arm. 73 00:04:30,801 --> 00:04:34,418 Hard drives store memory using magnetism. 74 00:04:34,418 --> 00:04:38,450 Each large disk in a hard drive is divided into billions of 75 00:04:38,450 --> 00:04:42,605 tiny areas that can each be independently magnetized or 76 00:04:42,605 --> 00:04:46,060 demagnetized to store either a one or a zero. 77 00:04:46,060 --> 00:04:49,800 Magnetism is used in computer storage because each of these tiny 78 00:04:49,800 --> 00:04:55,410 areas remain magnetized or demagnetized even when the power is switched off, 79 00:04:55,410 --> 00:04:57,050 permanently storing the data. 80 00:04:57,050 --> 00:05:00,790 The reason why we don’t use this kind of storage all the time is because it’s 81 00:05:00,790 --> 00:05:02,500 relatively slow compared to RAM. 82 00:05:02,500 --> 00:05:06,802 And if you always had to load programs directly from your hard drive, 83 00:05:06,802 --> 00:05:10,968 the overall performance of your computer would be terribly slow. 84 00:05:10,968 --> 00:05:14,270 [SOUND] Hopefully, this gives you a good understanding of data and 85 00:05:14,270 --> 00:05:16,138 where it's stored in the computer. 86 00:05:16,138 --> 00:05:18,677 In the next stage, we'll leave hardware behind and 87 00:05:18,677 --> 00:05:21,350 talk about software and programming. 88 00:05:21,350 --> 00:05:25,270 To do this, we'll explore the fundamentals of computer software, 89 00:05:25,270 --> 00:05:29,070 learn about a few programming languages, and figure out how they work together.