[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:17.27,0:00:22.63,Default,,0000,0000,0000,,Welcome to the next video in the\Nbinary series. In the previous Dialogue: 0,0:00:22.63,0:00:27.10,Default,,0000,0000,0000,,video we learned how to convert\Nnumbers to floating point Dialogue: 0,0:00:27.10,0:00:33.36,Default,,0000,0000,0000,,notation. In this video I will\Nshow you how to do the other way Dialogue: 0,0:00:33.36,0:00:37.83,Default,,0000,0000,0000,,around, so had to convert a\Nfloating point notation number Dialogue: 0,0:00:37.83,0:00:42.30,Default,,0000,0000,0000,,back into ordinary decimal\Nnumbers. So let's say that you Dialogue: 0,0:00:42.30,0:00:46.77,Default,,0000,0000,0000,,are given an 8 bits floating\Npoint notation, something like Dialogue: 0,0:00:46.77,0:00:52.63,Default,,0000,0000,0000,,1001. 1011 OK,\Nnow the first step that you Dialogue: 0,0:00:52.63,0:00:56.25,Default,,0000,0000,0000,,would do in here is break\Nthis code into it Dialogue: 0,0:00:56.25,0:00:58.79,Default,,0000,0000,0000,,constituents break this\Ncode into its parts. Dialogue: 0,0:00:58.79,0:01:02.41,Default,,0000,0000,0000,,Remember that the first bit\Nis the sign bit. That's Dialogue: 0,0:01:02.41,0:01:06.39,Default,,0000,0000,0000,,going to tell you if it's a\Npositive or a negative Dialogue: 0,0:01:06.39,0:01:08.20,Default,,0000,0000,0000,,number. The next 3 digits. Dialogue: 0,0:01:10.29,0:01:11.70,Default,,0000,0000,0000,,Is your exponent? Dialogue: 0,0:01:13.00,0:01:15.92,Default,,0000,0000,0000,,And this exponent, these 3\Nbits twos complement notation Dialogue: 0,0:01:15.92,0:01:19.82,Default,,0000,0000,0000,,will tell you how many places\Nyou need to move the radix Dialogue: 0,0:01:19.82,0:01:24.05,Default,,0000,0000,0000,,point either in to the right\Nor to the left and the last Dialogue: 0,0:01:24.05,0:01:25.68,Default,,0000,0000,0000,,part. The last four bits. Dialogue: 0,0:01:27.49,0:01:29.51,Default,,0000,0000,0000,,Is your normalized? Dialogue: 0,0:01:31.43,0:01:32.34,Default,,0000,0000,0000,,Month is self. Dialogue: 0,0:01:33.40,0:01:39.22,Default,,0000,0000,0000,,This is the number that you will\Nhave to apply the exponent two Dialogue: 0,0:01:39.22,0:01:41.91,Default,,0000,0000,0000,,and move the radix point into Dialogue: 0,0:01:41.91,0:01:48.00,Default,,0000,0000,0000,,the right. Place to be able to\Ndecode the binary number so. Dialogue: 0,0:01:49.27,0:01:56.36,Default,,0000,0000,0000,,Step one. Sign because the sign\Nequals to one. We have got a Dialogue: 0,0:01:56.36,0:01:57.86,Default,,0000,0000,0000,,negative number here. Dialogue: 0,0:02:01.50,0:02:03.46,Default,,0000,0000,0000,,Then Step 2. Dialogue: 0,0:02:04.59,0:02:10.80,Default,,0000,0000,0000,,Exponent Our exponent is\N001. Well, that's a positive Dialogue: 0,0:02:10.80,0:02:16.81,Default,,0000,0000,0000,,number because it starts with\Nzero and it's positive one. So Dialogue: 0,0:02:16.81,0:02:23.38,Default,,0000,0000,0000,,my exponent is positive one, so\NI will need to move my Dialogue: 0,0:02:23.38,0:02:28.30,Default,,0000,0000,0000,,normalized mantissa one place\Ninto the positive direction that Dialogue: 0,0:02:28.30,0:02:31.04,Default,,0000,0000,0000,,three. My normalized mantissa is Dialogue: 0,0:02:31.04,0:02:36.17,Default,,0000,0000,0000,,0.1011. Apply the exponent\Ntwo. It move the radix .1 Dialogue: 0,0:02:36.17,0:02:37.96,Default,,0000,0000,0000,,in the positive direction. Dialogue: 0,0:02:39.97,0:02:47.12,Default,,0000,0000,0000,,So the number the binary number\Nthat is given to me here is Dialogue: 0,0:02:47.12,0:02:53.72,Default,,0000,0000,0000,,one data .011. Now I need to\Ndecode it back into decimal. Dialogue: 0,0:02:54.93,0:03:00.14,Default,,0000,0000,0000,,This is one that's the radix\Npoint. This is 1/2. This is 1/4 Dialogue: 0,0:03:00.14,0:03:04.96,Default,,0000,0000,0000,,and this is an 8. So what I have\Nin here is. Dialogue: 0,0:03:05.47,0:03:11.79,Default,,0000,0000,0000,,1 + 1/4 plus an 8. Remember,\Nhow can we act together? Dialogue: 0,0:03:11.79,0:03:18.12,Default,,0000,0000,0000,,Fractions need to make them to\Nbe the same denominators, so it Dialogue: 0,0:03:18.12,0:03:24.44,Default,,0000,0000,0000,,will be 1 + 2 eight +18,\Nwhich is altogether one and Dialogue: 0,0:03:24.44,0:03:30.51,Default,,0000,0000,0000,,three eights. And remember,\Nwe had one to start with, Dialogue: 0,0:03:30.51,0:03:35.52,Default,,0000,0000,0000,,so 10011011 in eight bits\Nfloating point notation is Dialogue: 0,0:03:35.52,0:03:41.09,Default,,0000,0000,0000,,the same as minus one and\Nthree eights in decimal. Dialogue: 0,0:03:44.28,0:03:50.39,Default,,0000,0000,0000,,Let's look at the\Nnext example, which Dialogue: 0,0:03:50.39,0:03:53.01,Default,,0000,0000,0000,,is 11011100 again. Dialogue: 0,0:03:58.01,0:04:02.98,Default,,0000,0000,0000,,The first step is to identify\Nthe sign. Now the sign is 1 Dialogue: 0,0:04:02.98,0:04:06.50,Default,,0000,0000,0000,,again. So we have got a\Nnegative number. Dialogue: 0,0:04:09.07,0:04:11.76,Default,,0000,0000,0000,,Then Step Dialogue: 0,0:04:11.76,0:04:17.66,Default,,0000,0000,0000,,2. Find\Nthe exponent. Dialogue: 0,0:04:18.90,0:04:24.18,Default,,0000,0000,0000,,Remember the exponent is 101\Nnow. This is in three Bits 2's Dialogue: 0,0:04:24.18,0:04:29.46,Default,,0000,0000,0000,,complement, so the 1st digit\Ntells me that this is a negative Dialogue: 0,0:04:29.46,0:04:34.74,Default,,0000,0000,0000,,number. So this is a negative\Nexponent, so it went through the Dialogue: 0,0:04:34.74,0:04:40.02,Default,,0000,0000,0000,,inversion process. So what I\Nneed to do to find out what Dialogue: 0,0:04:40.02,0:04:44.42,Default,,0000,0000,0000,,positive equivalent is in here\Nis to redo that inversion Dialogue: 0,0:04:44.42,0:04:48.82,Default,,0000,0000,0000,,process, so copy the number\Nuntil you copy the one. Dialogue: 0,0:04:49.34,0:04:51.66,Default,,0000,0000,0000,,Then invert everything else. Dialogue: 0,0:04:52.28,0:04:57.35,Default,,0000,0000,0000,,So that zero becomes one. This\None becomes a 0, so this will be Dialogue: 0,0:04:57.35,0:05:00.61,Default,,0000,0000,0000,,the positive equivalent of this\Nnegative number, and the Dialogue: 0,0:05:00.61,0:05:03.50,Default,,0000,0000,0000,,positive equivalent in here\Nusing the place values. Dialogue: 0,0:05:04.20,0:05:08.00,Default,,0000,0000,0000,,This is equal to Dialogue: 0,0:05:08.00,0:05:14.64,Default,,0000,0000,0000,,R. Three, so this original\Nnumber is negative three, so our Dialogue: 0,0:05:14.64,0:05:16.62,Default,,0000,0000,0000,,exponent is negative 3. Dialogue: 0,0:05:17.23,0:05:19.87,Default,,0000,0000,0000,,And that 3. Dialogue: 0,0:05:20.60,0:05:22.55,Default,,0000,0000,0000,,Using the mantissa. Dialogue: 0,0:05:23.34,0:05:30.37,Default,,0000,0000,0000,,Now the normalized mantissa is\Nthe last four bits. Remember, Dialogue: 0,0:05:30.37,0:05:37.40,Default,,0000,0000,0000,,it's always starts with 0.1100,\Nbut what that Azar's done? Dialogue: 0,0:05:37.98,0:05:42.83,Default,,0000,0000,0000,,The exponent was negative three,\Nso the computer was stored to Dialogue: 0,0:05:42.83,0:05:48.12,Default,,0000,0000,0000,,move it 3 places to the negative\Ndirection. So what does that Dialogue: 0,0:05:48.12,0:05:51.98,Default,,0000,0000,0000,,mean? One place to place Dialogue: 0,0:05:51.98,0:05:55.83,Default,,0000,0000,0000,,three places. Filling the zeros. Dialogue: 0,0:05:56.67,0:06:04.17,Default,,0000,0000,0000,,So the original number\Nwas a very small Dialogue: 0,0:06:04.17,0:06:07.91,Default,,0000,0000,0000,,number O radix .0001100. Dialogue: 0,0:06:08.59,0:06:11.38,Default,,0000,0000,0000,,So what is this number? Dialogue: 0,0:06:12.06,0:06:18.66,Default,,0000,0000,0000,,Use the place values again this\Nis 1 radix point or half or Dialogue: 0,0:06:18.66,0:06:25.27,Default,,0000,0000,0000,,quarter on 8R16R32 and the rest\Nof them are zero, so we don't Dialogue: 0,0:06:25.27,0:06:30.86,Default,,0000,0000,0000,,really need to bother about\Nthem. So this number here is Dialogue: 0,0:06:30.86,0:06:35.43,Default,,0000,0000,0000,,basically the sum of the 16th\Nand the 32. Dialogue: 0,0:06:35.98,0:06:39.58,Default,,0000,0000,0000,,Again, how can I add\Nfractions together? I need to Dialogue: 0,0:06:39.58,0:06:43.54,Default,,0000,0000,0000,,make them to be the same\Ndenominator, so how can I Dialogue: 0,0:06:43.54,0:06:47.50,Default,,0000,0000,0000,,make 30 twos from sixteens? I\Njust need to double it. Dialogue: 0,0:06:48.92,0:06:55.82,Default,,0000,0000,0000,,So it's altogether 3 / 32.\NAnd remember I had a negative Dialogue: 0,0:06:55.82,0:07:00.42,Default,,0000,0000,0000,,number because my assignment was\None so one. Dialogue: 0,0:07:00.95,0:07:07.74,Default,,0000,0000,0000,,1011100 As an 8 bits floating\Npoint is exactly the same as Dialogue: 0,0:07:07.74,0:07:10.01,Default,,0000,0000,0000,,minus 3 / 32. Dialogue: 0,0:07:12.90,0:07:16.79,Default,,0000,0000,0000,,Let's do one more example of\Nthis floating point notation and Dialogue: 0,0:07:16.79,0:07:19.27,Default,,0000,0000,0000,,let's look at what number is 0. Dialogue: 0,0:07:19.78,0:07:23.89,Default,,0000,0000,0000,,101\N1011 Dialogue: 0,0:07:26.06,0:07:29.50,Default,,0000,0000,0000,,Step one, find Dialogue: 0,0:07:29.50,0:07:36.94,Default,,0000,0000,0000,,the sign. The\Nfirst bit is 0, so this Dialogue: 0,0:07:36.94,0:07:39.39,Default,,0000,0000,0000,,is a positive number. Dialogue: 0,0:07:40.91,0:07:44.22,Default,,0000,0000,0000,,Then comes Step Dialogue: 0,0:07:44.22,0:07:51.65,Default,,0000,0000,0000,,2. Using\Nthe exponent. Dialogue: 0,0:07:53.36,0:07:55.14,Default,,0000,0000,0000,,Now our exponent. Dialogue: 0,0:07:55.77,0:07:57.40,Default,,0000,0000,0000,,Is 101. Dialogue: 0,0:07:59.75,0:08:01.50,Default,,0000,0000,0000,,Which is a negative number. Dialogue: 0,0:08:02.19,0:08:06.65,Default,,0000,0000,0000,,So again, going through the\Ninversion process copied the Dialogue: 0,0:08:06.65,0:08:11.12,Default,,0000,0000,0000,,number until your Capital One,\Nthen invert everything else. Dialogue: 0,0:08:12.14,0:08:15.40,Default,,0000,0000,0000,,And. This is again. Dialogue: 0,0:08:16.32,0:08:20.40,Default,,0000,0000,0000,,Positive three so this is still\Nnegative. 3 The difference here Dialogue: 0,0:08:20.40,0:08:25.22,Default,,0000,0000,0000,,now will be that my month is a\Nis slightly different, so let's Dialogue: 0,0:08:25.22,0:08:28.93,Default,,0000,0000,0000,,look at the last step and deal\Nwith the mantissa. Dialogue: 0,0:08:29.91,0:08:36.33,Default,,0000,0000,0000,,So I'm normalized mantissa\Nis 0.1011. The computer Dialogue: 0,0:08:36.33,0:08:42.74,Default,,0000,0000,0000,,was told to move\Nthis mantissa or the Dialogue: 0,0:08:42.74,0:08:48.77,Default,,0000,0000,0000,,radix point. Three in the\Nnegative direction, so it would Dialogue: 0,0:08:48.77,0:08:51.12,Default,,0000,0000,0000,,need to move it 123. Dialogue: 0,0:08:51.72,0:08:58.64,Default,,0000,0000,0000,,So 0.00.\NSo the original Dialogue: 0,0:08:58.64,0:09:04.81,Default,,0000,0000,0000,,number was 0.0001011.\NThe accompanying place Dialogue: 0,0:09:04.81,0:09:10.98,Default,,0000,0000,0000,,values are one\Nradix point 1/2 Dialogue: 0,0:09:10.98,0:09:17.15,Default,,0000,0000,0000,,or quarter an\N8 or 16 Dialogue: 0,0:09:17.15,0:09:20.23,Default,,0000,0000,0000,,or 3264 and Dialogue: 0,0:09:20.23,0:09:27.54,Default,,0000,0000,0000,,128th. So I need to\Ntalk together. Now is 1 / 16 + Dialogue: 0,0:09:27.54,0:09:34.50,Default,,0000,0000,0000,,1 / 64 + 1 / 128. Now\Nagain to be able to add them Dialogue: 0,0:09:34.50,0:09:40.53,Default,,0000,0000,0000,,together I need to get them all\Nto be the same denominator. Now Dialogue: 0,0:09:40.53,0:09:45.63,Default,,0000,0000,0000,,this is a common denominator\Nbecause I can get 228 from Dialogue: 0,0:09:45.63,0:09:48.42,Default,,0000,0000,0000,,doubling all of them but at Dialogue: 0,0:09:48.42,0:09:51.41,Default,,0000,0000,0000,,different numbers. So from. Dialogue: 0,0:09:53.01,0:09:59.94,Default,,0000,0000,0000,,16 to get 228 what I've done. I\Ndoubled 123 times. So that is Dialogue: 0,0:09:59.94,0:10:06.87,Default,,0000,0000,0000,,basically 16 * 8 going to give\Nme the 128. So what this is Dialogue: 0,0:10:06.87,0:10:14.79,Default,,0000,0000,0000,,telling me that 8 / 128 is the\Nsame as 1 / 1664 and 120. There Dialogue: 0,0:10:14.79,0:10:21.72,Default,,0000,0000,0000,,is only one doubling point in\Nhere, so that is just 2 / 128. Dialogue: 0,0:10:21.92,0:10:28.79,Default,,0000,0000,0000,,Plus 1 / 128, so\Nthis is altogether giving me Dialogue: 0,0:10:28.79,0:10:35.66,Default,,0000,0000,0000,,8 + 2 is 10\Nplus one is 11 / Dialogue: 0,0:10:35.66,0:10:41.16,Default,,0000,0000,0000,,128 so 01011011 in eight\Nbits within point. Dialogue: 0,0:10:41.98,0:10:46.61,Default,,0000,0000,0000,,Is the same as 11 / 128?\NRemember this time it was zero, Dialogue: 0,0:10:46.61,0:10:50.88,Default,,0000,0000,0000,,so this is a positive number and\Nfor positive numbers we don't Dialogue: 0,0:10:50.88,0:10:52.66,Default,,0000,0000,0000,,write out the positive sign. Dialogue: 0,0:10:53.62,0:10:57.82,Default,,0000,0000,0000,,Now we went through the 8 bits\Nfloating point notation and you Dialogue: 0,0:10:57.82,0:11:01.32,Default,,0000,0000,0000,,might find it still a little bit\Nconfusing. That's absolutely Dialogue: 0,0:11:01.32,0:11:04.82,Default,,0000,0000,0000,,fine, because this is like an\Norchestra you pulling together Dialogue: 0,0:11:04.82,0:11:07.97,Default,,0000,0000,0000,,everything that you've learned\Nabout binary numbers. So you Dialogue: 0,0:11:07.97,0:11:11.12,Default,,0000,0000,0000,,putting together the two bits\Ncomplement notation, some normal Dialogue: 0,0:11:11.12,0:11:13.92,Default,,0000,0000,0000,,mathematical knowledge about\Nmoving decimal places applied 2 Dialogue: 0,0:11:13.92,0:11:18.82,Default,,0000,0000,0000,,in binary numbers and so on. So\Nthis is probably one of the most Dialogue: 0,0:11:18.82,0:11:22.67,Default,,0000,0000,0000,,difficult questions that you can\Nget in binary numbers, but once Dialogue: 0,0:11:22.67,0:11:25.47,Default,,0000,0000,0000,,you understand them then you\Nwill really know. Dialogue: 0,0:11:25.55,0:11:28.74,Default,,0000,0000,0000,,What needed to be known\Nabout this system, and Dialogue: 0,0:11:28.74,0:11:32.30,Default,,0000,0000,0000,,you know how the computer\Nlooks at the binary code. Dialogue: 0,0:11:33.41,0:11:38.35,Default,,0000,0000,0000,,And now it is your turn to try\Nthese conversions. You will find Dialogue: 0,0:11:38.35,0:11:41.77,Default,,0000,0000,0000,,the answers to these questions\Nshortly after the questions Dialogue: 0,0:11:41.77,0:11:45.12,Default,,0000,0000,0000,,appear. So these are the\Npractice questions. Dialogue: 0,0:11:50.86,0:11:52.82,Default,,0000,0000,0000,,And here are the answers.