[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:20.34,0:00:24.68,Default,,0000,0000,0000,,In this video, we're going to\Nlook at the binary fractions Dialogue: 0,0:00:24.68,0:00:29.03,Default,,0000,0000,0000,,again, but from a slightly\Ndifferent angle. I will show you Dialogue: 0,0:00:29.03,0:00:32.58,Default,,0000,0000,0000,,an alternative method to convert\Ndecimal fractions into binary Dialogue: 0,0:00:32.58,0:00:37.32,Default,,0000,0000,0000,,fractions, which will work in\Nmost cases. I will show you some Dialogue: 0,0:00:37.32,0:00:41.28,Default,,0000,0000,0000,,examples, and again I will draw\Nyour attention to the Dialogue: 0,0:00:41.28,0:00:42.86,Default,,0000,0000,0000,,limitations of this method. Dialogue: 0,0:00:43.58,0:00:49.77,Default,,0000,0000,0000,,So let's look at an example. So\Nwhat happens if you would need Dialogue: 0,0:00:49.77,0:00:55.48,Default,,0000,0000,0000,,to convert 13.3125 into binary?\NFrom here on, I'm going to split Dialogue: 0,0:00:55.48,0:01:00.72,Default,,0000,0000,0000,,the number I'm going to convert\Nthe whole number and the Dialogue: 0,0:01:00.72,0:01:05.48,Default,,0000,0000,0000,,fraction part separately. The\Nwhole number 413. We're going to Dialogue: 0,0:01:05.48,0:01:10.24,Default,,0000,0000,0000,,use the normal way of converting\Ndecimal numbers into binary's, Dialogue: 0,0:01:10.24,0:01:13.09,Default,,0000,0000,0000,,so use the place where you Dialogue: 0,0:01:13.09,0:01:20.65,Default,,0000,0000,0000,,table. 124 eight 16 So what\Ncombination of these makes up 13 Dialogue: 0,0:01:20.65,0:01:28.32,Default,,0000,0000,0000,,while 8 + 4 makes 12\N+ 1 makes 13, so the Dialogue: 0,0:01:28.32,0:01:33.43,Default,,0000,0000,0000,,whole part of this decimal\Nfraction is 1101. Dialogue: 0,0:01:34.50,0:01:38.86,Default,,0000,0000,0000,,How about the decimal part? What\NI'm going to do now? I'm going Dialogue: 0,0:01:38.86,0:01:41.54,Default,,0000,0000,0000,,to just separately right down\Nthe decimal part. Dialogue: 0,0:01:43.41,0:01:48.85,Default,,0000,0000,0000,,And the trick is here to keep\Ndoubling the number. So what's Dialogue: 0,0:01:48.85,0:01:51.11,Default,,0000,0000,0000,,the double of three 125? Dialogue: 0,0:01:51.84,0:01:57.52,Default,,0000,0000,0000,,Double of five is 10, carried\NA1 double of two is 4 + 1 Dialogue: 0,0:01:57.52,0:02:03.61,Default,,0000,0000,0000,,makes 5 double of two is 2 and\Ndouble of three is 6. Now what Dialogue: 0,0:02:03.61,0:02:08.89,Default,,0000,0000,0000,,happened in here is that I do\Nnot have any overflow into the Dialogue: 0,0:02:08.89,0:02:13.36,Default,,0000,0000,0000,,whole number part of this part\Nof the structure and therefore Dialogue: 0,0:02:13.36,0:02:17.01,Default,,0000,0000,0000,,I'm going to record 0 after\Nthe radix point. Dialogue: 0,0:02:18.32,0:02:22.94,Default,,0000,0000,0000,,Then I'm going to keep doubling.\NObviously double of 00, so I Dialogue: 0,0:02:22.94,0:02:28.72,Default,,0000,0000,0000,,don't even need to think about\Nthat. 2 * 5 is 10, carried A one Dialogue: 0,0:02:28.72,0:02:36.03,Default,,0000,0000,0000,,2 * 2 is 4 + 1 makes it five.\N2 * 6 is 12. So record the two Dialogue: 0,0:02:36.03,0:02:41.04,Default,,0000,0000,0000,,and the one is an overflow. So\Nthis digit. Now I'm going to Dialogue: 0,0:02:41.04,0:02:44.88,Default,,0000,0000,0000,,pick up and record as the 2nd\Ndigit of the. Dialogue: 0,0:02:45.75,0:02:46.94,Default,,0000,0000,0000,,Binary fraction. Dialogue: 0,0:02:48.62,0:02:53.06,Default,,0000,0000,0000,,Imagine like if you were picking\Nthis one up from here recorded Dialogue: 0,0:02:53.06,0:02:57.87,Default,,0000,0000,0000,,here. So from now it disappears.\NThe next step that I'm going to Dialogue: 0,0:02:57.87,0:03:02.31,Default,,0000,0000,0000,,do, I'm going to double again,\Nbut without the whole part. So Dialogue: 0,0:03:02.31,0:03:04.16,Default,,0000,0000,0000,,I'm just going to 55. Dialogue: 0,0:03:05.08,0:03:10.49,Default,,0000,0000,0000,,Which may extend double of two\Nis 4 + 1 is 5 and there again I Dialogue: 0,0:03:10.49,0:03:14.54,Default,,0000,0000,0000,,have got no overflow into the\Nwhole parts, so I'm going to Dialogue: 0,0:03:14.54,0:03:15.90,Default,,0000,0000,0000,,record a 0 here. Dialogue: 0,0:03:17.15,0:03:20.26,Default,,0000,0000,0000,,Double again 2 * 5 is 10. Dialogue: 0,0:03:22.33,0:03:26.41,Default,,0000,0000,0000,,There is an overflow. This is my\Nlast digit here because from Dialogue: 0,0:03:26.41,0:03:30.15,Default,,0000,0000,0000,,here on I've got no more\Nfractional parts, so you stop Dialogue: 0,0:03:30.15,0:03:34.57,Default,,0000,0000,0000,,when you end up with a zero in\Nthe fractional part. Now pulling Dialogue: 0,0:03:34.57,0:03:35.59,Default,,0000,0000,0000,,the two together. Dialogue: 0,0:03:36.27,0:03:43.40,Default,,0000,0000,0000,,13.3125, in decimal\Nis the same Dialogue: 0,0:03:43.40,0:03:50.53,Default,,0000,0000,0000,,as 1101 Radix\N.0101 in binary. Dialogue: 0,0:03:56.11,0:04:02.52,Default,,0000,0000,0000,,The second example is\N9.1875. Again separates the Dialogue: 0,0:04:02.52,0:04:08.93,Default,,0000,0000,0000,,number into whole and\Nfractional part. The whole Dialogue: 0,0:04:08.93,0:04:11.33,Default,,0000,0000,0000,,part is 9. Dialogue: 0,0:04:12.30,0:04:19.71,Default,,0000,0000,0000,,Which is 8 + 1, so eight\Nno four, no two and one. Dialogue: 0,0:04:21.56,0:04:23.15,Default,,0000,0000,0000,,The decimal part now. Dialogue: 0,0:04:23.69,0:04:29.93,Default,,0000,0000,0000,,0.1875 Let's keep doubling it. 2\N* 5 is 10 carry one. 2 * Dialogue: 0,0:04:29.93,0:04:37.07,Default,,0000,0000,0000,,7 is 14 + 1 makes it 15\Ncarried A one 2 * 8016 + 1 Dialogue: 0,0:04:37.07,0:04:44.21,Default,,0000,0000,0000,,is 17, carried A one. 2 * 1\Nis 2 + 1 is 3 again. I Dialogue: 0,0:04:44.21,0:04:49.56,Default,,0000,0000,0000,,did not have any overflow into\Nthe whole number part, so the Dialogue: 0,0:04:49.56,0:04:54.46,Default,,0000,0000,0000,,1st digit behind the radix point\Nthat I'm going to record. Dialogue: 0,0:04:54.50,0:04:55.36,Default,,0000,0000,0000,,Is a 0. Dialogue: 0,0:04:56.59,0:04:57.72,Default,,0000,0000,0000,,Double again. Dialogue: 0,0:04:58.79,0:05:06.30,Default,,0000,0000,0000,,2 * 5 is 10, carried a warm 2\N* 7 is 14 + 1 makes it 15. Dialogue: 0,0:05:06.30,0:05:12.55,Default,,0000,0000,0000,,Carry the one 2 * 3 is 6 +\N1, seven again no overflow into Dialogue: 0,0:05:12.55,0:05:16.72,Default,,0000,0000,0000,,the whole part. So I'm going to\Nrecord 0 here. Dialogue: 0,0:05:17.46,0:05:24.22,Default,,0000,0000,0000,,Double again 2 * 5 is 10.\NCarried a wamp. 2 * 7 is 14 Dialogue: 0,0:05:24.22,0:05:30.09,Default,,0000,0000,0000,,+ 1 makes it 15. Now I have\Ngotten overflowing here, so I'm Dialogue: 0,0:05:30.09,0:05:31.89,Default,,0000,0000,0000,,going to record this. Dialogue: 0,0:05:32.47,0:05:36.55,Default,,0000,0000,0000,,As the next digit after the\Nradix point and then double Dialogue: 0,0:05:36.55,0:05:40.63,Default,,0000,0000,0000,,again, don't forget that this\None is not here anymore because Dialogue: 0,0:05:40.63,0:05:43.23,Default,,0000,0000,0000,,I picked up and recorded it in Dialogue: 0,0:05:43.23,0:05:47.06,Default,,0000,0000,0000,,here. So 2 * 5 is 10. Dialogue: 0,0:05:47.90,0:05:52.76,Default,,0000,0000,0000,,So the next digit is 1 again. So\Nfor the two things together. Dialogue: 0,0:05:53.65,0:06:00.07,Default,,0000,0000,0000,,9.1875 in decimal\Nis the same Dialogue: 0,0:06:00.07,0:06:06.49,Default,,0000,0000,0000,,as 1001 radix\N.0011 in binary. Dialogue: 0,0:06:08.18,0:06:12.76,Default,,0000,0000,0000,,The next number is 0.6875.\NLuckily, this number doesn't Dialogue: 0,0:06:12.76,0:06:18.87,Default,,0000,0000,0000,,have any whole parts, so we just\Nneed to concentrate on the Dialogue: 0,0:06:18.87,0:06:24.47,Default,,0000,0000,0000,,decimal fraction part so I can\Njust simply keep doubling this Dialogue: 0,0:06:24.47,0:06:31.59,Default,,0000,0000,0000,,number. 2 * 5 is 10. Carry\None 2 * 7 is 14 + Dialogue: 0,0:06:31.59,0:06:38.21,Default,,0000,0000,0000,,1 is 15, carried A one 2\N* 8016 + 1 is 17. Dialogue: 0,0:06:38.25,0:06:41.34,Default,,0000,0000,0000,,Either one 2 * 6 is. Dialogue: 0,0:06:41.97,0:06:45.63,Default,,0000,0000,0000,,12 + 1 is 13, so I've got an Dialogue: 0,0:06:45.63,0:06:49.49,Default,,0000,0000,0000,,overflow. So the 1st digit\NI'm going to record behind Dialogue: 0,0:06:49.49,0:06:51.09,Default,,0000,0000,0000,,the radix point is 1. Dialogue: 0,0:06:54.73,0:07:01.34,Default,,0000,0000,0000,,Double 2 * 5 is 10, carried A\None 2 * 7 is 14 + 1 makes it Dialogue: 0,0:07:01.34,0:07:07.58,Default,,0000,0000,0000,,15. Carry the one 2 * 3 is 6 +\N1. Seven this case I did not Dialogue: 0,0:07:07.58,0:07:12.35,Default,,0000,0000,0000,,have an overflow, so the next\Nday did after the radix point is Dialogue: 0,0:07:12.35,0:07:13.45,Default,,0000,0000,0000,,0 double again. Dialogue: 0,0:07:14.91,0:07:22.80,Default,,0000,0000,0000,,2 * 510 carried A one 2 *\N7 is 14 + 1 makes it 15 Dialogue: 0,0:07:22.80,0:07:28.71,Default,,0000,0000,0000,,overflow, so the next digit is\N1. Remember that's gone now and Dialogue: 0,0:07:28.71,0:07:36.11,Default,,0000,0000,0000,,O makes no difference there. 2 *\N5 is 10, so it's 1.0. So we Dialogue: 0,0:07:36.11,0:07:42.52,Default,,0000,0000,0000,,have got one more digit here,\Nwhich is a one so 0.6875 in Dialogue: 0,0:07:42.52,0:07:45.97,Default,,0000,0000,0000,,decimal. As the same is O radix Dialogue: 0,0:07:45.97,0:07:47.51,Default,,0000,0000,0000,,.1011. In binary. Dialogue: 0,0:07:50.52,0:07:55.26,Default,,0000,0000,0000,,Now let's look at a nice and\Neasy decimal number. The one Dialogue: 0,0:07:55.26,0:08:01.18,Default,,0000,0000,0000,,that we didn't quite know how to\Ndeal with at the end of the last Dialogue: 0,0:08:01.18,0:08:05.92,Default,,0000,0000,0000,,video. So let's look at 3.4. So\Nlet's separate the number again Dialogue: 0,0:08:05.92,0:08:11.06,Default,,0000,0000,0000,,in two whole and fractional\Nparts, so three is 2 + 1, which Dialogue: 0,0:08:11.06,0:08:16.59,Default,,0000,0000,0000,,is 1 one and the fractional\Npart. Let's just double 2 * 4 is Dialogue: 0,0:08:16.59,0:08:21.33,Default,,0000,0000,0000,,0.8, so after the radix point,\Nthe 1st digit will be 0. Dialogue: 0,0:08:21.62,0:08:24.12,Default,,0000,0000,0000,,2 * 8 is 16. Dialogue: 0,0:08:24.66,0:08:28.02,Default,,0000,0000,0000,,So 1.6 the next digit is 1. Dialogue: 0,0:08:29.56,0:08:32.23,Default,,0000,0000,0000,,2 * 6 is 12, so 2. Dialogue: 0,0:08:32.74,0:08:35.68,Default,,0000,0000,0000,,.1 again carry the one. Dialogue: 0,0:08:37.31,0:08:44.53,Default,,0000,0000,0000,,Double of two is 4 no\Ncarry, 004 is 8 again, no Dialogue: 0,0:08:44.53,0:08:51.16,Default,,0000,0000,0000,,overflow. Double F8 is 16 so\NI've got one here now. Dialogue: 0,0:08:52.12,0:08:58.94,Default,,0000,0000,0000,,WF6 is 12. I've got another one\Nhere. Now double F2 is 4. Dialogue: 0,0:09:00.04,0:09:05.80,Default,,0000,0000,0000,,Put down a zero and hold on.\NI'm repeating myself look. Dialogue: 0,0:09:06.75,0:09:10.65,Default,,0000,0000,0000,,Point 4.8. 6248624862 Dialogue: 0,0:09:10.65,0:09:18.04,Default,,0000,0000,0000,,so this.\NSimple decimal fraction 3.4 is Dialogue: 0,0:09:18.04,0:09:23.10,Default,,0000,0000,0000,,an infinitely recurring binary\Nfraction, so that's again shows Dialogue: 0,0:09:23.10,0:09:28.73,Default,,0000,0000,0000,,you some difficulties when it\Ncomes to converting that simple Dialogue: 0,0:09:28.73,0:09:33.24,Default,,0000,0000,0000,,fractions to binary fractions.\NSo this would be. Dialogue: 0,0:09:33.94,0:09:40.42,Default,,0000,0000,0000,,3.4 in decimal\Nwould be 1 Dialogue: 0,0:09:40.42,0:09:43.66,Default,,0000,0000,0000,,one radix .01100110. Dialogue: 0,0:09:44.17,0:09:47.97,Default,,0000,0000,0000,,212345678 places. Dialogue: 0,0:09:50.97,0:09:55.78,Default,,0000,0000,0000,,As I mentioned it in the last\Nvideo, this is something that's Dialogue: 0,0:09:55.78,0:09:59.39,Default,,0000,0000,0000,,fundamentally inherent property\Nof the binary number system. We Dialogue: 0,0:09:59.39,0:10:03.80,Default,,0000,0000,0000,,can't really do anything about\Nit, but by using more binary Dialogue: 0,0:10:03.80,0:10:07.81,Default,,0000,0000,0000,,digits to represent the decimal\Nnumbers, we can minimize this Dialogue: 0,0:10:07.81,0:10:15.54,Default,,0000,0000,0000,,problem. Let's look\Nat another simple Dialogue: 0,0:10:15.54,0:10:21.42,Default,,0000,0000,0000,,example, 4.715. Separate\Nit again to whole and Dialogue: 0,0:10:21.42,0:10:27.02,Default,,0000,0000,0000,,fractional. Part 4 is just 100.\NRemember this is 1, two and four Dialogue: 0,0:10:27.02,0:10:31.76,Default,,0000,0000,0000,,and the fractional part will be\N0.715. Now let's keep doubling Dialogue: 0,0:10:31.76,0:10:38.66,Default,,0000,0000,0000,,it. 2 * 5 is then carried A1\Nthree times, one is 2 + 1 is Dialogue: 0,0:10:38.66,0:10:45.55,Default,,0000,0000,0000,,three 2 * 7 is 14, so I've got\None of the overflow, so the 1st Dialogue: 0,0:10:45.55,0:10:49.43,Default,,0000,0000,0000,,digit in after the radix point\Nwill be one. Dialogue: 0,0:10:49.49,0:10:53.90,Default,,0000,0000,0000,,Now those two unnecessary\Nanymore. So double again 2 * 3 Dialogue: 0,0:10:53.90,0:10:59.92,Default,,0000,0000,0000,,is Six 2 * 4 is 8, so there\Nis no overflow. This digit will Dialogue: 0,0:10:59.92,0:11:01.12,Default,,0000,0000,0000,,be at 0. Dialogue: 0,0:11:02.09,0:11:08.52,Default,,0000,0000,0000,,Double it again. 2 * 6 is 12,\Ncarried A one 2 * 8016 + 1 makes Dialogue: 0,0:11:08.52,0:11:12.67,Default,,0000,0000,0000,,17. I've got an overflow here\Nnow, so that's number one. Dialogue: 0,0:11:13.47,0:11:20.53,Default,,0000,0000,0000,,Double it again. 2 * 2 is\Nfour 2 * 7 is 14. Dialogue: 0,0:11:21.17,0:11:23.34,Default,,0000,0000,0000,,So next digit is 1. Dialogue: 0,0:11:24.23,0:11:30.08,Default,,0000,0000,0000,,Double against that digits gone\N2 * 4 is eight 2 * 4 is 8 Dialogue: 0,0:11:30.08,0:11:35.15,Default,,0000,0000,0000,,no overflow, so this digit\Nphobia, 0 double 2 * 8 is 16, Dialogue: 0,0:11:35.15,0:11:42.17,Default,,0000,0000,0000,,carried A one 2 * 8 is 16 + 1\Nis 17. So there is one as an Dialogue: 0,0:11:42.17,0:11:47.63,Default,,0000,0000,0000,,overflow that's gone. Now double\Nagain 2 * 6 is 12, carried A one Dialogue: 0,0:11:47.63,0:11:54.26,Default,,0000,0000,0000,,2 * 7 is 14 + 1 makes it 15,\Nso I've got one as an overflow. Dialogue: 0,0:11:54.30,0:12:01.44,Default,,0000,0000,0000,,Double again 2 * 2 is\Nfour 2 * 5 is 10. Dialogue: 0,0:12:01.97,0:12:04.19,Default,,0000,0000,0000,,Overflow, so that's another one Dialogue: 0,0:12:04.19,0:12:10.38,Default,,0000,0000,0000,,in there. Times 2 is 8000 is the\Nnext digit? Well, I don't know Dialogue: 0,0:12:10.38,0:12:14.78,Default,,0000,0000,0000,,about you, but I'm getting\Nexhausted in here and look there Dialogue: 0,0:12:14.78,0:12:19.58,Default,,0000,0000,0000,,is not even a sign anywhere for\Na repetition, so this function Dialogue: 0,0:12:19.58,0:12:23.58,Default,,0000,0000,0000,,looks even worse than the\Nprevious one. And again just Dialogue: 0,0:12:23.58,0:12:28.78,Default,,0000,0000,0000,,look at it how simple this is in\Ndecimal. So yes, the binary Dialogue: 0,0:12:28.78,0:12:32.78,Default,,0000,0000,0000,,number system indeed have got\Nquite a few limitations which Dialogue: 0,0:12:32.78,0:12:35.18,Default,,0000,0000,0000,,can get quite a bit annoying Dialogue: 0,0:12:35.18,0:12:39.50,Default,,0000,0000,0000,,well. What kind of things have\Nbeen discovered about the binary Dialogue: 0,0:12:39.50,0:12:43.38,Default,,0000,0000,0000,,number system? Well, basically\Nwe know that not all decimal Dialogue: 0,0:12:43.38,0:12:46.87,Default,,0000,0000,0000,,fractions can be expressed as a\Nfinite binary fraction. Dialogue: 0,0:12:46.87,0:12:50.75,Default,,0000,0000,0000,,Unfortunately, this cannot be\Navoided, but can be minimized by Dialogue: 0,0:12:50.75,0:12:55.41,Default,,0000,0000,0000,,using more bids. Also, if you\Nlook at the examples through the Dialogue: 0,0:12:55.41,0:13:00.06,Default,,0000,0000,0000,,video again, you can see that\Nthe radix point is different for Dialogue: 0,0:13:00.06,0:13:03.94,Default,,0000,0000,0000,,different numbers, so the\Nposition of the radix point is Dialogue: 0,0:13:03.94,0:13:05.88,Default,,0000,0000,0000,,changing from number to number. Dialogue: 0,0:13:05.93,0:13:09.86,Default,,0000,0000,0000,,That can get quite confusing for\Nthe computer, but Luckily for Dialogue: 0,0:13:09.86,0:13:13.78,Default,,0000,0000,0000,,this problem we do have a\Nsolution and that is the Dialogue: 0,0:13:13.78,0:13:17.71,Default,,0000,0000,0000,,floating point notation which we\Nwill talk about in more details Dialogue: 0,0:13:17.71,0:13:21.64,Default,,0000,0000,0000,,in one of the following videos.\NFor now I've prepared some Dialogue: 0,0:13:21.64,0:13:26.28,Default,,0000,0000,0000,,examples for you, so please look\Nat them. Try them and you will Dialogue: 0,0:13:26.28,0:13:29.85,Default,,0000,0000,0000,,find the answers later, so these\Nare the practice questions. Dialogue: 0,0:13:35.58,0:13:37.56,Default,,0000,0000,0000,,And here are the answers.