1 00:00:17,450 --> 00:00:21,614 Hello and welcome to the first video of the binary numbers. In 2 00:00:21,614 --> 00:00:25,431 this video. I would like to introduce you to the binary 3 00:00:25,431 --> 00:00:29,248 numbers and the binary number system, but for us to understand 4 00:00:29,248 --> 00:00:34,106 that we need to look at what the decimal number system is and we 5 00:00:34,106 --> 00:00:38,270 need to look at the powers because powers are at the heart 6 00:00:38,270 --> 00:00:41,740 of every number systems. So let's start with the powers. 7 00:00:43,800 --> 00:00:47,680 3 to the power of two is 3 8 00:00:47,680 --> 00:00:54,721 * 3. And for example, 5 to the power of four is 5 9 00:00:54,721 --> 00:01:00,733 * 5 * 5 * 5. So there are two important concepts 10 00:01:00,733 --> 00:01:02,737 in here, the power. 11 00:01:03,760 --> 00:01:07,709 And the base, they both can be any different whole numbers. 12 00:01:08,640 --> 00:01:14,646 So the power tells us how many times we need to multiply the 13 00:01:14,646 --> 00:01:19,266 base together. So in this particular case, four tasmac 2 14 00:01:19,266 --> 00:01:24,810 multiplied the base 5 by itself four times, and in the example 15 00:01:24,810 --> 00:01:30,354 of three, the two tags need to multiply the three by itself 16 00:01:30,354 --> 00:01:35,436 twice. Now there are two important powers that we need to 17 00:01:35,436 --> 00:01:38,208 draw your attention to the first 18 00:01:38,208 --> 00:01:44,300 one. Is any number to the zero power is by definition is always 19 00:01:44,300 --> 00:01:46,590 one. For example. 20 00:01:48,440 --> 00:01:55,992 7 to the power of 0 is 1 two to the power of 0 is one 21 00:01:55,992 --> 00:02:01,656 and 10 to the power of 0 is also one another important 22 00:02:01,656 --> 00:02:09,208 power. Is any number raised to the first power is just the 23 00:02:09,208 --> 00:02:11,480 number itself for example? 24 00:02:13,030 --> 00:02:19,652 7 to the first power equals to 7, two to the first power equals 25 00:02:19,652 --> 00:02:25,328 to two and 10 to the first power is equal to 10. 26 00:02:27,160 --> 00:02:29,160 By definition, the decimal 27 00:02:29,160 --> 00:02:35,860 number system. Is a base 10 positional. 28 00:02:37,970 --> 00:02:39,040 Number system. 29 00:02:41,170 --> 00:02:43,730 Which uses 10 digits. 30 00:02:46,130 --> 00:02:52,850 And these 10 digits are 012 all the way up to 9. So that's the 9 31 00:02:52,850 --> 00:02:54,950 digits plus zero, which makes 32 00:02:54,950 --> 00:03:01,631 them 10. Now what does it mean based on and positional the base 33 00:03:01,631 --> 00:03:07,163 10 taskview that using 10 digits and every place value or every 34 00:03:07,163 --> 00:03:11,773 position is represented by powers of 10 and it's a 35 00:03:11,773 --> 00:03:16,383 positional number system because if you place digits at different 36 00:03:16,383 --> 00:03:19,610 positions they represent different values. The former 37 00:03:19,610 --> 00:03:24,681 mathematics is representing each of the place values tend to zero 38 00:03:24,681 --> 00:03:26,525 10 to the one. 39 00:03:27,610 --> 00:03:34,596 1:50 2:50 and so on now what they mean as 40 00:03:34,596 --> 00:03:41,668 numbers? 10 to 0 as we said before, it's 110 to the one 41 00:03:41,668 --> 00:03:47,108 Eastern tented it too, is 100 and 2:50 is 1000. 42 00:03:48,660 --> 00:03:53,440 It might seems a little bit overcomplicated when you think 43 00:03:53,440 --> 00:03:59,176 about the decimal numbers, but it is already built into the way 44 00:03:59,176 --> 00:04:04,912 that we read our numbers. For example, if you read out 573 45 00:04:04,912 --> 00:04:10,648 just the way you say the number you talk about decimal place 46 00:04:10,648 --> 00:04:16,862 values 573, so the hundred 500 tells you that five is at the 47 00:04:16,862 --> 00:04:22,617 hundreds place. The 70 tells you that 70s at the 10s place and 48 00:04:22,617 --> 00:04:27,501 three tells you that three is at the units place. Now, what 49 00:04:27,501 --> 00:04:32,385 happens if I use the same 3 digits but in a slightly 50 00:04:32,385 --> 00:04:36,048 different order? So what happens if I say 735? 51 00:04:37,130 --> 00:04:39,041 Well, as I was reading out the 52 00:04:39,041 --> 00:04:44,690 number. You probably notice that now is 7 at the hundreds place, 53 00:04:44,690 --> 00:04:50,710 three is at the 10 space and five is at the units place. So 54 00:04:50,710 --> 00:04:55,010 depending on which place value and placing or which position 55 00:04:55,010 --> 00:04:58,880 and placing the digits, they will represent different values. 56 00:04:58,880 --> 00:05:04,900 The five in the first number is 105 in the second number is just 57 00:05:04,900 --> 00:05:10,490 five units. The three in the first number is 3 units, but in 58 00:05:10,490 --> 00:05:11,780 the second number. 59 00:05:11,940 --> 00:05:16,087 E 310 switches 30 and the seven in the first number 60 00:05:16,087 --> 00:05:20,234 is seven 10s, which is 70 and in the second number 61 00:05:20,234 --> 00:05:22,119 is 700 which is 700. 62 00:05:23,540 --> 00:05:28,428 Now I would like to draw your attention to the rule of the 63 00:05:28,428 --> 00:05:33,316 zeros because so far I just picked out any digits which is a 64 00:05:33,316 --> 00:05:38,580 non 0 digit. But what happens if I have good zeros in my number? 65 00:05:38,580 --> 00:05:41,212 For example? What's the difference between 1007? 66 00:05:42,380 --> 00:05:48,661 Andseventeen well without having the zeros in the number I end 67 00:05:48,661 --> 00:05:54,942 up with a very much smaller number, so the zeros are 68 00:05:54,942 --> 00:05:57,226 so-called place value holders. 69 00:05:58,600 --> 00:06:04,242 So today telling me that at this place value I'm not using any of 70 00:06:04,242 --> 00:06:09,481 the place value by placing the zero. So in this case I'm using 71 00:06:09,481 --> 00:06:15,123 seven of the units, not using any of the 10s an I'm not using 72 00:06:15,123 --> 00:06:19,556 any of the hundreds and I'm using one of the thousands 73 00:06:19,556 --> 00:06:24,392 without the zeros here. I'm just telling you that I'm using seven 74 00:06:24,392 --> 00:06:27,616 or the ones and I'm using one of 75 00:06:27,616 --> 00:06:31,630 the tents. You will agree with me that the two numbers are 76 00:06:31,630 --> 00:06:35,712 very, very different, so every time I need to build up a bigger 77 00:06:35,712 --> 00:06:38,852 number without using the in between place values, I always 78 00:06:38,852 --> 00:06:40,736 had to place a 0 here. 79 00:06:45,450 --> 00:06:50,169 Now we can build up a decimal place value table and the former 80 00:06:50,169 --> 00:06:53,799 place value table would look like this. It's just basically 81 00:06:53,799 --> 00:06:57,429 the heading you have got the powers and the equivalent 82 00:06:57,429 --> 00:07:01,785 decimal values. Now how can you use a place value table like 83 00:07:01,785 --> 00:07:05,415 this to position different numbers in that? Now we talked 84 00:07:05,415 --> 00:07:09,771 about a few different numbers, so let's see what they look like 85 00:07:09,771 --> 00:07:12,312 in the place where you table so. 86 00:07:12,840 --> 00:07:18,948 573 you put a five in the hundreds, seven in the Times 87 00:07:18,948 --> 00:07:25,565 Seven in the 10s, and three in the units column. If we talking 88 00:07:25,565 --> 00:07:29,128 about 735, we mix up the order. 89 00:07:29,860 --> 00:07:36,328 Of the digits 17. One of the 10s. Seven of the units and 1007 90 00:07:36,328 --> 00:07:42,334 one of the thousand. None of the hundreds. None of the 10s and 91 00:07:42,334 --> 00:07:44,182 seven over the units. 92 00:07:44,950 --> 00:07:50,494 One thing I'd like you to notice is when you look at the place 93 00:07:50,494 --> 00:07:55,246 value table. If you're going from right to left, you can spot 94 00:07:55,246 --> 00:07:59,998 that the numbers from place value to place while you get 10 95 00:07:59,998 --> 00:08:03,958 times bigger, so the values themselves, the place where used 96 00:08:03,958 --> 00:08:05,542 gets 10 times bigger. 97 00:08:06,410 --> 00:08:11,786 Now if we reverse the order and we going from left to right, the 98 00:08:11,786 --> 00:08:16,010 place values themselves get 10 times smaller, so this is again 99 00:08:16,010 --> 00:08:19,466 another important feature of the place values themselves, which 100 00:08:19,466 --> 00:08:24,842 will help us to extend the place value table in a later video to 101 00:08:24,842 --> 00:08:25,994 introduce smaller numbers. 102 00:08:27,970 --> 00:08:31,640 Now we have got all the conceptual understanding that we 103 00:08:31,640 --> 00:08:35,677 need to build up the binary numbers. Binary numbers are very 104 00:08:35,677 --> 00:08:38,613 important for computer science because binary numbers are 105 00:08:38,613 --> 00:08:42,283 basically the way to communicate to the computer. Remember that 106 00:08:42,283 --> 00:08:46,320 the computer at a very basic level will type up small 107 00:08:46,320 --> 00:08:49,623 electrical circuits, and you can either turn on electrical 108 00:08:49,623 --> 00:08:53,660 circuits on or off, and in the different combinations of these 109 00:08:53,660 --> 00:08:57,330 electric circuits you can tell the computer to do different 110 00:08:57,330 --> 00:09:01,126 instructions. So depending on what kind of binary number 111 00:09:01,126 --> 00:09:04,519 instructions you're giving to the computer, the computer will 112 00:09:04,519 --> 00:09:07,158 carry out different calculations or different instructions. 113 00:09:07,940 --> 00:09:14,916 By definition, the binary number system is base 114 00:09:14,916 --> 00:09:18,404 two positional number system. 115 00:09:19,420 --> 00:09:22,188 We using 2 digits. 116 00:09:23,980 --> 00:09:26,996 And these two digits are zero and one. 117 00:09:28,490 --> 00:09:33,458 So what does the place where you table look for the binary 118 00:09:33,458 --> 00:09:38,012 numbers? But because it's a base two number system, every place 119 00:09:38,012 --> 00:09:42,566 value is a power of two. So what are these powers? 120 00:09:43,220 --> 00:09:49,646 2 to the power of 0 two to the power of 1 two to the power of 2 121 00:09:49,646 --> 00:09:55,358 to the power of. 3 two to the power of four. 2 to the power of 122 00:09:55,358 --> 00:09:59,999 5 and I can go on forever. As you see the differences now. 123 00:10:00,330 --> 00:10:04,246 That instead of base 10, I'm just replacing the Terminator 2, 124 00:10:04,246 --> 00:10:08,518 but the powers themselves stay the same. Now what does it mean 125 00:10:08,518 --> 00:10:13,146 for the actual values? What is 2 to the zero? While remember any 126 00:10:13,146 --> 00:10:18,130 number to the Zero power is 1 two to the one, any number to 127 00:10:18,130 --> 00:10:24,182 the first power itself, so it's 2 two to two 2 * 2 is 4, two to 128 00:10:24,182 --> 00:10:30,234 three 2 * 2 * 2 is 8, two to four is 16 and two to five. 129 00:10:30,340 --> 00:10:33,790 He's 32 and I can go on for higher values. 130 00:10:35,080 --> 00:10:38,952 So when we look at the place values themselves compared to 131 00:10:38,952 --> 00:10:43,528 the decimals, Now when I go from right to left, the place values 132 00:10:43,528 --> 00:10:49,160 get doubled. So from one we can get to 2 from 2 began get to 4 133 00:10:49,160 --> 00:10:54,792 from 4 we can get to 8, they double up and if I go from left 134 00:10:54,792 --> 00:10:59,368 to right the opposite direction they get halved from 32 to 16 I 135 00:10:59,368 --> 00:11:05,000 get by having it and from 16 to 8 I get by having it again so. 136 00:11:05,060 --> 00:11:09,416 This is a common feature of the place where you tables any 137 00:11:09,416 --> 00:11:12,683 number system because there are other different number systems. 138 00:11:12,683 --> 00:11:17,039 Every time when you go from right to left, the place values 139 00:11:17,039 --> 00:11:18,854 get multiplied by the base. 140 00:11:20,690 --> 00:11:24,218 And when you go from left to right, the place values get 141 00:11:24,218 --> 00:11:25,394 divided by the base. 142 00:11:28,150 --> 00:11:32,258 So when we look at the binary place value table, it's like the 143 00:11:32,258 --> 00:11:35,734 numbers I showed you before, but put into a nicer format. 144 00:11:36,980 --> 00:11:40,736 So what happens in the here in the decimal place value table? 145 00:11:40,736 --> 00:11:44,805 We had quite a lot of different digits that we could play around 146 00:11:44,805 --> 00:11:48,874 with. We had the digits from zero to 9, but what happens in 147 00:11:48,874 --> 00:11:52,943 binary? Which 2 digits can we use here? Just the zero and one. 148 00:11:53,580 --> 00:11:58,024 So. A binary number is nothing else but a string 149 00:11:58,024 --> 00:11:59,408 of ones and zeros. 150 00:12:01,060 --> 00:12:05,656 For example, this is a binary number. What it means then for 151 00:12:05,656 --> 00:12:10,252 the place values is that with one I'm saying that use the 152 00:12:10,252 --> 00:12:14,082 corresponding place value and with zero I'm saying don't use 153 00:12:14,082 --> 00:12:17,529 the corresponding place value, so the placeholder property of 154 00:12:17,529 --> 00:12:21,359 the zero becomes really important and comes up a lot 155 00:12:21,359 --> 00:12:23,657 more often than in decimal numbers. 156 00:12:25,230 --> 00:12:31,574 Let's look at a few more binary numbers. So basically I can just 157 00:12:31,574 --> 00:12:37,918 use any ones and any zeros and place them in any order whatever 158 00:12:37,918 --> 00:12:43,774 to build upon binary number. So let's say 1011001 it's a binary 159 00:12:43,774 --> 00:12:49,142 number, 100001 is also binary number, or 1011. Again a binary 160 00:12:49,142 --> 00:12:54,510 number. Now you probably notice that because we only using ones 161 00:12:54,510 --> 00:12:59,610 and zeros. Every single one of them could also be a decimal 162 00:12:59,610 --> 00:13:04,458 number. For example, the last one could be 1011 in decimal. So 163 00:13:04,458 --> 00:13:08,498 how can we make a distinction between binary and decimal? 164 00:13:10,470 --> 00:13:14,170 So there is a very common notation to distinguish between 165 00:13:14,170 --> 00:13:18,610 binary and decimal numbers. So if you see a number which only 166 00:13:18,610 --> 00:13:23,420 uses ones and zeros to make sure that this is a binary number, 167 00:13:23,420 --> 00:13:27,860 you put a little two in subscript. And if you want to 168 00:13:27,860 --> 00:13:31,930 indicate that this is a decimal number, you put a little 169 00:13:31,930 --> 00:13:35,630 subscript of 10, indicating that this is a decimal number. 170 00:13:36,480 --> 00:13:41,676 So if it's not clear enough from context, always look for the 171 00:13:41,676 --> 00:13:46,439 subscript. It is a binary number. Or is it a decimal 172 00:13:46,439 --> 00:13:50,769 number? Now it's very, very important that you are making 173 00:13:50,769 --> 00:13:54,666 difference between the number itself and the notation of 174 00:13:54,666 --> 00:13:58,563 signaling which system working in this letter notation, the 175 00:13:58,563 --> 00:14:04,625 number 2 and here the number 10 are not part of the number. As 176 00:14:04,625 --> 00:14:06,790 long as the calculations go. 177 00:14:07,120 --> 00:14:11,558 This is just a way of telling me or you or anybody ask that 178 00:14:11,558 --> 00:14:15,679 this is a binary number. Once we are aware of that, this is 179 00:14:15,679 --> 00:14:18,849 a binary number. This two becomes redundant, so as long 180 00:14:18,849 --> 00:14:21,702 as the calculations go, you can leave this number. 181 00:14:22,840 --> 00:14:26,206 So I hope that you have a better understanding of the 182 00:14:26,206 --> 00:14:29,266 binary and the decimal number systems in the next few 183 00:14:29,266 --> 00:14:32,938 videos. I will show you what we can do with the binary 184 00:14:32,938 --> 00:14:33,244 numbers.