proprep proprep
Why Proprep?
  • About Us
  • Press Room
  • Blog
  • See how it works
Pricing
Ask a tutor
Login
Start Free Trial
For Educators
proprep
  • Ask a tutor
  • Why Proprep?
    • About Us
    • Press Room
    • Blog
    • See how it works
  • Pricing
  • Login
  • For Educators
Home General Modules Principles of Programing Machine Level Representation of Data
Module added

  • Player Size:
  • Shortcuts:
  • Speed:
  • Subtitles:
  • Download Workbook
Up Next
Watch next
Numeric data and number bases 0/17 completed
  • Introduction to number systems
  • Binary
  • Hexadecimal
  • Selecting between number systems
  • Exercise 1 parts A-B
  • Exercise 2 part A
  • Exercise 2 part B
  • Exercise 2 part C
  • Exercise 2 part D
  • Exercise 3 parts A-B
  • Exercise 3 parts C-D
  • Exercise 4 parts A-B
  • Exercise 4 part C
  • Exercise 4 part D
  • Exercise 4 part E
  • Exercise 5 parts A-B
  • Exercise 6
Signed and twos complement 0/16 completed
  • Signed Numbers
  • Binary Addition
  • Ones Complement
  • Twos Complement
  • Exercise 1 parts A-C
  • Exercise 2 parts A-C
  • Exercise 3 parts A-B
  • Exercise 4 parts A-B
  • Exercise 5 parts A-B
  • Exercise 6
  • Exercise 7 part A
  • Exercise 7 part B
  • Exercise 7 part C
  • Exercise 8 part A
  • Exercise 8 part B
  • Exercise 8 part C
Fixed and floating point 0/6 completed
  • Exercise 1 parts A-D
  • Exercise 2 parts A-C
  • Exercise 3 parts A-B
  • Exercise 4 parts A-C
  • Exercise 5 parts A-C
  • Exercise 6 parts A-C
Comments

Description

Sign up

Get unlimited access to 1,500 subjects including personalised modules.

Skip for now
{"Free":0,"Sample":1,"Paid":2}
[{"Name":"Numeric data and number bases","TopicPlaylistFirstVideoID":0,"Duration":null,"Videos":[{"Watched":false,"Name":"Introduction to number systems","Duration":"6m 1s","ChapterTopicVideoID":28553,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":"https://www.proprep.uk/Images/Videos_Thumbnails/28553.jpeg","UploadDate":"2022-02-28T16:16:55.1470000","DurationForVideoObject":"PT6M1S","Description":null,"MetaTitle":"Introduction to number systems: Video + Workbook | Proprep","MetaDescription":"Machine Level Representation of Data - Numeric data and number bases. Watch the video made by an expert in the field. Download the workbook and maximize your learning.","Canonical":"https://www.proprep.uk/general-modules/all/principles-of-programing/machine-level-representation-of-data/numeric-data-and-number-bases/vid30071","VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.490","Text":"Welcome to this video on number systems."},{"Start":"00:02.490 ","End":"00:03.600","Text":"By the end of this section,"},{"Start":"00:03.600 ","End":"00:05.070","Text":"you\u0027ll be able to explain the need for"},{"Start":"00:05.070 ","End":"00:08.340","Text":"alternative number systems, convert between decimal,"},{"Start":"00:08.340 ","End":"00:10.635","Text":"binary, hexadecimal, and octal,"},{"Start":"00:10.635 ","End":"00:15.165","Text":"and select between appropriate number bases according to need."},{"Start":"00:15.165 ","End":"00:18.270","Text":"I\u0027ve been working with computers for nearly 40 years and"},{"Start":"00:18.270 ","End":"00:20.985","Text":"there\u0027s still something I find amazing after all this time,"},{"Start":"00:20.985 ","End":"00:23.880","Text":"which is the simple fact that any type of information can be"},{"Start":"00:23.880 ","End":"00:27.690","Text":"reduced to just 2 symbols, 1 or 0."},{"Start":"00:27.690 ","End":"00:32.640","Text":"That means any number can be represented solely by 1s and 0s."},{"Start":"00:32.640 ","End":"00:36.990","Text":"Any texts can be represented with 1s and 0s."},{"Start":"00:36.990 ","End":"00:41.345","Text":"An image can be represented with 1s and 0s."},{"Start":"00:41.345 ","End":"00:44.000","Text":"The sounds you\u0027re hearing now and the video that you\u0027re"},{"Start":"00:44.000 ","End":"00:47.135","Text":"watching is made up entirely of just 1s and 0s."},{"Start":"00:47.135 ","End":"00:49.580","Text":"Even the software that\u0027s running on your computer that"},{"Start":"00:49.580 ","End":"00:51.800","Text":"enables you to see and hear the video and interact"},{"Start":"00:51.800 ","End":"00:56.600","Text":"with it is also ultimately made up solely of 1s and 0s."},{"Start":"00:56.600 ","End":"00:59.015","Text":"Once you get your head around this revelation,"},{"Start":"00:59.015 ","End":"01:01.650","Text":"it would be a perfectly reasonable question to ask,"},{"Start":"01:01.650 ","End":"01:05.990","Text":"why would you want to represent information in terms of 1 and 0?"},{"Start":"01:05.990 ","End":"01:08.000","Text":"The answer is that computers are made up of"},{"Start":"01:08.000 ","End":"01:10.865","Text":"highly complex arrangements of electronic circuits,"},{"Start":"01:10.865 ","End":"01:13.835","Text":"specifically a type called a digital circuit."},{"Start":"01:13.835 ","End":"01:19.340","Text":"Each element within a digital circuit can be in 1 of 2 states, on or off."},{"Start":"01:19.340 ","End":"01:24.289","Text":"In this case, 1 element of the circuit might be a light-emitting diode or LED,"},{"Start":"01:24.289 ","End":"01:27.140","Text":"which can be made to turn on and in this case emit"},{"Start":"01:27.140 ","End":"01:31.475","Text":"green light or turn off and emit no light."},{"Start":"01:31.475 ","End":"01:35.060","Text":"It\u0027s convenient to represent the state of on being equivalent to"},{"Start":"01:35.060 ","End":"01:39.950","Text":"the digit 1 and the state of off being equivalent to the digit 0."},{"Start":"01:39.950 ","End":"01:44.075","Text":"When you hear the word digital being mentioned in relation to technology,"},{"Start":"01:44.075 ","End":"01:48.965","Text":"what we\u0027re saying is that information is being represented by digits."},{"Start":"01:48.965 ","End":"01:55.520","Text":"Digital systems are systems in which data is represented using discrete numerical values."},{"Start":"01:55.520 ","End":"01:58.730","Text":"More specifically, these discrete numerical values are"},{"Start":"01:58.730 ","End":"02:02.015","Text":"represented as digits that can only be 0 or 1."},{"Start":"02:02.015 ","End":"02:05.240","Text":"There is no value in between 0 and 1,"},{"Start":"02:05.240 ","End":"02:08.960","Text":"and that\u0027s what we mean by discrete values."},{"Start":"02:08.960 ","End":"02:11.780","Text":"You may have noticed we\u0027ve used the term data here,"},{"Start":"02:11.780 ","End":"02:15.365","Text":"which is sometimes used interchangeably with information."},{"Start":"02:15.365 ","End":"02:19.410","Text":"However, the 2 terms are technically not the same thing."},{"Start":"02:19.580 ","End":"02:26.495","Text":"Data are facts which have been coded in a form suitable for processing."},{"Start":"02:26.495 ","End":"02:30.005","Text":"Information is data that has been processed,"},{"Start":"02:30.005 ","End":"02:34.030","Text":"stored, analyzed, or interpreted."},{"Start":"02:34.030 ","End":"02:37.320","Text":"To give 1 example to illustrate the difference,"},{"Start":"02:37.320 ","End":"02:40.070","Text":"if we asked individuals how they were going to vote in"},{"Start":"02:40.070 ","End":"02:43.850","Text":"an upcoming election, we\u0027re collecting data."},{"Start":"02:43.850 ","End":"02:46.640","Text":"We would code this in the form of a list of"},{"Start":"02:46.640 ","End":"02:51.350","Text":"all available candidates and an extra possible response of undecided."},{"Start":"02:51.350 ","End":"02:53.990","Text":"A valid response would be to tick 1 box,"},{"Start":"02:53.990 ","End":"02:55.985","Text":"and 1 box only."},{"Start":"02:55.985 ","End":"02:59.720","Text":"If we then process all the data we collected,"},{"Start":"02:59.720 ","End":"03:05.160","Text":"we can produce information showing what the voting intentions are."},{"Start":"03:06.380 ","End":"03:11.450","Text":"Now, we\u0027ve established why there\u0027s a need to represent data in terms of 1s and 0s."},{"Start":"03:11.450 ","End":"03:14.210","Text":"Let\u0027s have a look at the idea of number systems."},{"Start":"03:14.210 ","End":"03:16.130","Text":"Perhaps the easiest way to understand"},{"Start":"03:16.130 ","End":"03:19.745","Text":"a number system is to consider the one that we\u0027re already familiar with"},{"Start":"03:19.745 ","End":"03:27.050","Text":"called decimal or denary This is a number system based on 10 symbols between 0 and 9."},{"Start":"03:27.050 ","End":"03:31.225","Text":"Each place value in a decimal number is a power of 10."},{"Start":"03:31.225 ","End":"03:33.660","Text":"Here the first 4 powers of 10,"},{"Start":"03:33.660 ","End":"03:38.630","Text":"each one gives the weighting of a digit in a 4-digit decimal number."},{"Start":"03:38.630 ","End":"03:41.360","Text":"Each digit of a decimal is"},{"Start":"03:41.360 ","End":"03:46.860","Text":"10 times the previous one as we move from the right to the left."},{"Start":"03:47.290 ","End":"03:54.705","Text":"In mathematical terms, the number 2049 is actually 2 times 10^3,"},{"Start":"03:54.705 ","End":"03:56.865","Text":"plus 0 times 10^2,"},{"Start":"03:56.865 ","End":"03:58.785","Text":"plus 4 times 10^1,"},{"Start":"03:58.785 ","End":"04:01.785","Text":"plus 9 times 10^0."},{"Start":"04:01.785 ","End":"04:07.640","Text":"A binary number system is a system based on the 2 symbols, 0 and 1."},{"Start":"04:07.640 ","End":"04:13.865","Text":"Each digit of a binary number is 2 times the previous one as we move from right to left."},{"Start":"04:13.865 ","End":"04:15.590","Text":"Given this particular number,"},{"Start":"04:15.590 ","End":"04:18.725","Text":"the temptation is to say that it\u0027s 1011,"},{"Start":"04:18.725 ","End":"04:22.415","Text":"but that\u0027s actually interpreting it as a decimal number."},{"Start":"04:22.415 ","End":"04:27.260","Text":"What we\u0027re really saying is that this is a binary number, 1011."},{"Start":"04:27.260 ","End":"04:35.405","Text":"In mathematical terms, that would be 1 times 2^3 plus 0 times 2^2 plus 1 times 2^1,"},{"Start":"04:35.405 ","End":"04:38.215","Text":"plus 1 times 2^0."},{"Start":"04:38.215 ","End":"04:42.608","Text":"Because we are only ever multiplying the column value by 1 or 0,"},{"Start":"04:42.608 ","End":"04:46.145","Text":"it\u0027s simple to convert this binary number into a decimal number."},{"Start":"04:46.145 ","End":"04:49.190","Text":"We just take the column values given in decimal"},{"Start":"04:49.190 ","End":"04:53.795","Text":"here and add the relevant values together."},{"Start":"04:53.795 ","End":"04:55.370","Text":"Anyway, where there\u0027s a 0,"},{"Start":"04:55.370 ","End":"04:57.680","Text":"we ignore that column and anywhere where there\u0027s a 1,"},{"Start":"04:57.680 ","End":"05:01.310","Text":"we include that column in our final results."},{"Start":"05:01.310 ","End":"05:06.470","Text":"Here we ignore the column width 4 and add the remaining column values together,"},{"Start":"05:06.470 ","End":"05:08.630","Text":"giving us 8 plus 2 plus 1,"},{"Start":"05:08.630 ","End":"05:10.585","Text":"which is 11 obviously."},{"Start":"05:10.585 ","End":"05:17.030","Text":"The binary number 1011 is the same as the decimal number 11."},{"Start":"05:17.030 ","End":"05:19.610","Text":"You can see that when written down this way,"},{"Start":"05:19.610 ","End":"05:21.320","Text":"it can be quite confusing."},{"Start":"05:21.320 ","End":"05:22.790","Text":"When we write down a number,"},{"Start":"05:22.790 ","End":"05:26.630","Text":"we should really annotate it to make clear which number base we\u0027re using."},{"Start":"05:26.630 ","End":"05:31.685","Text":"We do this by putting a subscript after the number indicating the base."},{"Start":"05:31.685 ","End":"05:34.205","Text":"Binary numbers have a subscript of 2,"},{"Start":"05:34.205 ","End":"05:36.965","Text":"decimal numbers, a subscript of 10."},{"Start":"05:36.965 ","End":"05:38.540","Text":"This is much clearer."},{"Start":"05:38.540 ","End":"05:43.790","Text":"1011 is a binary number which is the same as 11 in decimal."},{"Start":"05:43.790 ","End":"05:46.745","Text":"Sometimes you\u0027ll see this written with brackets as well,"},{"Start":"05:46.745 ","End":"05:50.390","Text":"with the digits inside the brackets and the number base outside."},{"Start":"05:50.390 ","End":"05:52.670","Text":"Let\u0027s pause there and absorb what we\u0027ve learned so"},{"Start":"05:52.670 ","End":"05:55.250","Text":"far about encoding data and number systems."},{"Start":"05:55.250 ","End":"05:58.070","Text":"In the next video, we\u0027ll learn how to move between"},{"Start":"05:58.070 ","End":"06:02.370","Text":"the decimal and binary number systems. See you then."}],"ID":30071},{"Watched":false,"Name":"Binary","Duration":"8m 9s","ChapterTopicVideoID":28554,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.025","Text":"Hello? Welcome back."},{"Start":"00:02.025 ","End":"00:07.695","Text":"The range of numbers available to us in binary is dependent on how many digits we have,"},{"Start":"00:07.695 ","End":"00:09.750","Text":"if we have 8 binary digits,"},{"Start":"00:09.750 ","End":"00:13.935","Text":"we can express a number from 0-255."},{"Start":"00:13.935 ","End":"00:17.762","Text":"Because of 1 in every column is the binary number 1,"},{"Start":"00:17.762 ","End":"00:19.118","Text":"1, 1, 1,"},{"Start":"00:19.118 ","End":"00:20.474","Text":"1, 1, 1,"},{"Start":"00:20.474 ","End":"00:25.320","Text":"1 that in decimal would be 255,"},{"Start":"00:25.320 ","End":"00:28.590","Text":"a 0 in every column would give us 0,"},{"Start":"00:28.590 ","End":"00:34.935","Text":"so 8 bits allows us to store any number between 0 and 255."},{"Start":"00:34.935 ","End":"00:37.080","Text":"Rather than saying binary digit,"},{"Start":"00:37.080 ","End":"00:38.760","Text":"every time we use those words,"},{"Start":"00:38.760 ","End":"00:43.205","Text":"we can use the abbreviation bit for binary digit."},{"Start":"00:43.205 ","End":"00:48.425","Text":"When we collect 8 bits together as we did just now to make the number 255,"},{"Start":"00:48.425 ","End":"00:52.150","Text":"we call that a byte or octet,"},{"Start":"00:52.150 ","End":"00:55.820","Text":"that\u0027s a grouping of 8 binary digits."},{"Start":"00:55.820 ","End":"00:59.315","Text":"Historically, a byte can mean a larger grouping than 8,"},{"Start":"00:59.315 ","End":"01:03.590","Text":"so you might hear the word octet used instead, which is unambiguous."},{"Start":"01:03.590 ","End":"01:08.480","Text":"However, more generally you will hear the term byte used and in a modern context,"},{"Start":"01:08.480 ","End":"01:11.475","Text":"it almost always means 8 bits."},{"Start":"01:11.475 ","End":"01:15.035","Text":"A half a byte is known as a nibble,"},{"Start":"01:15.035 ","End":"01:18.095","Text":"which is a grouping of 4 binary digits."},{"Start":"01:18.095 ","End":"01:19.910","Text":"When we write down a binary number,"},{"Start":"01:19.910 ","End":"01:24.335","Text":"we often separate it into 2 nibbles just to make it easier to read,"},{"Start":"01:24.335 ","End":"01:27.065","Text":"for example, this number here,"},{"Start":"01:27.065 ","End":"01:33.415","Text":"1101 1010, is much easier to read partitioned into 2 halves."},{"Start":"01:33.415 ","End":"01:36.620","Text":"In a binary number of any size the bit on"},{"Start":"01:36.620 ","End":"01:41.060","Text":"the extreme right is known as the least significant bit,"},{"Start":"01:41.060 ","End":"01:45.700","Text":"because it has the lowest significance in terms of the size of the overall number,"},{"Start":"01:45.700 ","End":"01:49.340","Text":"and the bits on the extreme left is known as"},{"Start":"01:49.340 ","End":"01:51.890","Text":"the most significant bit because it has"},{"Start":"01:51.890 ","End":"01:55.570","Text":"the most significance in terms of the size of the overall number."},{"Start":"01:55.570 ","End":"01:58.550","Text":"How would you know how many bits you need to encode"},{"Start":"01:58.550 ","End":"02:02.405","Text":"any particular decimal number in binary?"},{"Start":"02:02.405 ","End":"02:05.570","Text":"You first have to make a decision on what would be"},{"Start":"02:05.570 ","End":"02:08.210","Text":"the highest number you want to express,"},{"Start":"02:08.210 ","End":"02:14.370","Text":"so you knew that the maximum number you\u0027d ever store would be 10,000 in decimal."},{"Start":"02:14.370 ","End":"02:18.620","Text":"In binary, because we\u0027re dealing with powers of 2,"},{"Start":"02:18.620 ","End":"02:23.845","Text":"we need to find the nearest power of 2-10,000."},{"Start":"02:23.845 ","End":"02:26.555","Text":"Each time you add a new bit,"},{"Start":"02:26.555 ","End":"02:29.585","Text":"the value of the MSB has doubled,"},{"Start":"02:29.585 ","End":"02:36.575","Text":"so we can just keep adding bits until we get to a number that if we doubled it again,"},{"Start":"02:36.575 ","End":"02:40.850","Text":"will be bigger than the maximum number we\u0027re looking to encode."},{"Start":"02:40.850 ","End":"02:42.890","Text":"Here, we just keep adding bits,"},{"Start":"02:42.890 ","End":"02:49.710","Text":"doubling the MSB value each time until we reach 8192,"},{"Start":"02:49.710 ","End":"02:51.185","Text":"if we go any further,"},{"Start":"02:51.185 ","End":"02:55.415","Text":"the MSB will be bigger than 10,000 and that\u0027s more than we need,"},{"Start":"02:55.415 ","End":"02:57.370","Text":"so we can stop here."},{"Start":"02:57.370 ","End":"02:59.625","Text":"We have 14 columns now,"},{"Start":"02:59.625 ","End":"03:05.945","Text":"so the number of binary digits we need to encode the decimal value 10,000 is 14."},{"Start":"03:05.945 ","End":"03:09.920","Text":"We can also calculate the highest number that can be stored with a given number of"},{"Start":"03:09.920 ","End":"03:14.570","Text":"bits using the formula 2^n minus 1,"},{"Start":"03:14.570 ","End":"03:17.470","Text":"where n is the number of bits,"},{"Start":"03:17.470 ","End":"03:23.544","Text":"so 2^14 minus 1"},{"Start":"03:23.544 ","End":"03:26.050","Text":"would give us 16,383 which is more than enough range to store"},{"Start":"03:26.050 ","End":"03:29.645","Text":"the maximum number 10,000 that we set out to store."},{"Start":"03:29.645 ","End":"03:32.820","Text":"As we\u0027ve already seen for 8 bits,"},{"Start":"03:32.820 ","End":"03:37.630","Text":"2^8 minus 1 would give us 255."},{"Start":"03:37.630 ","End":"03:40.900","Text":"Let\u0027s stick with the example number of 10,000 and go through"},{"Start":"03:40.900 ","End":"03:44.515","Text":"the process of converting that number to binary."},{"Start":"03:44.515 ","End":"03:49.555","Text":"Earlier, we put a comma in to make this decimal number clearer when written out,"},{"Start":"03:49.555 ","End":"03:52.375","Text":"as is conventional in general usage in the UK,"},{"Start":"03:52.375 ","End":"03:54.100","Text":"but this can vary in other countries,"},{"Start":"03:54.100 ","End":"03:56.630","Text":"so we\u0027ll dispense with a comma from now on."},{"Start":"03:56.630 ","End":"04:01.640","Text":"We start converting from decimal to binary by looking at the MSB,"},{"Start":"04:01.640 ","End":"04:04.820","Text":"deciding whether we need to put a 1 in that column,"},{"Start":"04:04.820 ","End":"04:07.550","Text":"and at each point as we move from left to right,"},{"Start":"04:07.550 ","End":"04:09.260","Text":"we ask ourselves the question,"},{"Start":"04:09.260 ","End":"04:11.615","Text":"do we need this bit or not?"},{"Start":"04:11.615 ","End":"04:15.545","Text":"If we do we insert a 1 if we don\u0027t we insert a 0."},{"Start":"04:15.545 ","End":"04:19.280","Text":"The number you\u0027re looking to convert is bigger than the column that you\u0027re looking at,"},{"Start":"04:19.280 ","End":"04:21.395","Text":"then you do need that column,"},{"Start":"04:21.395 ","End":"04:25.100","Text":"so as 10,000 is bigger than 8,192,"},{"Start":"04:25.100 ","End":"04:26.795","Text":"we do need that value,"},{"Start":"04:26.795 ","End":"04:29.725","Text":"so we write a 1 in that position."},{"Start":"04:29.725 ","End":"04:34.410","Text":"We now have 8,192 out of the 10,000 we need to make up,"},{"Start":"04:34.410 ","End":"04:42.330","Text":"so we calculate what\u0027s left to make up from the remaining binary digits, which is 1,808."},{"Start":"04:42.330 ","End":"04:48.935","Text":"We don\u0027t need the 4,096 column because that\u0027s larger than 1,808,"},{"Start":"04:48.935 ","End":"04:51.890","Text":"so we put a 0 in that position."},{"Start":"04:51.890 ","End":"04:54.830","Text":"We don\u0027t need 2,048 either,"},{"Start":"04:54.830 ","End":"04:59.030","Text":"as it\u0027s also larger than 1,808,"},{"Start":"04:59.030 ","End":"05:01.175","Text":"so we put another 0 in there."},{"Start":"05:01.175 ","End":"05:04.900","Text":"However, we do need 1,024,"},{"Start":"05:04.900 ","End":"05:07.380","Text":"so 1 goes in that position,"},{"Start":"05:07.380 ","End":"05:15.465","Text":"we now subtract 1,024 from 1,808 to know what\u0027s left to make up that 784."},{"Start":"05:15.465 ","End":"05:18.405","Text":"784 is bigger than 512,"},{"Start":"05:18.405 ","End":"05:20.430","Text":"so we need 512."},{"Start":"05:20.430 ","End":"05:25.175","Text":"Now let us see what\u0027s left to make up once we\u0027ve deducted 512 is 272,"},{"Start":"05:25.175 ","End":"05:27.925","Text":"which is also bigger than 256,"},{"Start":"05:27.925 ","End":"05:29.285","Text":"so we\u0027ll need that column,"},{"Start":"05:29.285 ","End":"05:31.200","Text":"we put a 1 in and then we carry on,"},{"Start":"05:31.200 ","End":"05:34.470","Text":"16 is smaller than the next few columns,"},{"Start":"05:34.470 ","End":"05:37.420","Text":"so we put 0s in each of those."},{"Start":"05:37.420 ","End":"05:42.860","Text":"The 16 column is exactly equal to the amount we\u0027ve left to make up,"},{"Start":"05:42.860 ","End":"05:47.345","Text":"so we put a 1 in that column and there\u0027s nothing left to make up,"},{"Start":"05:47.345 ","End":"05:50.840","Text":"so we put 0s in every other column."},{"Start":"05:50.840 ","End":"05:56.675","Text":"We\u0027ve now converted the decimal number 10,000 into the binary equivalent."},{"Start":"05:56.675 ","End":"06:00.320","Text":"To convert in the other direction from binary into decimal,"},{"Start":"06:00.320 ","End":"06:02.435","Text":"we can work in 2 different ways."},{"Start":"06:02.435 ","End":"06:03.935","Text":"Looking at the number,"},{"Start":"06:03.935 ","End":"06:06.035","Text":"if we work from the LSB,"},{"Start":"06:06.035 ","End":"06:09.760","Text":"we know that it\u0027s worth 2^0 in decimal,"},{"Start":"06:09.760 ","End":"06:13.035","Text":"the next bit is 2^1 and so on."},{"Start":"06:13.035 ","End":"06:15.470","Text":"Anywhere in the binary number where there was 1,"},{"Start":"06:15.470 ","End":"06:16.820","Text":"we include that value,"},{"Start":"06:16.820 ","End":"06:19.760","Text":"otherwise, we ignore it."},{"Start":"06:19.760 ","End":"06:26.640","Text":"Here we have 2^3 plus 2^8 plus 2^9 and 2^12,"},{"Start":"06:26.640 ","End":"06:30.005","Text":"we can now use a calculator to work out each of those values"},{"Start":"06:30.005 ","End":"06:33.815","Text":"and add them up and come to a final value,"},{"Start":"06:33.815 ","End":"06:36.925","Text":"which in this case is 4,872."},{"Start":"06:36.925 ","End":"06:43.400","Text":"We\u0027ve converted the binary number to its decimal equivalent 4,872."},{"Start":"06:43.400 ","End":"06:47.060","Text":"If you don\u0027t have access to a calculator or not allowed 1,"},{"Start":"06:47.060 ","End":"06:48.605","Text":"for example in an exam,"},{"Start":"06:48.605 ","End":"06:50.875","Text":"you can convert as follows."},{"Start":"06:50.875 ","End":"06:53.625","Text":"Write out the binary number,"},{"Start":"06:53.625 ","End":"06:56.085","Text":"and then working from the LSB,"},{"Start":"06:56.085 ","End":"06:58.795","Text":"write 1 above the LSB,"},{"Start":"06:58.795 ","End":"07:00.800","Text":"and then work to the left,"},{"Start":"07:00.800 ","End":"07:03.590","Text":"doubling the value for each column,"},{"Start":"07:03.590 ","End":"07:08.730","Text":"and carefully writing the value directly above each binary digit,"},{"Start":"07:08.990 ","End":"07:12.350","Text":"until you reach the end of the number."},{"Start":"07:12.350 ","End":"07:15.770","Text":"We can stop here as leading 0s can be"},{"Start":"07:15.770 ","End":"07:20.375","Text":"ignored as they will not contribute anything to the calculation."},{"Start":"07:20.375 ","End":"07:23.870","Text":"The decimal number can now be found simply by writing out"},{"Start":"07:23.870 ","End":"07:29.765","Text":"a column value for each position in the binary number, where there\u0027s a ball."},{"Start":"07:29.765 ","End":"07:39.480","Text":"Here, 2,048 plus 64 plus 16 plus 4 gives us 2,132,"},{"Start":"07:39.740 ","End":"07:43.716","Text":"so we\u0027ve now converted the binary number 0,1,"},{"Start":"07:43.716 ","End":"07:45.135","Text":"0, 0, 0,"},{"Start":"07:45.135 ","End":"07:47.499","Text":"0, 1, 0,1, 0,"},{"Start":"07:47.499 ","End":"07:54.685","Text":"1, 0, 0 into its decimal equivalent 2,132."},{"Start":"07:54.685 ","End":"07:57.230","Text":"Let\u0027s pause there again and absorb what"},{"Start":"07:57.230 ","End":"07:59.975","Text":"we\u0027ve learned about converting to and from binary."},{"Start":"07:59.975 ","End":"08:01.415","Text":"In the next video,"},{"Start":"08:01.415 ","End":"08:05.000","Text":"we\u0027ll look at another useful number system that has some advantages"},{"Start":"08:05.000 ","End":"08:09.610","Text":"over binary in certain situations. See you then."}],"ID":30072},{"Watched":false,"Name":"Hexadecimal","Duration":"8m 32s","ChapterTopicVideoID":28555,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:01.755","Text":"Hello, welcome back."},{"Start":"00:01.755 ","End":"00:03.060","Text":"In the previous video,"},{"Start":"00:03.060 ","End":"00:06.870","Text":"we established that digital circuits make it necessary for us to adopt"},{"Start":"00:06.870 ","End":"00:11.970","Text":"a binary number system based on 2 possible states, 0 or 1."},{"Start":"00:11.970 ","End":"00:14.550","Text":"We can encode a decimal number in binary simply"},{"Start":"00:14.550 ","End":"00:16.980","Text":"by using the appropriate number of binary digits,"},{"Start":"00:16.980 ","End":"00:19.350","Text":"known for short as bits with values of"},{"Start":"00:19.350 ","End":"00:22.890","Text":"0 or 1 in the relevant positions within the binary number."},{"Start":"00:22.890 ","End":"00:26.520","Text":"A problem quickly arises when dealing with numbers encoded in binary,"},{"Start":"00:26.520 ","End":"00:28.890","Text":"which is that they become quite lengthy to read,"},{"Start":"00:28.890 ","End":"00:30.705","Text":"write out, and even to say."},{"Start":"00:30.705 ","End":"00:33.615","Text":"This binary number is made up of 16 bits,"},{"Start":"00:33.615 ","End":"00:37.140","Text":"that\u0027s 16 symbols to write out for this single number."},{"Start":"00:37.140 ","End":"00:39.150","Text":"To make it easier to read or write,"},{"Start":"00:39.150 ","End":"00:42.690","Text":"the bits can be grouped in fours like so."},{"Start":"00:42.690 ","End":"00:46.070","Text":"We say we split the number up into 4 nibbles."},{"Start":"00:46.070 ","End":"00:48.770","Text":"If there isn\u0027t an exact multiple of 4 digits,"},{"Start":"00:48.770 ","End":"00:54.085","Text":"we can simply add zeros to the left hand side to make it up to a multiple of 4."},{"Start":"00:54.085 ","End":"01:01.899","Text":"For example, the 5-bit number 10111 can be turned into 2 nibbles,"},{"Start":"01:02.690 ","End":"01:08.165","Text":"0001 0111, simply by adding 3 zeros at the left-hand side."},{"Start":"01:08.165 ","End":"01:11.600","Text":"Adding these zeros to the left doesn\u0027t change the value of the number,"},{"Start":"01:11.600 ","End":"01:16.355","Text":"but we can more clearly read the numbers as equal-sized patterns."},{"Start":"01:16.355 ","End":"01:22.115","Text":"It be convenient to be able to take each nibble and encode it as a single symbol."},{"Start":"01:22.115 ","End":"01:25.790","Text":"And this is exactly what you can do with hexadecimal,"},{"Start":"01:25.790 ","End":"01:30.515","Text":"which is a number system based on 16 symbols between 0 and"},{"Start":"01:30.515 ","End":"01:36.235","Text":"F. Each place value in a hexadecimal number is a power of 16."},{"Start":"01:36.235 ","End":"01:39.165","Text":"Here are the first 4 powers of 16."},{"Start":"01:39.165 ","End":"01:44.555","Text":"Each one gives a waiting of a digit in a 4 digit hexadecimal number."},{"Start":"01:44.555 ","End":"01:47.660","Text":"Each digit in hexadecimal number is"},{"Start":"01:47.660 ","End":"01:52.740","Text":"16 times the previous one as we move from right to left."},{"Start":"01:52.870 ","End":"01:57.890","Text":"Hexadecimal numbers can seem quite strange at first because there"},{"Start":"01:57.890 ","End":"02:02.650","Text":"are letters as well as the digits we\u0027re familiar with from the decimal system."},{"Start":"02:02.650 ","End":"02:06.350","Text":"The digits from 0-9 are identical to decimal,"},{"Start":"02:06.350 ","End":"02:11.175","Text":"but there are also symbols that represent a decimal values 10-15."},{"Start":"02:11.175 ","End":"02:16.415","Text":"The letters A-F are used to represent the decimal values 10-15,"},{"Start":"02:16.415 ","End":"02:18.377","Text":"while the letters A-F, well,"},{"Start":"02:18.377 ","End":"02:21.380","Text":"they follow a well-known sequence i.e."},{"Start":"02:21.380 ","End":"02:23.100","Text":"the alphabet just like numbers,"},{"Start":"02:23.100 ","End":"02:25.580","Text":"and they can be typed on a keyboard."},{"Start":"02:25.580 ","End":"02:27.650","Text":"We only need to go up to F because"},{"Start":"02:27.650 ","End":"02:29.960","Text":"remember the range of numbers that can be expressed with"},{"Start":"02:29.960 ","End":"02:34.840","Text":"a given number of bits is given by the formula 2^n minus 1,"},{"Start":"02:34.840 ","End":"02:37.410","Text":"where n is the number of bits."},{"Start":"02:37.410 ","End":"02:40.170","Text":"For a nibble that would be 4,"},{"Start":"02:40.170 ","End":"02:44.715","Text":"and so 2^4 minus 1 would give us 15."},{"Start":"02:44.715 ","End":"02:48.410","Text":"15 is the highest number we can express so hence,"},{"Start":"02:48.410 ","End":"02:51.350","Text":"our need for 16 symbols including 0."},{"Start":"02:51.350 ","End":"02:53.960","Text":"To convert a hexadecimal number to decimal,"},{"Start":"02:53.960 ","End":"02:57.380","Text":"we multiply each hexadecimal digit by its column"},{"Start":"02:57.380 ","End":"03:02.420","Text":"waiting and sum all the parts together to get a decimal equivalent."},{"Start":"03:02.420 ","End":"03:05.120","Text":"This is the same as in binary or decimal,"},{"Start":"03:05.120 ","End":"03:10.955","Text":"but we have the extra complication here of the hexadecimal values for 10-15,"},{"Start":"03:10.955 ","End":"03:14.960","Text":"which are represented by the letters A-F. We take"},{"Start":"03:14.960 ","End":"03:20.975","Text":"the additional step of replacing those hex digits with their equivalents in decimal,"},{"Start":"03:20.975 ","End":"03:27.470","Text":"in this case giving us the final value, 41,723."},{"Start":"03:27.470 ","End":"03:32.030","Text":"We\u0027ve converted a number in hexadecimal to its decimal equivalent."},{"Start":"03:32.030 ","End":"03:34.310","Text":"Again, if we don\u0027t have access to a calculator,"},{"Start":"03:34.310 ","End":"03:37.100","Text":"we can work out the decimal value by starting at"},{"Start":"03:37.100 ","End":"03:40.325","Text":"the least significant digit on the extreme right,"},{"Start":"03:40.325 ","End":"03:42.085","Text":"which we know is 1."},{"Start":"03:42.085 ","End":"03:45.440","Text":"Once we\u0027ve written out that 1 above the relevant digit,"},{"Start":"03:45.440 ","End":"03:47.324","Text":"we know that in hexadecimal,"},{"Start":"03:47.324 ","End":"03:50.015","Text":"each column is 16 times more the 1 to the right."},{"Start":"03:50.015 ","End":"03:54.650","Text":"So 16 will be the next column value, and we write that in."},{"Start":"03:54.650 ","End":"03:56.645","Text":"Then keep going."},{"Start":"03:56.645 ","End":"03:59.825","Text":"16 by 16 is 256, and we write that in."},{"Start":"03:59.825 ","End":"04:05.015","Text":"Then final column for a 4 digit number will be 16 times 256,"},{"Start":"04:05.015 ","End":"04:08.415","Text":"which you can work out to be 4,096."},{"Start":"04:08.415 ","End":"04:12.145","Text":"Now we can multiply each digit by its column value."},{"Start":"04:12.145 ","End":"04:19.660","Text":"So 1 times 4,096, 0 lots of 256, A lots of 16, and C lots of 1."},{"Start":"04:19.660 ","End":"04:23.380","Text":"Again, we have the complication of the digits which are greater than 9,"},{"Start":"04:23.380 ","End":"04:26.125","Text":"which we need to convert to their decimal equivalents."},{"Start":"04:26.125 ","End":"04:34.535","Text":"So 10 for A and 12 for C. Now we multiply out and add up to get the final value."},{"Start":"04:34.535 ","End":"04:38.095","Text":"And we\u0027ve converted the hex value into decimal."},{"Start":"04:38.095 ","End":"04:42.160","Text":"To go in the other direction from decimal to hexadecimal,"},{"Start":"04:42.160 ","End":"04:46.465","Text":"we need to first determine how many hexadecimal digits we need."},{"Start":"04:46.465 ","End":"04:50.905","Text":"Remember the formula we saw for binary was the number based to the power of n,"},{"Start":"04:50.905 ","End":"04:53.590","Text":"where n is the number of digits we\u0027re using."},{"Start":"04:53.590 ","End":"04:56.839","Text":"For 4 hexadecimal digits,"},{"Start":"04:57.330 ","End":"05:06.350","Text":"16^n minus 1, and the range will give us 0 to 65,535."},{"Start":"05:06.350 ","End":"05:08.180","Text":"If 4 hexadecimal digits is"},{"Start":"05:08.180 ","End":"05:11.000","Text":"enough range to encourage that decimal number we\u0027re looking at,"},{"Start":"05:11.000 ","End":"05:12.545","Text":"then we can go ahead."},{"Start":"05:12.545 ","End":"05:15.890","Text":"Otherwise we add more digits until we do have enough range."},{"Start":"05:15.890 ","End":"05:19.895","Text":"Let\u0027s encode the decimal number 10,000 again as we did previously."},{"Start":"05:19.895 ","End":"05:23.465","Text":"That\u0027ll fit comfortably into 4 hex digits."},{"Start":"05:23.465 ","End":"05:27.975","Text":"We start in the leftmost column and ask ourselves if we need this value."},{"Start":"05:27.975 ","End":"05:31.645","Text":"10,000 is greater than 4,096,"},{"Start":"05:31.645 ","End":"05:33.175","Text":"so we need it."},{"Start":"05:33.175 ","End":"05:36.410","Text":"We find out how many times it goes in."},{"Start":"05:36.410 ","End":"05:41.670","Text":"By dividing using integer division where we ignore the remainder,"},{"Start":"05:42.820 ","End":"05:45.590","Text":"10,000/4,096, which gives us 2."},{"Start":"05:45.590 ","End":"05:48.395","Text":"We write that into the relevant column."},{"Start":"05:48.395 ","End":"05:52.610","Text":"We can now get the remainder by doing what\u0027s called a modulo operation,"},{"Start":"05:52.610 ","End":"05:55.235","Text":"which should be available on most calculators."},{"Start":"05:55.235 ","End":"06:01.460","Text":"If not, we just take 2 times 4,096 from 10,000 to find the remainder."},{"Start":"06:01.460 ","End":"06:03.395","Text":"So that\u0027s 1,808,"},{"Start":"06:03.395 ","End":"06:07.219","Text":"and that\u0027s what we have to make up from the remaining columns."},{"Start":"06:07.219 ","End":"06:09.530","Text":"We repeat the process asking"},{"Start":"06:09.530 ","End":"06:12.365","Text":"ourselves is the next column less than what\u0027s left to make up?"},{"Start":"06:12.365 ","End":"06:14.090","Text":"Which in this case it is."},{"Start":"06:14.090 ","End":"06:16.385","Text":"So we need the 256 column,"},{"Start":"06:16.385 ","End":"06:21.990","Text":"but this time we do an integer division of 256, giving us 7."},{"Start":"06:21.990 ","End":"06:25.835","Text":"We write that into a relevant place and work out the remainder,"},{"Start":"06:25.835 ","End":"06:28.265","Text":"which gives us 16."},{"Start":"06:28.265 ","End":"06:31.085","Text":"We now only have 16 to make up."},{"Start":"06:31.085 ","End":"06:33.800","Text":"We repeat the process again for the next column,"},{"Start":"06:33.800 ","End":"06:36.800","Text":"which is 16, giving us 1,"},{"Start":"06:36.800 ","End":"06:38.660","Text":"which we write in."},{"Start":"06:38.660 ","End":"06:42.230","Text":"Now there\u0027s no remainder left in this case,"},{"Start":"06:42.230 ","End":"06:45.950","Text":"so the last digit is going to be 0."},{"Start":"06:45.950 ","End":"06:53.360","Text":"And we\u0027ve converted the decimal value 10,000 into its hexadecimal equivalent 2,710."},{"Start":"06:53.360 ","End":"06:56.120","Text":"Binary to hexadecimal is very straightforward."},{"Start":"06:56.120 ","End":"06:58.400","Text":"You simply divide up the binary into"},{"Start":"06:58.400 ","End":"07:02.825","Text":"nibbles and give each nibble a hexadecimal representation."},{"Start":"07:02.825 ","End":"07:05.510","Text":"If there isn\u0027t an exact multiple of 4, it\u0027s not problem."},{"Start":"07:05.510 ","End":"07:09.635","Text":"You can just assume that the most significant bits in that nibble are 0."},{"Start":"07:09.635 ","End":"07:15.080","Text":"Each nibble has bit values which are powers of 2 up to 8."},{"Start":"07:15.080 ","End":"07:18.575","Text":"These are the same for each individual nibble,"},{"Start":"07:18.575 ","End":"07:23.135","Text":"except in our case for the last nibble which doesn\u0027t have 4-bits,"},{"Start":"07:23.135 ","End":"07:27.560","Text":"we assume that most significant bit is 0 and we only go up to 4 not 8."},{"Start":"07:27.560 ","End":"07:30.770","Text":"Now we can convert each nibble into a hex digit."},{"Start":"07:30.770 ","End":"07:33.365","Text":"The most significant digit here is 4 plus 1,"},{"Start":"07:33.365 ","End":"07:36.755","Text":"which is 5 in decimal or hex. We write that in."},{"Start":"07:36.755 ","End":"07:38.315","Text":"Then 2 plus 1,"},{"Start":"07:38.315 ","End":"07:41.525","Text":"which is 3 in decimal and hex."},{"Start":"07:41.525 ","End":"07:44.000","Text":"Now this nibble is 8 plus 4,"},{"Start":"07:44.000 ","End":"07:45.320","Text":"which is 12 in decimal,"},{"Start":"07:45.320 ","End":"07:46.730","Text":"but we can\u0027t write that in."},{"Start":"07:46.730 ","End":"07:48.845","Text":"We need a single hexadecimal digit,"},{"Start":"07:48.845 ","End":"07:51.170","Text":"which will be C. Remember, A is 10,"},{"Start":"07:51.170 ","End":"07:53.945","Text":"B is 11, C is 12, and so on up to 15."},{"Start":"07:53.945 ","End":"07:58.025","Text":"This final nibble is 8 plus 4 plus 2, which is 14."},{"Start":"07:58.025 ","End":"08:01.370","Text":"In hex, we write that as E. Now we\u0027ve"},{"Start":"08:01.370 ","End":"08:04.940","Text":"converted the binary number into its hexadecimal equivalent."},{"Start":"08:04.940 ","End":"08:08.210","Text":"Notice the difference in the number of symbols used."},{"Start":"08:08.210 ","End":"08:15.625","Text":"The binary representation needed 15 symbols and the hexadecimal equivalent only 4."},{"Start":"08:15.625 ","End":"08:17.790","Text":"Let\u0027s pause 1 final time,"},{"Start":"08:17.790 ","End":"08:22.850","Text":"and in the next video we will look at our general number bases and"},{"Start":"08:22.850 ","End":"08:26.180","Text":"1 specific one and how we would choose"},{"Start":"08:26.180 ","End":"08:29.795","Text":"between the different number bases given any particular situation."},{"Start":"08:29.795 ","End":"08:33.360","Text":"So see you soon for that one. Goodbye."}],"ID":30073},{"Watched":false,"Name":"Selecting between number systems","Duration":"6m 23s","ChapterTopicVideoID":28556,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:01.665","Text":"Hello, welcome back."},{"Start":"00:01.665 ","End":"00:03.690","Text":"By now we should have got used to the idea of"},{"Start":"00:03.690 ","End":"00:07.500","Text":"number basis and can spot the general pattern that they all follow."},{"Start":"00:07.500 ","End":"00:09.570","Text":"For any given number base B,"},{"Start":"00:09.570 ","End":"00:13.905","Text":"we can express a range of numbers determined by the number of digits"},{"Start":"00:13.905 ","End":"00:19.100","Text":"n. The highest value that can be expressed is B^n minus 1."},{"Start":"00:19.100 ","End":"00:22.265","Text":"Because 0 is a valid combination too."},{"Start":"00:22.265 ","End":"00:26.170","Text":"Let\u0027s try this with a number base of 8 and 4 digits,"},{"Start":"00:26.170 ","End":"00:30.875","Text":"8^4 minus 1 would give us 4,095."},{"Start":"00:30.875 ","End":"00:33.560","Text":"We could express the decimal values from"},{"Start":"00:33.560 ","End":"00:39.845","Text":"0-4,095 using 4 digits if we had a number system based on 8."},{"Start":"00:39.845 ","End":"00:41.690","Text":"We\u0027d need 8 different symbols,"},{"Start":"00:41.690 ","End":"00:47.554","Text":"so we may as well use the existing decimal digits for 0-7 to make up these 8 symbols."},{"Start":"00:47.554 ","End":"00:52.030","Text":"This number system based on 8 and using the symbols 0-7"},{"Start":"00:52.030 ","End":"00:56.705","Text":"is actually the next most common system after the ones that we\u0027ve already seen."},{"Start":"00:56.705 ","End":"00:58.700","Text":"Although it is rare these days,"},{"Start":"00:58.700 ","End":"01:00.800","Text":"and it\u0027s called octal,"},{"Start":"01:00.800 ","End":"01:05.945","Text":"each place value in an octal number is a power of 8."},{"Start":"01:05.945 ","End":"01:08.585","Text":"Given this particular octal number,"},{"Start":"01:08.585 ","End":"01:12.530","Text":"we can convert it to a decimal in the usual way,"},{"Start":"01:12.530 ","End":"01:15.950","Text":"multiplying out the digit by its place value."},{"Start":"01:15.950 ","End":"01:24.560","Text":"The octal number 4,107 is equivalent to 2,119, in decimal."},{"Start":"01:24.560 ","End":"01:31.385","Text":"Octal has the convenient property that each octal digit can represent 3 binary digits."},{"Start":"01:31.385 ","End":"01:35.330","Text":"We call a grouping of 3 binary digits a triad."},{"Start":"01:35.330 ","End":"01:39.425","Text":"Converting between octal and binary is a simple case of converting"},{"Start":"01:39.425 ","End":"01:45.080","Text":"each octal digit into binary and writing it above the relevant digit."},{"Start":"01:45.080 ","End":"01:55.740","Text":"Here, 4 would be 100,1 in the next triad would be 001,0 would just be 3 zeros,"},{"Start":"01:55.740 ","End":"01:58.875","Text":"and 7 would be 3 1\u0027s."},{"Start":"01:58.875 ","End":"02:02.655","Text":"The binary number, 1 4 zeros,"},{"Start":"02:02.655 ","End":"02:04.620","Text":"1, 3 zeros 1, 1,"},{"Start":"02:04.620 ","End":"02:10.395","Text":"1 is equivalent to 4107 in octal."},{"Start":"02:10.395 ","End":"02:12.800","Text":"Which number bases most appropriate for"},{"Start":"02:12.800 ","End":"02:17.510","Text":"a given situation depends on what the data is and who is working with it."},{"Start":"02:17.510 ","End":"02:22.790","Text":"An end-user of most digital systems is almost always going to want to deal in decimal,"},{"Start":"02:22.790 ","End":"02:26.645","Text":"since that\u0027s the only number system most people are familiar with."},{"Start":"02:26.645 ","End":"02:29.495","Text":"For input and output intended for humans,"},{"Start":"02:29.495 ","End":"02:32.270","Text":"decimal is the way to go."},{"Start":"02:32.270 ","End":"02:37.490","Text":"Where computer hardware is being interacted with at the bit level, for example,"},{"Start":"02:37.490 ","End":"02:42.920","Text":"the internal memory of a CPU or a chip that interfaces with a CPU,"},{"Start":"02:42.920 ","End":"02:47.105","Text":"binary is often the most appropriate number base to work in."},{"Start":"02:47.105 ","End":"02:49.880","Text":"This CPU contains, for example,"},{"Start":"02:49.880 ","End":"02:52.790","Text":"a flag register, an area of memory within it."},{"Start":"02:52.790 ","End":"02:55.490","Text":"With individual bits indicating the status"},{"Start":"02:55.490 ","End":"02:58.955","Text":"of various operations taking place within the CPU."},{"Start":"02:58.955 ","End":"03:01.640","Text":"If, say, the result of a calculation couldn\u0027t"},{"Start":"03:01.640 ","End":"03:04.205","Text":"be contained in a particular memory location,"},{"Start":"03:04.205 ","End":"03:09.125","Text":"bit 2, the overflow bit would be set to 1."},{"Start":"03:09.125 ","End":"03:13.610","Text":"If an addition of 2 numbers resulted in a carryover to a new digit,"},{"Start":"03:13.610 ","End":"03:17.915","Text":"bit 0, the carry bit would be set to 1."},{"Start":"03:17.915 ","End":"03:21.530","Text":"Read these individual bits in isolation from all the others."},{"Start":"03:21.530 ","End":"03:26.045","Text":"It\u0027s more convenient to deal in binary than decimal."},{"Start":"03:26.045 ","End":"03:30.470","Text":"Networking is another area where sometimes binary can be useful."},{"Start":"03:30.470 ","End":"03:32.180","Text":"Using a network mask,"},{"Start":"03:32.180 ","End":"03:36.515","Text":"we can partition something called an IP address into 2 halves,"},{"Start":"03:36.515 ","End":"03:39.845","Text":"the network ID and the host ID."},{"Start":"03:39.845 ","End":"03:42.080","Text":"When looking at it as a decimal number,"},{"Start":"03:42.080 ","End":"03:44.705","Text":"it can be hard to see which part is which."},{"Start":"03:44.705 ","End":"03:50.855","Text":"Because decimal 240 includes some bits that are 1 and some bits that are 0."},{"Start":"03:50.855 ","End":"03:55.040","Text":"Seeing it in binary makes it much easier to spot which is"},{"Start":"03:55.040 ","End":"03:59.285","Text":"part of the host address and which is part of the network address."},{"Start":"03:59.285 ","End":"04:03.680","Text":"The one shows the region that\u0027s part of the network ID and"},{"Start":"04:03.680 ","End":"04:09.005","Text":"where there are zeros that shows the host ID range."},{"Start":"04:09.005 ","End":"04:12.620","Text":"Hexadecimal is most often used by programmers or"},{"Start":"04:12.620 ","End":"04:15.990","Text":"perhaps graphic designers or digital artists."},{"Start":"04:15.990 ","End":"04:19.755","Text":"Color is often expressed as a 24-bit value,"},{"Start":"04:19.755 ","End":"04:21.725","Text":"split into 3 bytes,"},{"Start":"04:21.725 ","End":"04:23.945","Text":"red, green, and blue."},{"Start":"04:23.945 ","End":"04:29.360","Text":"The specific value is given to each of these determine the exact color being expressed."},{"Start":"04:29.360 ","End":"04:32.810","Text":"This blue color here being used in the font,"},{"Start":"04:32.810 ","End":"04:35.810","Text":"happens to be this precise color."},{"Start":"04:35.810 ","End":"04:42.080","Text":"Here we can see a color dialogue showing this blue color as a single hex value here."},{"Start":"04:42.080 ","End":"04:47.135","Text":"Also individual decimal values for red, green, and blue."},{"Start":"04:47.135 ","End":"04:52.580","Text":"Because hexadecimal uses a maximum of 2 symbols for an 8-bit value."},{"Start":"04:52.580 ","End":"04:58.080","Text":"A hexadecimal RGB value can always be expressed with no more than 6 symbols,"},{"Start":"04:58.080 ","End":"05:04.345","Text":"written out as decimal it could be a maximum of 9 symbols."},{"Start":"05:04.345 ","End":"05:06.335","Text":"For the same reason,"},{"Start":"05:06.335 ","End":"05:10.220","Text":"anywhere where binary values are grouped in 4\u0027s or multiples of 4,"},{"Start":"05:10.220 ","End":"05:13.205","Text":"or when display spaces are premium,"},{"Start":"05:13.205 ","End":"05:15.575","Text":"hexadecimal can be useful."},{"Start":"05:15.575 ","End":"05:20.990","Text":"Here we see a display of the contents of memory in hex called a hex dump."},{"Start":"05:20.990 ","End":"05:24.635","Text":"Each memory location takes up a single byte."},{"Start":"05:24.635 ","End":"05:29.164","Text":"It can be represented by 2 hexadecimal symbols."},{"Start":"05:29.164 ","End":"05:32.855","Text":"For example, this one here, or any of these."},{"Start":"05:32.855 ","End":"05:37.580","Text":"The 32-bit hex memory location is shown"},{"Start":"05:37.580 ","End":"05:44.380","Text":"here and each byte of memory is then shown after the address."},{"Start":"05:44.380 ","End":"05:50.525","Text":"Each full line shows 16 bytes of memory in this type of view."},{"Start":"05:50.525 ","End":"05:56.240","Text":"It\u0027s a nice compact way of displaying memory contents."},{"Start":"05:56.240 ","End":"05:59.405","Text":"That\u0027s it now on number systems."},{"Start":"05:59.405 ","End":"06:02.780","Text":"In this section, we learned how to explain the need for"},{"Start":"06:02.780 ","End":"06:06.080","Text":"alternative number systems to convert between decimal, binary,"},{"Start":"06:06.080 ","End":"06:07.820","Text":"hexadecimal, and octal,"},{"Start":"06:07.820 ","End":"06:12.950","Text":"and to select between appropriate number bases according to need."},{"Start":"06:12.950 ","End":"06:16.355","Text":"Be sure to complete the exercises in the workbook"},{"Start":"06:16.355 ","End":"06:20.390","Text":"to consolidate your understanding of everything we\u0027ve heard about."},{"Start":"06:20.390 ","End":"06:23.490","Text":"Thank you very much and see you soon."}],"ID":30074},{"Watched":false,"Name":"Exercise 1 parts A-B","Duration":"3m 39s","ChapterTopicVideoID":25440,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.970","Text":"Hello, everyone. In this video,"},{"Start":"00:02.970 ","End":"00:09.015","Text":"we\u0027re going to see how you convert a binary number into a decimal representation."},{"Start":"00:09.015 ","End":"00:12.570","Text":"There are 2 simple exercises to start with,"},{"Start":"00:12.570 ","End":"00:14.580","Text":"and then the next exercise,"},{"Start":"00:14.580 ","End":"00:17.265","Text":"we\u0027ll move on to slightly longer numbers."},{"Start":"00:17.265 ","End":"00:20.190","Text":"I\u0027m first going to explain how we\u0027d go about"},{"Start":"00:20.190 ","End":"00:23.910","Text":"the process and then we\u0027re going to do the exercises in turn."},{"Start":"00:23.910 ","End":"00:26.700","Text":"Starting with the first part,"},{"Start":"00:26.700 ","End":"00:30.390","Text":"part A, we can see a short binary number."},{"Start":"00:30.390 ","End":"00:31.590","Text":"There are 1, 2,"},{"Start":"00:31.590 ","End":"00:32.760","Text":"3, 4, 5,"},{"Start":"00:32.760 ","End":"00:35.730","Text":"6, 7 columns in this number."},{"Start":"00:35.730 ","End":"00:39.945","Text":"Each column, you\u0027ll recall in binary has a waiting."},{"Start":"00:39.945 ","End":"00:42.600","Text":"We start from this side,"},{"Start":"00:42.600 ","End":"00:49.295","Text":"the left-hand side and we write above each column the waiting for that column."},{"Start":"00:49.295 ","End":"00:54.200","Text":"Let\u0027s go ahead and do that. The next part of the process then is to simply"},{"Start":"00:54.200 ","End":"00:59.295","Text":"look at where there is a 1 under a particular value,"},{"Start":"00:59.295 ","End":"01:01.910","Text":"and we include anywhere where we have a 1 in"},{"Start":"01:01.910 ","End":"01:07.100","Text":"our final calculation and ignore anywhere where there\u0027s a 0 in the calculation."},{"Start":"01:07.100 ","End":"01:09.980","Text":"Working from left to right,"},{"Start":"01:09.980 ","End":"01:16.400","Text":"we have got a value for 64 because there is a 1 in this column."},{"Start":"01:16.400 ","End":"01:19.820","Text":"We skip the 32 because there\u0027s a 0."},{"Start":"01:19.820 ","End":"01:24.355","Text":"We do include the 16 because there is a 1."},{"Start":"01:24.355 ","End":"01:29.250","Text":"We also include the 8 because there\u0027s a 1 there."},{"Start":"01:29.250 ","End":"01:31.410","Text":"Ignore the 4,"},{"Start":"01:31.410 ","End":"01:33.150","Text":"ignore the 2,"},{"Start":"01:33.150 ","End":"01:35.940","Text":"but include the 1, and we,"},{"Start":"01:35.940 ","End":"01:39.450","Text":"therefore, are left with 64 plus 16,"},{"Start":"01:39.450 ","End":"01:41.370","Text":"which is 80, plus 8,"},{"Start":"01:41.370 ","End":"01:45.095","Text":"88, plus 1 is 89."},{"Start":"01:45.095 ","End":"01:49.055","Text":"We have now completed the conversion from"},{"Start":"01:49.055 ","End":"01:53.570","Text":"the binary representation here to the decimal representation here."},{"Start":"01:53.570 ","End":"01:57.140","Text":"Part B is exactly the same process."},{"Start":"01:57.140 ","End":"01:58.880","Text":"However, this time we have more columns."},{"Start":"01:58.880 ","End":"02:00.440","Text":"If we look at how many columns, we got 1,"},{"Start":"02:00.440 ","End":"02:02.130","Text":"2, 3, 4,"},{"Start":"02:02.130 ","End":"02:03.825","Text":"5, 6, 7,"},{"Start":"02:03.825 ","End":"02:06.090","Text":"8, 9 columns this time."},{"Start":"02:06.090 ","End":"02:11.510","Text":"We\u0027d expect the values on the left-hand side to go higher."},{"Start":"02:11.510 ","End":"02:15.660","Text":"Let\u0027s go ahead and see where we get to with that."},{"Start":"02:15.660 ","End":"02:16.745","Text":"As we can see now,"},{"Start":"02:16.745 ","End":"02:22.160","Text":"the most significant value here on the extreme left-hand side is 256 now,"},{"Start":"02:22.160 ","End":"02:24.770","Text":"whereas previously it was only 64."},{"Start":"02:24.770 ","End":"02:28.490","Text":"We proceed in exactly the same fashion as we did before."},{"Start":"02:28.490 ","End":"02:34.370","Text":"Include any columns where we have a 1 and ignore any columns where we have a 0."},{"Start":"02:34.370 ","End":"02:39.530","Text":"This will give us therefore 256 because there\u0027s a 1 in that column,"},{"Start":"02:39.530 ","End":"02:44.030","Text":"128 because there\u0027s a 1 in that column, skip the 64,"},{"Start":"02:44.030 ","End":"02:48.410","Text":"but include the 32 and 16,"},{"Start":"02:48.410 ","End":"02:49.820","Text":"skip the 8,"},{"Start":"02:49.820 ","End":"02:51.460","Text":"include the 4,"},{"Start":"02:51.460 ","End":"02:54.105","Text":"skip the 2, but include the 1."},{"Start":"02:54.105 ","End":"02:58.885","Text":"Probably is more straightforward to add up in pairs here now,"},{"Start":"02:58.885 ","End":"03:06.420","Text":"so 256 plus 128 is 384, plus,"},{"Start":"03:06.420 ","End":"03:10.920","Text":"32 and 16 is 48 plus 5,"},{"Start":"03:10.920 ","End":"03:13.620","Text":"and that will give us the final answer,"},{"Start":"03:13.620 ","End":"03:21.190","Text":"384 plus 48 plus 5 is 437."},{"Start":"03:21.190 ","End":"03:25.503","Text":"We have completed the first 2 parts of the exercise now."},{"Start":"03:25.503 ","End":"03:30.890","Text":"This binary value has been converted to 437 in decimal."},{"Start":"03:30.890 ","End":"03:32.570","Text":"In the next video, we\u0027ll look at"},{"Start":"03:32.570 ","End":"03:36.050","Text":"slightly longer bodies written out"},{"Start":"03:36.050 ","End":"03:40.530","Text":"in binary and how we might best approach those. See you in the next video."}],"ID":30075},{"Watched":false,"Name":"Exercise 2 part A","Duration":"4m ","ChapterTopicVideoID":25441,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:07.860","Text":"Welcome back. For this next exercise we\u0027ve been asked to do the reverse conversion."},{"Start":"00:07.860 ","End":"00:12.450","Text":"Compared to the previous exercise where we were asked to convert from binary to decimal,"},{"Start":"00:12.450 ","End":"00:16.050","Text":"we\u0027re now being asked to convert from decimal to binary."},{"Start":"00:16.050 ","End":"00:17.925","Text":"There\u0027s 2 methods of doing this."},{"Start":"00:17.925 ","End":"00:19.080","Text":"In this first video,"},{"Start":"00:19.080 ","End":"00:20.925","Text":"I\u0027m going to show you 1 method."},{"Start":"00:20.925 ","End":"00:23.715","Text":"In the next video I\u0027ll show you an alternative method."},{"Start":"00:23.715 ","End":"00:26.730","Text":"You can choose which one suits you."},{"Start":"00:26.730 ","End":"00:30.090","Text":"We begin by looking at the number"},{"Start":"00:30.090 ","End":"00:33.495","Text":"itself and deciding how many columns we\u0027re going to need."},{"Start":"00:33.495 ","End":"00:35.820","Text":"It\u0027s a fairly simple decision to make."},{"Start":"00:35.820 ","End":"00:41.700","Text":"We start on the right hand side writing out the values for each column."},{"Start":"00:41.700 ","End":"00:46.760","Text":"We keep going until we find we don\u0027t need the columns anymore."},{"Start":"00:46.760 ","End":"00:49.805","Text":"To give you an example, 237."},{"Start":"00:49.805 ","End":"00:50.750","Text":"We start by"},{"Start":"00:50.750 ","End":"01:00.443","Text":"writing 1,"},{"Start":"01:00.443 ","End":"01:01.470","Text":"2, 4, 8, 16, 32, 64, 1, 2, 8."},{"Start":"01:04.960 ","End":"01:08.425","Text":"If I was to move on to the next column,"},{"Start":"01:08.425 ","End":"01:12.130","Text":"256 is actually a bigger number than 237,"},{"Start":"01:12.130 ","End":"01:13.615","Text":"so I don\u0027t need it."},{"Start":"01:13.615 ","End":"01:16.600","Text":"So this is the point at which I can stop."},{"Start":"01:16.600 ","End":"01:20.680","Text":"Now it\u0027s a simple case of doing"},{"Start":"01:20.680 ","End":"01:24.395","Text":"a simple test to determine whether I need the column or not."},{"Start":"01:24.395 ","End":"01:26.150","Text":"The test is basically,"},{"Start":"01:26.150 ","End":"01:29.545","Text":"is the number I\u0027m looking at greater than this column,"},{"Start":"01:29.545 ","End":"01:32.477","Text":"or is it not greater than this column?"},{"Start":"01:32.477 ","End":"01:37.055","Text":"For the first one, we can see that 237 is indeed greater than 128."},{"Start":"01:37.055 ","End":"01:38.330","Text":"So we need this column,"},{"Start":"01:38.330 ","End":"01:40.535","Text":"so I\u0027m going to write a 1 there."},{"Start":"01:40.535 ","End":"01:44.075","Text":"Before we move on, we are actually going to have to subtract the"},{"Start":"01:44.075 ","End":"01:48.750","Text":"128 from 237 to see how much we\u0027ve got left."},{"Start":"01:48.750 ","End":"01:50.430","Text":"I\u0027m going to write it at the side here,"},{"Start":"01:50.430 ","End":"01:53.315","Text":"so 237 is what we started with,"},{"Start":"01:53.315 ","End":"01:59.080","Text":"take off 128 and we are given 109."},{"Start":"01:59.080 ","End":"02:02.505","Text":"109 is what remains to be made up."},{"Start":"02:02.505 ","End":"02:04.490","Text":"I then carry on as before,"},{"Start":"02:04.490 ","End":"02:06.560","Text":"I look at the number I\u0027ve got to make up,"},{"Start":"02:06.560 ","End":"02:09.860","Text":"which is 109. Do I need the 64?"},{"Start":"02:09.860 ","End":"02:12.290","Text":"Yes, 109 is greater than 64,"},{"Start":"02:12.290 ","End":"02:13.925","Text":"so I need that column."},{"Start":"02:13.925 ","End":"02:16.160","Text":"Then I do the same step again,"},{"Start":"02:16.160 ","End":"02:21.740","Text":"remove the 64 from the 109 and that would give me 45."},{"Start":"02:21.740 ","End":"02:22.970","Text":"Ask the question again."},{"Start":"02:22.970 ","End":"02:24.050","Text":"Do I need this column?"},{"Start":"02:24.050 ","End":"02:26.269","Text":"Is 45 greater than 32?"},{"Start":"02:26.269 ","End":"02:29.225","Text":"Yes, it is. So I need it as well."},{"Start":"02:29.225 ","End":"02:32.390","Text":"Subtract the 32 from 45,"},{"Start":"02:32.390 ","End":"02:34.705","Text":"which gives me 13."},{"Start":"02:34.705 ","End":"02:37.053","Text":"I\u0027m moving on to the next column."},{"Start":"02:37.053 ","End":"02:38.850","Text":"Do I need the 16 column?"},{"Start":"02:38.850 ","End":"02:44.235","Text":"No, in this case I don\u0027t because 13 is less than 16, not greater."},{"Start":"02:44.235 ","End":"02:47.870","Text":"I put a 0 here. Moving on."},{"Start":"02:47.870 ","End":"02:50.285","Text":"Do I need the next column, 8?"},{"Start":"02:50.285 ","End":"02:52.310","Text":"Yes, because 13 is greater than 8,"},{"Start":"02:52.310 ","End":"02:53.780","Text":"so I need that."},{"Start":"02:53.780 ","End":"02:58.840","Text":"Subtract the 8 from 13, given me 5."},{"Start":"02:58.840 ","End":"03:00.530","Text":"Move on to the next column."},{"Start":"03:00.530 ","End":"03:02.480","Text":"Do I need the 4?"},{"Start":"03:02.480 ","End":"03:04.915","Text":"Yes, indeed, I need the 4."},{"Start":"03:04.915 ","End":"03:07.545","Text":"Take away 4 from 5,"},{"Start":"03:07.545 ","End":"03:09.915","Text":"I have now only got 1 left to make up."},{"Start":"03:09.915 ","End":"03:14.660","Text":"So it\u0027s going to be 0 in this column because 2 is greater than 1."},{"Start":"03:14.660 ","End":"03:18.390","Text":"Although 1 is not greater than 1,"},{"Start":"03:18.390 ","End":"03:20.130","Text":"it is equal to 1,"},{"Start":"03:20.130 ","End":"03:21.765","Text":"so I do need it."},{"Start":"03:21.765 ","End":"03:24.635","Text":"The final value there is going to be 1."},{"Start":"03:24.635 ","End":"03:26.810","Text":"If I go backwards through this and just do"},{"Start":"03:26.810 ","End":"03:30.635","Text":"a little quick check to see whether I\u0027ve done the right operations."},{"Start":"03:30.635 ","End":"03:39.665","Text":"128 plus 64 will give me 192 plus 32 will give me 224,"},{"Start":"03:39.665 ","End":"03:43.880","Text":"plus 8 would give me 232,"},{"Start":"03:43.880 ","End":"03:47.090","Text":"236, 237,"},{"Start":"03:47.090 ","End":"03:50.195","Text":"which is what I was originally asked to convert."},{"Start":"03:50.195 ","End":"03:53.290","Text":"That looks like I\u0027ve done the job."},{"Start":"03:53.290 ","End":"04:00.450","Text":"Here is the binary conversion of 237 decimal."}],"ID":30076},{"Watched":false,"Name":"Exercise 2 part B","Duration":"3m 9s","ChapterTopicVideoID":25442,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.910","Text":"Let\u0027s now look at part B."},{"Start":"00:02.910 ","End":"00:05.550","Text":"We\u0027re going to use exactly the same method as before."},{"Start":"00:05.550 ","End":"00:08.865","Text":"The first thing to do is determine how many columns we need."},{"Start":"00:08.865 ","End":"00:11.280","Text":"Starting on the right-hand side,"},{"Start":"00:11.280 ","End":"00:13.530","Text":"we write the column values."},{"Start":"00:13.530 ","End":"00:17.340","Text":"Now, we realize that if we went any further,"},{"Start":"00:17.340 ","End":"00:20.040","Text":"we\u0027d have 512 and that\u0027s bigger than 359,"},{"Start":"00:20.040 ","End":"00:22.905","Text":"so we don\u0027t actually need to proceed any further."},{"Start":"00:22.905 ","End":"00:25.170","Text":"We\u0027ve got as many columns as we need."},{"Start":"00:25.170 ","End":"00:30.915","Text":"There\u0027s now 9 bits rather than 8-bits tree had in the previous part A."},{"Start":"00:30.915 ","End":"00:36.600","Text":"Now we\u0027re going to proceed just as we did before to ask ourselves the question,"},{"Start":"00:36.600 ","End":"00:39.105","Text":"do we need the column or do we not need the column?"},{"Start":"00:39.105 ","End":"00:41.025","Text":"The first column here,"},{"Start":"00:41.025 ","End":"00:44.330","Text":"359 is indeed bigger than 256,"},{"Start":"00:44.330 ","End":"00:45.980","Text":"so I do need that column,"},{"Start":"00:45.980 ","End":"00:51.120","Text":"but then I need to take away from 359,"},{"Start":"00:51.120 ","End":"00:55.785","Text":"256 and that will give me 103."},{"Start":"00:55.785 ","End":"01:01.225","Text":"I have 103 remaining to make up from the other columns."},{"Start":"01:01.225 ","End":"01:05.275","Text":"So 103 is not greater than 128,"},{"Start":"01:05.275 ","End":"01:07.370","Text":"so I do not need that column."},{"Start":"01:07.370 ","End":"01:10.130","Text":"However, it is bigger than 64."},{"Start":"01:10.130 ","End":"01:11.855","Text":"I do need that column."},{"Start":"01:11.855 ","End":"01:14.935","Text":"Now, I need to remove 64 from 103,"},{"Start":"01:14.935 ","End":"01:17.500","Text":"which gives me 39."},{"Start":"01:17.500 ","End":"01:21.245","Text":"Carrying on, 39 is bigger than 32,"},{"Start":"01:21.245 ","End":"01:23.240","Text":"so I will need that column."},{"Start":"01:23.240 ","End":"01:25.970","Text":"If I remove the 32 from 39,"},{"Start":"01:25.970 ","End":"01:28.780","Text":"I\u0027ve only got 7 left to make up."},{"Start":"01:28.780 ","End":"01:34.035","Text":"I won\u0027t need the 6 column because 7 is not greater than 6,"},{"Start":"01:34.035 ","End":"01:36.370","Text":"not 6, 16."},{"Start":"01:36.370 ","End":"01:39.905","Text":"I won\u0027t need the 8 column either."},{"Start":"01:39.905 ","End":"01:42.370","Text":"However, I will need the 4."},{"Start":"01:42.370 ","End":"01:44.715","Text":"I\u0027ve got 3 left to make up."},{"Start":"01:44.715 ","End":"01:46.845","Text":"I will need the 2."},{"Start":"01:46.845 ","End":"01:49.070","Text":"Only 1 left to make up now,"},{"Start":"01:49.070 ","End":"01:50.720","Text":"and I will need the 1."},{"Start":"01:50.720 ","End":"01:55.670","Text":"I\u0027m now done. I\u0027ve got nothing else to include."},{"Start":"01:55.670 ","End":"01:58.790","Text":"Let\u0027s just do a quick check to see whether that\u0027s right."},{"Start":"01:58.790 ","End":"02:03.330","Text":"You\u0027ve got 256 plus 264,"},{"Start":"02:03.330 ","End":"02:07.650","Text":"it gives us 320 plus 32,"},{"Start":"02:07.650 ","End":"02:17.670","Text":"will gives us 352"},{"Start":"02:17.670 ","End":"02:24.660","Text":"plus 4 would give us 356, 358, 359."},{"Start":"02:24.660 ","End":"02:30.685","Text":"We\u0027ve arrived at the binary conversion"},{"Start":"02:30.685 ","End":"02:36.070","Text":"from decimal and using a method which I call the greater than method,"},{"Start":"02:36.070 ","End":"02:37.300","Text":"so you\u0027re, each time,"},{"Start":"02:37.300 ","End":"02:45.055","Text":"inspecting whether the value you\u0027re looking for is greater than the column or not."},{"Start":"02:45.055 ","End":"02:46.675","Text":"If it is greater than the column,"},{"Start":"02:46.675 ","End":"02:48.284","Text":"you need to include a 1 there,"},{"Start":"02:48.284 ","End":"02:52.220","Text":"otherwise, you include a zero and you keep doing that,"},{"Start":"02:52.220 ","End":"02:56.075","Text":"reducing by any of the columns you\u0027ve already used"},{"Start":"02:56.075 ","End":"03:00.455","Text":"and you will eventually end up producing the binary number that you\u0027re looking for."},{"Start":"03:00.455 ","End":"03:02.465","Text":"Now there is another method of doing this,"},{"Start":"03:02.465 ","End":"03:05.420","Text":"and we\u0027ll look at that in the next video,"},{"Start":"03:05.420 ","End":"03:10.290","Text":"which looks at parts C and D of the exercise."}],"ID":30077},{"Watched":false,"Name":"Exercise 2 part C","Duration":"3m 34s","ChapterTopicVideoID":25443,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:03.060","Text":"Welcome back. In this next video,"},{"Start":"00:03.060 ","End":"00:06.420","Text":"we\u0027re going to continue with the conversions from decimal to binary,"},{"Start":"00:06.420 ","End":"00:09.045","Text":"but we\u0027re going to use a slightly different method."},{"Start":"00:09.045 ","End":"00:12.255","Text":"Actually, we\u0027ve got 2 larger numbers here as well."},{"Start":"00:12.255 ","End":"00:14.805","Text":"Let\u0027s see how this method works."},{"Start":"00:14.805 ","End":"00:18.795","Text":"Essentially, this method involves dividing by 2."},{"Start":"00:18.795 ","End":"00:22.110","Text":"You repeatedly do that recording the remainder when"},{"Start":"00:22.110 ","End":"00:25.140","Text":"you divide by 2 with an integer division."},{"Start":"00:25.140 ","End":"00:26.640","Text":"With an integer division,"},{"Start":"00:26.640 ","End":"00:29.880","Text":"you cannot have fractional parts."},{"Start":"00:29.880 ","End":"00:34.485","Text":"For example, if we divide 1856 by 2,"},{"Start":"00:34.485 ","End":"00:37.815","Text":"we would actually get 928.5,"},{"Start":"00:37.815 ","End":"00:42.090","Text":"but we discard the half and record it as a remainder of 1."},{"Start":"00:42.090 ","End":"00:45.575","Text":"Let\u0027s go ahead and see how this process works."},{"Start":"00:45.575 ","End":"00:47.090","Text":"I\u0027ll start, as I said,"},{"Start":"00:47.090 ","End":"00:52.100","Text":"by dividing 1857 by 2,"},{"Start":"00:52.100 ","End":"00:56.585","Text":"and that will give us 928 with a remainder of 1."},{"Start":"00:56.585 ","End":"00:59.485","Text":"1928 divided by 2,"},{"Start":"00:59.485 ","End":"01:06.018","Text":"will give us 464 with a remainder of 0."},{"Start":"01:06.018 ","End":"01:12.558","Text":"464 divided by 2 would give us 232 with a remainder of 0."},{"Start":"01:12.558 ","End":"01:19.255","Text":"232 divided by 2 would give us 116 with a remainder of 0."},{"Start":"01:19.255 ","End":"01:23.140","Text":"116 divided by 2 is 58,"},{"Start":"01:23.140 ","End":"01:25.175","Text":"with a remainder of 0."},{"Start":"01:25.175 ","End":"01:30.410","Text":"58 divided by 2 is 29, with a remainder of 0."},{"Start":"01:30.410 ","End":"01:32.300","Text":"Now we\u0027ve got an odd number,"},{"Start":"01:32.300 ","End":"01:34.295","Text":"so we\u0027re going to have a remainder,"},{"Start":"01:34.295 ","End":"01:36.980","Text":"29 divided by 2 would be 14,"},{"Start":"01:36.980 ","End":"01:38.695","Text":"with a remainder of 1."},{"Start":"01:38.695 ","End":"01:43.490","Text":"14 divided by 2 would give us 7 and remainder of 0."},{"Start":"01:43.490 ","End":"01:45.695","Text":"7, again, is an odd number."},{"Start":"01:45.695 ","End":"01:47.885","Text":"We divide that by 2,"},{"Start":"01:47.885 ","End":"01:51.740","Text":"and we would get 3 and a remainder of 1."},{"Start":"01:51.740 ","End":"01:57.510","Text":"We divide 3 by 2 we get 1 with a remainder of 1,"},{"Start":"01:57.510 ","End":"01:59.700","Text":"and if we divide 1 by 2,"},{"Start":"01:59.700 ","End":"02:03.015","Text":"we get 0 with a remainder of 1."},{"Start":"02:03.015 ","End":"02:05.910","Text":"We\u0027ve now completed the conversion."},{"Start":"02:05.910 ","End":"02:10.430","Text":"The simple, almost magical trick you\u0027re"},{"Start":"02:10.430 ","End":"02:14.765","Text":"using here is to read-out the remainders in reverse order."},{"Start":"02:14.765 ","End":"02:16.340","Text":"That actually gives you"},{"Start":"02:16.340 ","End":"02:23.060","Text":"the binary conversion of the original number we started with. Let\u0027s do that."},{"Start":"02:23.060 ","End":"02:24.440","Text":"We have"},{"Start":"02:24.440 ","End":"02:32.415","Text":"111 0100"},{"Start":"02:32.415 ","End":"02:37.380","Text":"0001."},{"Start":"02:37.380 ","End":"02:42.819","Text":"If we were to convert this back into decimal,"},{"Start":"02:42.819 ","End":"02:46.345","Text":"just to check whether we\u0027ve done this right."},{"Start":"02:46.345 ","End":"02:49.045","Text":"We just write the column values on top."},{"Start":"02:49.045 ","End":"02:53.170","Text":"What we have is 1024 plus"},{"Start":"02:53.170 ","End":"03:00.885","Text":"512 plus 256 plus 64 plus 1,"},{"Start":"03:00.885 ","End":"03:07.695","Text":"which gives us, do that in pairs 1536 plus"},{"Start":"03:07.695 ","End":"03:17.080","Text":"320 would be 1856 plus 1 would indeed be 1857."},{"Start":"03:17.080 ","End":"03:25.730","Text":"We have managed to convert the original decimal value into its binary representation."},{"Start":"03:25.730 ","End":"03:32.460","Text":"The final answer here is 111 0100 0001."}],"ID":30078},{"Watched":false,"Name":"Exercise 2 part D","Duration":"3m 43s","ChapterTopicVideoID":25444,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:06.840","Text":"Well, now do part d in exactly the same manner as we did part c. We start with"},{"Start":"00:06.840 ","End":"00:09.810","Text":"a number that we\u0027re looking to convert and we have"},{"Start":"00:09.810 ","End":"00:14.040","Text":"it each time recording whether there\u0027s a remainder or not."},{"Start":"00:14.040 ","End":"00:16.755","Text":"Let\u0027s start with the first division,"},{"Start":"00:16.755 ","End":"00:22.995","Text":"give us 22050 with a remainder of 0."},{"Start":"00:22.995 ","End":"00:31.725","Text":"Dividing that in half would give us 11025 with a remainder of 0."},{"Start":"00:31.725 ","End":"00:37.010","Text":"Having that would give us 5512,"},{"Start":"00:37.010 ","End":"00:38.770","Text":"but we\u0027d have a remainder now,"},{"Start":"00:38.770 ","End":"00:42.755","Text":"of 1 given that 11025 is an odd number."},{"Start":"00:42.755 ","End":"00:47.615","Text":"Take 5512 and halve it would give us"},{"Start":"00:47.615 ","End":"00:54.080","Text":"2756 with a remainder of 0."},{"Start":"00:54.080 ","End":"00:59.585","Text":"2756 halved, would give us 1378,"},{"Start":"00:59.585 ","End":"01:02.320","Text":"with a remainder of 0."},{"Start":"01:02.320 ","End":"01:06.560","Text":"1378 halved, would give us 689,"},{"Start":"01:06.560 ","End":"01:09.345","Text":"with a remainder of 0."},{"Start":"01:09.345 ","End":"01:10.940","Text":"We now have an odd number here,"},{"Start":"01:10.940 ","End":"01:13.415","Text":"so we\u0027re going to expect a remainder."},{"Start":"01:13.415 ","End":"01:17.615","Text":"689 halved, the nearest number would be 344,"},{"Start":"01:17.615 ","End":"01:20.306","Text":"with a remainder of 1."},{"Start":"01:20.306 ","End":"01:25.988","Text":"344 halved, would give us 172 with a remainder of 0."},{"Start":"01:25.988 ","End":"01:30.485","Text":"172 halved would give us 86,"},{"Start":"01:30.485 ","End":"01:32.120","Text":"with a remainder of 0."},{"Start":"01:32.120 ","End":"01:38.585","Text":"86 halved, would give us 43 and the remainder of 0."},{"Start":"01:38.585 ","End":"01:40.100","Text":"43, clearly,"},{"Start":"01:40.100 ","End":"01:47.810","Text":"is an odd number so halving that would give us 21 with a remainder of 1."},{"Start":"01:47.810 ","End":"01:49.550","Text":"21 is, again,"},{"Start":"01:49.550 ","End":"01:58.560","Text":"an odd number and that would give us 10 with a remainder of 1."},{"Start":"01:58.560 ","End":"02:02.640","Text":"10 halved would give us 5 with a remainder of 0."},{"Start":"02:02.640 ","End":"02:06.890","Text":"5 halved would give us 2 with a remainder of 1."},{"Start":"02:06.890 ","End":"02:11.790","Text":"2 divided by 2 would give us 1 with a remainder of 0."},{"Start":"02:11.790 ","End":"02:13.290","Text":"We\u0027ve got 1 left,"},{"Start":"02:13.290 ","End":"02:17.275","Text":"1 divided by 2 gives us 0 with a remainder of 1."},{"Start":"02:17.275 ","End":"02:23.460","Text":"We\u0027ve now got all of our binary digits reading them from the bottom as before."},{"Start":"02:23.460 ","End":"02:28.435","Text":"It might be helpful here to group them into 4 bits at a time,"},{"Start":"02:28.435 ","End":"02:32.015","Text":"just so that we don\u0027t make any mistakes and shift the column."},{"Start":"02:32.015 ","End":"02:36.660","Text":"Let\u0027s just mark off every 4 bits here."},{"Start":"02:36.660 ","End":"02:40.690","Text":"Our final answer then is"},{"Start":"02:49.040 ","End":"02:54.790","Text":"1,0,1,0,1,1,0,0,0,1,0,0,0,1,0,0, again. If we wanted to check this, again,"},{"Start":"02:54.790 ","End":"02:57.790","Text":"we could use the method that we already know,"},{"Start":"02:57.790 ","End":"03:03.250","Text":"which is to include the column values above each binary digit."},{"Start":"03:03.250 ","End":"03:13.440","Text":"Our final answer is in this column 8192 from these 2 columns."},{"Start":"03:13.440 ","End":"03:15.580","Text":"If we were to add all those up,"},{"Start":"03:15.580 ","End":"03:20.800","Text":"we would indeed obtain 44100."},{"Start":"03:20.800 ","End":"03:26.510","Text":"Once again, we have managed to do the decimal"},{"Start":"03:26.510 ","End":"03:32.095","Text":"to binary conversion and our final answer is here."},{"Start":"03:32.095 ","End":"03:35.540","Text":"That\u0027s decimal to binary conversions using"},{"Start":"03:35.540 ","End":"03:39.020","Text":"2 different methods and we will move on to"},{"Start":"03:39.020 ","End":"03:43.830","Text":"another number base in the next video. See you then."}],"ID":30079},{"Watched":false,"Name":"Exercise 3 parts A-B","Duration":"9m 52s","ChapterTopicVideoID":25445,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.250","Text":"Hello everybody. In this question,"},{"Start":"00:02.250 ","End":"00:04.680","Text":"we\u0027ve been asked to convert numbers from"},{"Start":"00:04.680 ","End":"00:08.624","Text":"a hexadecimal representation this time into binary."},{"Start":"00:08.624 ","End":"00:10.755","Text":"Let\u0027s start with part a."},{"Start":"00:10.755 ","End":"00:15.570","Text":"We\u0027ve been asked to convert the number 42 in hexadecimal to binary."},{"Start":"00:15.570 ","End":"00:18.240","Text":"It\u0027s actually a very straightforward process."},{"Start":"00:18.240 ","End":"00:23.715","Text":"The whole purpose of hexadecimal is to take 4 bits at a time."},{"Start":"00:23.715 ","End":"00:28.935","Text":"Those 4 bits can be represented by a single character in hexadecimal."},{"Start":"00:28.935 ","End":"00:34.920","Text":"What we will do is go ahead and write the number first of all, which is 42."},{"Start":"00:34.920 ","End":"00:37.055","Text":"Then what we\u0027re going to do is we\u0027re going to take"},{"Start":"00:37.055 ","End":"00:41.000","Text":"each individual hexadecimal digit and break it out into binary."},{"Start":"00:41.000 ","End":"00:43.310","Text":"What I\u0027m going to do is I\u0027m going to write out"},{"Start":"00:43.310 ","End":"00:47.532","Text":"the column values for each 1 of those digits, 8, 4, 2,"},{"Start":"00:47.532 ","End":"00:51.080","Text":"and 1 and start again 8,4,2,1,"},{"Start":"00:51.080 ","End":"00:55.770","Text":"because each of these digits is to be represented by a 4-bit pattern."},{"Start":"00:55.770 ","End":"00:58.190","Text":"The overall number therefore,"},{"Start":"00:58.190 ","End":"01:00.350","Text":"is the combination of these 2,"},{"Start":"01:00.350 ","End":"01:04.740","Text":"4-bit values. This is really straightforward."},{"Start":"01:04.740 ","End":"01:08.120","Text":"This question, 4 represented in binary,"},{"Start":"01:08.120 ","End":"01:10.415","Text":"if we look at this individual nibble here,"},{"Start":"01:10.415 ","End":"01:14.060","Text":"is going to be 0,1,0,0,"},{"Start":"01:14.060 ","End":"01:16.925","Text":"because we need the 4 and nothing else."},{"Start":"01:16.925 ","End":"01:20.555","Text":"Similarly to represent the 2 in binary,"},{"Start":"01:20.555 ","End":"01:22.285","Text":"we just need the 2,"},{"Start":"01:22.285 ","End":"01:25.050","Text":"everything else is going to be a 0,"},{"Start":"01:25.050 ","End":"01:26.585","Text":"so we\u0027ve done it."},{"Start":"01:26.585 ","End":"01:29.360","Text":"That\u0027s as simple as that."},{"Start":"01:29.360 ","End":"01:34.715","Text":"We\u0027ve got 42 hexadecimal into a binary bit pattern."},{"Start":"01:34.715 ","End":"01:39.505","Text":"Now, you might want to check that you\u0027ve got the correct answer."},{"Start":"01:39.505 ","End":"01:43.385","Text":"The way we would check this is to convert into"},{"Start":"01:43.385 ","End":"01:46.640","Text":"decimal both the hexadecimal"},{"Start":"01:46.640 ","End":"01:49.730","Text":"number and the binary number and see if you get the same number."},{"Start":"01:49.730 ","End":"01:53.840","Text":"What we need to do to convert it into decimal"},{"Start":"01:53.840 ","End":"01:59.360","Text":"is the way hexadecimal works is this first digit is the units column."},{"Start":"01:59.360 ","End":"02:03.340","Text":"The next column over is worth 16 times the previous column,"},{"Start":"02:03.340 ","End":"02:04.670","Text":"and we continue on that."},{"Start":"02:04.670 ","End":"02:08.015","Text":"Then in that manner for however many columns we have."},{"Start":"02:08.015 ","End":"02:09.650","Text":"Obviously, we\u0027ve only got 2 columns here."},{"Start":"02:09.650 ","End":"02:11.660","Text":"But if we did have another digit here,"},{"Start":"02:11.660 ","End":"02:14.135","Text":"that would be worth 16 times 16,"},{"Start":"02:14.135 ","End":"02:15.920","Text":"which is to 256."},{"Start":"02:15.920 ","End":"02:18.470","Text":"But as I said, we\u0027ve only got 2 digits here,"},{"Start":"02:18.470 ","End":"02:21.110","Text":"so what we need to do now is to multiply out"},{"Start":"02:21.110 ","End":"02:24.170","Text":"these columns and we\u0027ll have the value in decimal."},{"Start":"02:24.170 ","End":"02:29.150","Text":"It turns out to be 16 times 4 plus 1 times 2."},{"Start":"02:29.150 ","End":"02:32.300","Text":"I\u0027ll just write that as 2."},{"Start":"02:32.300 ","End":"02:40.505","Text":"What that will give us 16 times 4 is 64 plus 2 is 66."},{"Start":"02:40.505 ","End":"02:47.525","Text":"This number that we started with as a decimal number is actually 66."},{"Start":"02:47.525 ","End":"02:49.940","Text":"Now, if we go back to our binary bit pattern,"},{"Start":"02:49.940 ","End":"02:54.515","Text":"these bits here are actually not really 1, 2, 4 and 8."},{"Start":"02:54.515 ","End":"02:58.550","Text":"If we consider the whole byte together, the 2 nibbles."},{"Start":"02:58.550 ","End":"03:02.630","Text":"Really what we\u0027re looking at here is these digits are"},{"Start":"03:02.630 ","End":"03:07.220","Text":"16 times what they say in blue here."},{"Start":"03:07.220 ","End":"03:09.635","Text":"It\u0027s not really 1 here."},{"Start":"03:09.635 ","End":"03:11.600","Text":"We\u0027re talking about 16."},{"Start":"03:11.600 ","End":"03:12.830","Text":"I want to write it above in"},{"Start":"03:12.830 ","End":"03:16.640","Text":"a different color so that we can see that this is actually 16,"},{"Start":"03:16.640 ","End":"03:19.145","Text":"1 over is 32,"},{"Start":"03:19.145 ","End":"03:20.732","Text":"the next 1,"},{"Start":"03:20.732 ","End":"03:23.690","Text":"64, and then next one\u0027s 128."},{"Start":"03:23.690 ","End":"03:25.550","Text":"When we read this number here,"},{"Start":"03:25.550 ","End":"03:29.650","Text":"0,1,0,0, It\u0027s not really 8,4,2,1,"},{"Start":"03:29.650 ","End":"03:31.470","Text":"It\u0027s 128, 64,"},{"Start":"03:31.470 ","End":"03:32.730","Text":"32 and 16,"},{"Start":"03:32.730 ","End":"03:36.605","Text":"and the only 1 that\u0027s got a 1 here is actually 64."},{"Start":"03:36.605 ","End":"03:41.945","Text":"We\u0027ll include that in our crosscheck as part of the answer 64."},{"Start":"03:41.945 ","End":"03:44.685","Text":"Then we\u0027ve got nothing here,"},{"Start":"03:44.685 ","End":"03:46.485","Text":"nothing here, but we do have a 2."},{"Start":"03:46.485 ","End":"03:52.183","Text":"We need to add 2 and 64 plus 2 is 66,"},{"Start":"03:52.183 ","End":"03:54.785","Text":"as we saw across here."},{"Start":"03:54.785 ","End":"03:58.010","Text":"We\u0027re confident that we\u0027ve done the current version correctly."},{"Start":"03:58.010 ","End":"04:04.685","Text":"This binary bit pattern is representing the number 4 to in hexadecimal,"},{"Start":"04:04.685 ","End":"04:07.700","Text":"which turns out to be 66 in decimal."},{"Start":"04:07.700 ","End":"04:11.930","Text":"We\u0027ve converted both the binary to decimal and got 66."},{"Start":"04:11.930 ","End":"04:17.300","Text":"We converted the hexadecimal directly to decimal by multiplying"},{"Start":"04:17.300 ","End":"04:21.170","Text":"the first hexadecimal digit by 16 and adding"},{"Start":"04:21.170 ","End":"04:25.790","Text":"on the second hexadecimal digit, we again got 66."},{"Start":"04:25.790 ","End":"04:29.050","Text":"We\u0027re confident that we\u0027ve got the right answer for this part."},{"Start":"04:29.050 ","End":"04:30.390","Text":"For the second part,"},{"Start":"04:30.390 ","End":"04:32.970","Text":"the question, we have a different number, D9."},{"Start":"04:32.970 ","End":"04:34.655","Text":"We\u0027re going to do exactly as we did before."},{"Start":"04:34.655 ","End":"04:38.365","Text":"Let\u0027s write it down, D9."},{"Start":"04:38.365 ","End":"04:43.145","Text":"I\u0027m giving myself some space there so I can write all a bit values out for binary."},{"Start":"04:43.145 ","End":"04:48.650","Text":"Once again, if I wanted to do the conversion afterwards into decimal,"},{"Start":"04:48.650 ","End":"04:54.635","Text":"I\u0027m just going to label for myself the value of each of these hexadecimal digits."},{"Start":"04:54.635 ","End":"04:59.360","Text":"Now there\u0027s a little technique I would recommend that you use for"},{"Start":"04:59.360 ","End":"05:03.920","Text":"hexadecimal numbers just to make sure you don\u0027t make any silly errors."},{"Start":"05:03.920 ","End":"05:06.710","Text":"That is to write out at the side of your paper"},{"Start":"05:06.710 ","End":"05:09.770","Text":"just a little aide memoir so that"},{"Start":"05:09.770 ","End":"05:15.170","Text":"you see what the decimal equivalent is of a hexadecimal digit."},{"Start":"05:15.170 ","End":"05:23.120","Text":"You should know hexadecimal digits are exactly the same as decimal digits from 1-9,"},{"Start":"05:23.120 ","End":"05:26.780","Text":"so there\u0027s no conversion to do,"},{"Start":"05:26.780 ","End":"05:30.830","Text":"there\u0027s enough confusion really when we\u0027re dealing with numbers from 1-9."},{"Start":"05:30.830 ","End":"05:33.440","Text":"Where the issues might come in is,"},{"Start":"05:33.440 ","End":"05:37.670","Text":"the numbers from 10 upwards up to 15 are"},{"Start":"05:37.670 ","End":"05:42.260","Text":"not what we would expect to see a number as because they\u0027re letters,"},{"Start":"05:42.260 ","End":"05:48.860","Text":"the numbers 10-15 are the letters A to F. It"},{"Start":"05:48.860 ","End":"05:51.860","Text":"does help to have them written down at the side of your paper"},{"Start":"05:51.860 ","End":"05:55.880","Text":"so you can very quickly glance across and see what the equivalent values are."},{"Start":"05:55.880 ","End":"05:58.175","Text":"If you see a C,"},{"Start":"05:58.175 ","End":"05:59.570","Text":"you know that it\u0027s worth 12."},{"Start":"05:59.570 ","End":"06:00.605","Text":"If you see an F,"},{"Start":"06:00.605 ","End":"06:02.090","Text":"you know its 15,"},{"Start":"06:02.090 ","End":"06:03.770","Text":"with lots and lots of experience,"},{"Start":"06:03.770 ","End":"06:05.060","Text":"you\u0027ll just remember these numbers,"},{"Start":"06:05.060 ","End":"06:10.700","Text":"but even then actually it\u0027s quite easy to mistake the decimal value for C and D,"},{"Start":"06:10.700 ","End":"06:15.260","Text":"say at the extremes where we\u0027ve got F and A they\u0027re very easy to remember,"},{"Start":"06:15.260 ","End":"06:20.530","Text":"and really the only 1 you do need to remember is this one here, 10 is A,"},{"Start":"06:20.530 ","End":"06:23.390","Text":"because all the others fall in sequence afterwards,"},{"Start":"06:23.390 ","End":"06:24.905","Text":"we know the numbers after 10,"},{"Start":"06:24.905 ","End":"06:27.410","Text":"are 11,12,13,14 and 15."},{"Start":"06:27.410 ","End":"06:31.230","Text":"We also know that any letters after A,"},{"Start":"06:31.230 ","End":"06:33.030","Text":"B, are C, D, E,"},{"Start":"06:33.030 ","End":"06:37.520","Text":"and F. That\u0027s why the symbols were chosen for hexadecimal,"},{"Start":"06:37.520 ","End":"06:41.120","Text":"they\u0027re are pattern that follows in sequence that everyone remembers."},{"Start":"06:41.120 ","End":"06:43.655","Text":"That was just a little aide memoir there."},{"Start":"06:43.655 ","End":"06:47.785","Text":"What we\u0027re going to do now is we\u0027re going to actually do the conversion into binary."},{"Start":"06:47.785 ","End":"06:51.080","Text":"16, 16s column,"},{"Start":"06:51.080 ","End":"06:52.115","Text":"remember it\u0027s a nibble,"},{"Start":"06:52.115 ","End":"06:58.070","Text":"again that we start labeling as 8,4,2,1."},{"Start":"06:58.070 ","End":"07:01.235","Text":"We do the same for that lower nibble,"},{"Start":"07:01.235 ","End":"07:04.220","Text":"so D is 13."},{"Start":"07:04.220 ","End":"07:06.730","Text":"That\u0027s where our reminder here helps us."},{"Start":"07:06.730 ","End":"07:10.385","Text":"We want to make 13 out of these columns."},{"Start":"07:10.385 ","End":"07:13.235","Text":"That\u0027s going to be 12 plus 1."},{"Start":"07:13.235 ","End":"07:18.110","Text":"I need 8 and 4 to make 12 and I need the 1."},{"Start":"07:18.110 ","End":"07:20.120","Text":"There\u0027s my upper nibble done."},{"Start":"07:20.120 ","End":"07:24.620","Text":"That is D in binary 1,1,0,1,"},{"Start":"07:24.620 ","End":"07:26.675","Text":"because that\u0027s 13,"},{"Start":"07:26.675 ","End":"07:29.030","Text":"and to make 9 in a similar way,"},{"Start":"07:29.030 ","End":"07:30.980","Text":"I need 8 and 1."},{"Start":"07:30.980 ","End":"07:34.655","Text":"I put 1 in that column and a 1 in that column."},{"Start":"07:34.655 ","End":"07:36.945","Text":"The others are zeros,"},{"Start":"07:36.945 ","End":"07:39.250","Text":"and I am done."},{"Start":"07:39.250 ","End":"07:43.895","Text":"That is the conversion to binary of D9,"},{"Start":"07:43.895 ","End":"07:45.440","Text":"this binary pattern here."},{"Start":"07:45.440 ","End":"07:49.085","Text":"Once again, if I want to check this, I can do."},{"Start":"07:49.085 ","End":"07:50.930","Text":"The way I would do that, first of all,"},{"Start":"07:50.930 ","End":"07:54.770","Text":"if we convert the binary into decimal,"},{"Start":"07:54.770 ","End":"07:59.195","Text":"and remember I need to make sure that these columns are not 1,2,4 and 8,"},{"Start":"07:59.195 ","End":"08:03.650","Text":"they were to represent this one single hexadecimal digit."},{"Start":"08:03.650 ","End":"08:08.675","Text":"But if I\u0027m considering this binary pattern here as 1 number,"},{"Start":"08:08.675 ","End":"08:12.035","Text":"then this one is not actually worth 1, it\u0027s worth 16."},{"Start":"08:12.035 ","End":"08:13.865","Text":"The 2 is 32,"},{"Start":"08:13.865 ","End":"08:15.855","Text":"the 4 is 64,"},{"Start":"08:15.855 ","End":"08:19.925","Text":"the 8 is 128 and it\u0027s just carrying on this sequence here, 1, 2, 4,"},{"Start":"08:19.925 ","End":"08:21.770","Text":"8,16, 32, 64,"},{"Start":"08:21.770 ","End":"08:25.490","Text":"128 doubling each time as we\u0027ve done previously."},{"Start":"08:25.490 ","End":"08:29.865","Text":"If I was to add up all these numbers here,"},{"Start":"08:29.865 ","End":"08:35.845","Text":"what I should find is I get 128 and 64,"},{"Start":"08:35.845 ","End":"08:38.710","Text":"skip the 32 because there\u0027s a 0 there,"},{"Start":"08:38.710 ","End":"08:43.730","Text":"16 and then I\u0027ve got 81 on the end there."},{"Start":"08:43.730 ","End":"08:46.115","Text":"If you add all that up,"},{"Start":"08:46.115 ","End":"08:50.680","Text":"you will get 217 in decimal."},{"Start":"08:50.680 ","End":"08:56.885","Text":"If we do the conversion from hexadecimal directly into decimal,"},{"Start":"08:56.885 ","End":"09:01.850","Text":"we know that what we need to do is we need to multiply by 16 D,"},{"Start":"09:01.850 ","End":"09:04.700","Text":"which again is 13 looking across here,"},{"Start":"09:04.700 ","End":"09:07.955","Text":"and then we need to add to that 9,"},{"Start":"09:07.955 ","End":"09:18.225","Text":"so16 times 13 is 160 plus 3 lots of 16, which is 208."},{"Start":"09:18.225 ","End":"09:24.550","Text":"Then we add to that 9 and we will get 217 again."},{"Start":"09:24.550 ","End":"09:30.020","Text":"Because these match up, we\u0027ve converted from hexadecimal directly to decimal."},{"Start":"09:30.020 ","End":"09:33.770","Text":"We\u0027ve converted from binary to decimal."},{"Start":"09:33.770 ","End":"09:37.760","Text":"We have now proved that this bit pattern is correct,"},{"Start":"09:37.760 ","End":"09:39.425","Text":"because we\u0027ve got the same number."},{"Start":"09:39.425 ","End":"09:45.545","Text":"That\u0027s this simple example done of converting numbers from hexadecimal to binary."},{"Start":"09:45.545 ","End":"09:47.419","Text":"In the next exercise,"},{"Start":"09:47.419 ","End":"09:53.140","Text":"we\u0027ll see some slightly longer hexadecimal numbers. I\u0027ll see you then."}],"ID":30080},{"Watched":false,"Name":"Exercise 3 parts C-D","Duration":"9m 44s","ChapterTopicVideoID":25446,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:04.680","Text":"Welcome back everyone. In this second part of the question,"},{"Start":"00:04.680 ","End":"00:09.015","Text":"we\u0027re going to convert slightly longer hexadecimal numbers to binary."},{"Start":"00:09.015 ","End":"00:12.885","Text":"The method is going to be exactly the same and the cross-check,"},{"Start":"00:12.885 ","End":"00:15.390","Text":"it\u0027s just going to be slightly more long-winded."},{"Start":"00:15.390 ","End":"00:19.320","Text":"Let\u0027s have a go at doing this and let\u0027s give ourselves plenty of space this time to"},{"Start":"00:19.320 ","End":"00:24.000","Text":"write out the individual hexadecimal digits."},{"Start":"00:24.000 ","End":"00:28.695","Text":"We\u0027ve got 1, F, and A, and as before,"},{"Start":"00:28.695 ","End":"00:34.180","Text":"we\u0027re going to treat each nibbles separately."},{"Start":"00:34.220 ","End":"00:38.010","Text":"Nibbles bits are worth 8, 4, 2,"},{"Start":"00:38.010 ","End":"00:40.695","Text":"and 1 for each individual nibble,"},{"Start":"00:40.695 ","End":"00:47.705","Text":"and we just need to work out which positions to include A1 and then put zeros elsewhere."},{"Start":"00:47.705 ","End":"00:52.295","Text":"For this first hexadecimal digit of 1, we don\u0027t need the 8,"},{"Start":"00:52.295 ","End":"00:54.745","Text":"the 4, the 2, we simply need the 1,"},{"Start":"00:54.745 ","End":"00:57.530","Text":"and therefore, we put zeros everywhere else."},{"Start":"00:57.530 ","End":"01:01.820","Text":"For F, we need to work out what F is first of all in decimal."},{"Start":"01:01.820 ","End":"01:04.760","Text":"Remember, last time what we did was we wrote down"},{"Start":"01:04.760 ","End":"01:10.460","Text":"a little cheat on the side to just remind us of what the digits were."},{"Start":"01:10.460 ","End":"01:15.050","Text":"If you write 10-15 down the side of the page,"},{"Start":"01:15.050 ","End":"01:17.615","Text":"and then next to each one of those,"},{"Start":"01:17.615 ","End":"01:21.140","Text":"just write down the hexadecimal symbol."},{"Start":"01:21.140 ","End":"01:24.395","Text":"That\u0027s the equivalent for that decimal number,"},{"Start":"01:24.395 ","End":"01:27.575","Text":"the letters A-F. As I said before,"},{"Start":"01:27.575 ","End":"01:32.925","Text":"all you really got to remember is 10 is A and the rest is following sequence."},{"Start":"01:32.925 ","End":"01:35.390","Text":"F, we see therefore it\u0027s 15."},{"Start":"01:35.390 ","End":"01:38.540","Text":"We\u0027ve got to make 15 up from these bit positions here,"},{"Start":"01:38.540 ","End":"01:41.690","Text":"and that\u0027s straightforward because it\u0027s all of the digits,"},{"Start":"01:41.690 ","End":"01:45.050","Text":"8 plus 4 plus 2 is 14, plus 1 is 15."},{"Start":"01:45.050 ","End":"01:47.615","Text":"We need a 1 everywhere."},{"Start":"01:47.615 ","End":"01:52.400","Text":"Then finally, for the final hexadecimal digits of A,"},{"Start":"01:52.400 ","End":"01:53.915","Text":"we need to make up 10,"},{"Start":"01:53.915 ","End":"01:56.180","Text":"10 is made from 8 and 2."},{"Start":"01:56.180 ","End":"02:00.195","Text":"We put ones there and zeros everywhere else,"},{"Start":"02:00.195 ","End":"02:04.550","Text":"and we have completed the conversion of"},{"Start":"02:04.550 ","End":"02:09.660","Text":"this hexadecimal number 1FA into its binary equivalent,"},{"Start":"02:09.660 ","End":"02:11.560","Text":"and that\u0027s the result."},{"Start":"02:11.560 ","End":"02:14.110","Text":"As before, we could do a cross-check here,"},{"Start":"02:14.110 ","End":"02:19.405","Text":"and this depends on whether you are allowed to have a calculator or not."},{"Start":"02:19.405 ","End":"02:23.500","Text":"Then what do you need to do is to consider that"},{"Start":"02:23.500 ","End":"02:28.840","Text":"these bits here for this lower nibble are going to remain exactly as they are."},{"Start":"02:28.840 ","End":"02:34.045","Text":"But actually, this next nibble on 1 over is not going to be 1 here."},{"Start":"02:34.045 ","End":"02:37.480","Text":"It\u0027s going to be the next in the sequence of powers of 2."},{"Start":"02:37.480 ","End":"02:39.350","Text":"It\u0027s going to be 16 there,"},{"Start":"02:39.350 ","End":"02:46.065","Text":"32 there, 64 there, and 128 there."},{"Start":"02:46.065 ","End":"02:50.510","Text":"There\u0027s the 64, there\u0027s the 16, here\u0027s the 32,"},{"Start":"02:50.510 ","End":"02:52.850","Text":"and there\u0027s the 128, and similarly,"},{"Start":"02:52.850 ","End":"02:56.360","Text":"we\u0027ll carry on the next is going to be 256."},{"Start":"02:56.360 ","End":"02:58.430","Text":"We don\u0027t need to go any further next."},{"Start":"02:58.430 ","End":"02:59.450","Text":"We\u0027ve got all zeros here,"},{"Start":"02:59.450 ","End":"03:00.770","Text":"but this would be 512,"},{"Start":"03:00.770 ","End":"03:03.920","Text":"1024, and 2048."},{"Start":"03:03.920 ","End":"03:05.810","Text":"To do our little cross-check,"},{"Start":"03:05.810 ","End":"03:10.010","Text":"then what we would need to do is to add anywhere where there is a 1."},{"Start":"03:10.010 ","End":"03:17.265","Text":"We\u0027ve got 256 and 128 and 64,"},{"Start":"03:17.265 ","End":"03:23.615","Text":"32, and 16 because the whole of that nibble there has got ones,"},{"Start":"03:23.615 ","End":"03:25.730","Text":"and then this low nibble here,"},{"Start":"03:25.730 ","End":"03:27.470","Text":"it\u0027s just the 8 and the 2."},{"Start":"03:27.470 ","End":"03:29.870","Text":"If we add all those together,"},{"Start":"03:29.870 ","End":"03:34.434","Text":"what we find is, we get 506."},{"Start":"03:34.434 ","End":"03:39.515","Text":"The decimal representation of this binary bit pattern,"},{"Start":"03:39.515 ","End":"03:41.825","Text":"and if we\u0027ve done it correctly,"},{"Start":"03:41.825 ","End":"03:46.865","Text":"this hexadecimal sequence is 506 in decimal."},{"Start":"03:46.865 ","End":"03:50.480","Text":"Once again, we can work out that directly from"},{"Start":"03:50.480 ","End":"03:54.890","Text":"the hexadecimal by considering that columns worth units."},{"Start":"03:54.890 ","End":"03:56.450","Text":"This is 16\u0027s,"},{"Start":"03:56.450 ","End":"03:58.895","Text":"and the next is 16 times 16,"},{"Start":"03:58.895 ","End":"04:02.660","Text":"which you didn\u0027t see in the previous examples. It\u0027s now 256."},{"Start":"04:02.660 ","End":"04:07.360","Text":"We should get if we did that conversion, 256,"},{"Start":"04:07.360 ","End":"04:09.480","Text":"because it\u0027s 1 lot of 256,"},{"Start":"04:09.480 ","End":"04:15.050","Text":"and 16 times 15 because F is 15."},{"Start":"04:15.050 ","End":"04:18.210","Text":"Let\u0027s put brackets around that just to make it clear."},{"Start":"04:18.210 ","End":"04:25.170","Text":"Then finally, we\u0027ve got 1 lot of 10,"},{"Start":"04:25.170 ","End":"04:27.160","Text":"because A is 10."},{"Start":"04:27.160 ","End":"04:32.075","Text":"That would give us 256"},{"Start":"04:32.075 ","End":"04:38.390","Text":"plus 16 times 15 is 240, and 10."},{"Start":"04:38.390 ","End":"04:40.400","Text":"If you add those out,"},{"Start":"04:40.400 ","End":"04:47.510","Text":"you get the same results we saw before, 506 in decimal."},{"Start":"04:47.510 ","End":"04:50.450","Text":"We know we\u0027ve done a conversion correctly,"},{"Start":"04:50.450 ","End":"04:52.220","Text":"and this bit pattern here,"},{"Start":"04:52.220 ","End":"04:54.980","Text":"0011, 1111,"},{"Start":"04:54.980 ","End":"05:00.455","Text":"1010, is the conversion of 1FA into binary."},{"Start":"05:00.455 ","End":"05:04.085","Text":"Continuing on with the next part, part D,"},{"Start":"05:04.085 ","End":"05:06.650","Text":"we\u0027ve got an even longer number,"},{"Start":"05:06.650 ","End":"05:10.625","Text":"so let\u0027s give ourselves even more spaces time to write these out."},{"Start":"05:10.625 ","End":"05:12.850","Text":"We\u0027ve got C, D,"},{"Start":"05:12.850 ","End":"05:16.685","Text":"D, and B."},{"Start":"05:16.685 ","End":"05:19.880","Text":"What we\u0027re looking at here is,"},{"Start":"05:19.880 ","End":"05:26.640","Text":"if I put the column values above each hexadecimal columns,"},{"Start":"05:26.640 ","End":"05:28.790","Text":"we\u0027ve got 256 here as before,"},{"Start":"05:28.790 ","End":"05:30.305","Text":"and this time over here,"},{"Start":"05:30.305 ","End":"05:35.405","Text":"we\u0027ve got 256 times 16, which is 4,096."},{"Start":"05:35.405 ","End":"05:38.570","Text":"But we\u0027ve actually just been asked to convert to binary."},{"Start":"05:38.570 ","End":"05:40.250","Text":"That\u0027s irrelevant in some ways."},{"Start":"05:40.250 ","End":"05:42.200","Text":"We\u0027re only going to use it for our cross-check."},{"Start":"05:42.200 ","End":"05:45.770","Text":"What we really are interested in is treating each one of"},{"Start":"05:45.770 ","End":"05:49.790","Text":"these as an independent nibble of 4-bits."},{"Start":"05:49.790 ","End":"05:55.145","Text":"We\u0027re going to write out the binary for each of those nibbles as we did before."},{"Start":"05:55.145 ","End":"05:56.525","Text":"Let\u0027s do that."},{"Start":"05:56.525 ","End":"05:58.620","Text":"To get C,"},{"Start":"05:58.620 ","End":"06:05.685","Text":"which is 12, we\u0027re going to need to add 8 and 4."},{"Start":"06:05.685 ","End":"06:07.875","Text":"Put ones there,"},{"Start":"06:07.875 ","End":"06:11.330","Text":"and the remaining parts of that nibble, we\u0027re going to be zeros."},{"Start":"06:11.330 ","End":"06:14.090","Text":"To get D, which is 13,"},{"Start":"06:14.090 ","End":"06:15.890","Text":"we\u0027ll need 12 plus 1."},{"Start":"06:15.890 ","End":"06:20.040","Text":"That\u0027s 12 and there\u0027s 1 there,"},{"Start":"06:20.040 ","End":"06:22.125","Text":"so it\u0027s just a 0 for the 2,"},{"Start":"06:22.125 ","End":"06:24.590","Text":"and obviously, the next symbol is a D as well."},{"Start":"06:24.590 ","End":"06:27.395","Text":"It\u0027s just a copy of the previous 1."},{"Start":"06:27.395 ","End":"06:30.380","Text":"Then finally B, which is 11,"},{"Start":"06:30.380 ","End":"06:33.975","Text":"and that\u0027s 8 and 2 and 1."},{"Start":"06:33.975 ","End":"06:36.245","Text":"Only the 4 has a 0,"},{"Start":"06:36.245 ","End":"06:39.870","Text":"everywhere else is a 1, and that\u0027s it."},{"Start":"06:39.870 ","End":"06:43.415","Text":"No more complex really then in all the other examples."},{"Start":"06:43.415 ","End":"06:46.565","Text":"The cross-check is going to be a lot more"},{"Start":"06:46.565 ","End":"06:51.260","Text":"long-winded and we can do exactly the same method as we had before,"},{"Start":"06:51.260 ","End":"06:55.280","Text":"but I can assure you that it all comes out correct in the end."},{"Start":"06:55.280 ","End":"07:00.605","Text":"But we would have to work that out if we didn\u0027t have a calculator by hand,"},{"Start":"07:00.605 ","End":"07:04.610","Text":"and it would be exactly the same here,"},{"Start":"07:04.610 ","End":"07:07.805","Text":"but we\u0027d obviously go much further in terms of the bit values."},{"Start":"07:07.805 ","End":"07:10.355","Text":"If I write those out for us,"},{"Start":"07:10.355 ","End":"07:13.340","Text":"here, we\u0027d still have 16."},{"Start":"07:13.340 ","End":"07:15.470","Text":"That would be 32,"},{"Start":"07:15.470 ","End":"07:17.740","Text":"64 over here,"},{"Start":"07:17.740 ","End":"07:24.200","Text":"128 here, 256 here, 512 there,"},{"Start":"07:24.200 ","End":"07:32.390","Text":"1,024 there, 2048 there, 4,096 there,"},{"Start":"07:32.390 ","End":"07:42.275","Text":"8,192 there, 16,384 there, and 32,768 there."},{"Start":"07:42.275 ","End":"07:47.600","Text":"What that will give us 32,768"},{"Start":"07:47.600 ","End":"07:54.290","Text":"plus 16,384 plus 2048,"},{"Start":"07:54.290 ","End":"07:58.005","Text":"1,024, 256,"},{"Start":"07:58.005 ","End":"08:03.330","Text":"128 and 64, and then 16."},{"Start":"08:03.330 ","End":"08:05.460","Text":"The remaining bits here,"},{"Start":"08:05.460 ","End":"08:06.990","Text":"which is 8 and 2 and 1,"},{"Start":"08:06.990 ","End":"08:09.045","Text":"which together will be 11."},{"Start":"08:09.045 ","End":"08:11.825","Text":"If we were to add all those together,"},{"Start":"08:11.825 ","End":"08:17.030","Text":"what we would get is 52,699."},{"Start":"08:17.030 ","End":"08:20.390","Text":"You\u0027re just going to have to trust me on that rather than us working it all out."},{"Start":"08:20.390 ","End":"08:25.685","Text":"That\u0027s the decimal conversion of this bit pattern here."},{"Start":"08:25.685 ","End":"08:30.770","Text":"If we were to multiply out these digits here,"},{"Start":"08:30.770 ","End":"08:37.875","Text":"you would have 4,096 times C, which is 12."},{"Start":"08:37.875 ","End":"08:45.600","Text":"Add onto that 256 times 13 because that\u0027s what D is,"},{"Start":"08:45.600 ","End":"08:50.960","Text":"and 16 times 13."},{"Start":"08:50.960 ","End":"08:52.685","Text":"Again, that\u0027s what D is."},{"Start":"08:52.685 ","End":"08:55.990","Text":"Then finally, we know the end is 11,"},{"Start":"08:55.990 ","End":"08:57.740","Text":"and again, trust me,"},{"Start":"08:57.740 ","End":"09:00.965","Text":"if we were to work all this out,"},{"Start":"09:00.965 ","End":"09:05.104","Text":"52,699 is what this would produce."},{"Start":"09:05.104 ","End":"09:07.850","Text":"That\u0027s the same as the figure over here."},{"Start":"09:07.850 ","End":"09:11.600","Text":"We have proven that our conversion went out correct."},{"Start":"09:11.600 ","End":"09:14.900","Text":"If you have access to a calculator on the exam,"},{"Start":"09:14.900 ","End":"09:16.655","Text":"this is all very straightforward."},{"Start":"09:16.655 ","End":"09:18.530","Text":"But if you don\u0027t,"},{"Start":"09:18.530 ","End":"09:22.610","Text":"then you can check your answer by using this method here,"},{"Start":"09:22.610 ","End":"09:25.070","Text":"which would be quite long-winded for a number this large,"},{"Start":"09:25.070 ","End":"09:26.650","Text":"but it can be done."},{"Start":"09:26.650 ","End":"09:31.490","Text":"We have once again converted from hexadecimal to binary,"},{"Start":"09:31.490 ","End":"09:33.110","Text":"much longer numbers this time,"},{"Start":"09:33.110 ","End":"09:35.315","Text":"but the process was exactly the same."},{"Start":"09:35.315 ","End":"09:38.060","Text":"We\u0027ve found a way to prove whether we\u0027ve got"},{"Start":"09:38.060 ","End":"09:41.060","Text":"the correct answer as well before we leave the exam."},{"Start":"09:41.060 ","End":"09:44.850","Text":"That\u0027s great. I\u0027ll see you in the next one."}],"ID":30081},{"Watched":false,"Name":"Exercise 4 parts A-B","Duration":"6m 37s","ChapterTopicVideoID":25437,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:01.980","Text":"Hello, welcome back everybody."},{"Start":"00:01.980 ","End":"00:08.055","Text":"In this exercise we\u0027ve been asked to convert a number from decimal to hexadecimal."},{"Start":"00:08.055 ","End":"00:12.720","Text":"We\u0027ve got 2 quite short numbers here, 240 and 251."},{"Start":"00:12.720 ","End":"00:15.600","Text":"Let\u0027s think about how we would do that."},{"Start":"00:15.600 ","End":"00:20.810","Text":"The first thing to do for small number I would suggest is to convert it to binary,"},{"Start":"00:20.810 ","End":"00:24.270","Text":"and it\u0027s good practice at this stage for us to just continue"},{"Start":"00:24.270 ","End":"00:29.010","Text":"on consolidating the things that we\u0027ve already covered in these exercises."},{"Start":"00:29.010 ","End":"00:31.250","Text":"This is quite helpful thing to do."},{"Start":"00:31.250 ","End":"00:34.790","Text":"Let\u0027s try and convert this then into binary first of all."},{"Start":"00:34.790 ","End":"00:40.659","Text":"In order to do that, we will write out the column values as we have done previously."},{"Start":"00:40.659 ","End":"00:46.040","Text":"We keep going until we don\u0027t need anymore digits."},{"Start":"00:46.040 ","End":"00:48.770","Text":"If I went to 1 more, that\u0027ll be 256."},{"Start":"00:48.770 ","End":"00:53.810","Text":"256 is bigger than 240 so I don\u0027t actually need to go that far."},{"Start":"00:53.810 ","End":"00:57.350","Text":"I can stop here, and now I just need to put ones"},{"Start":"00:57.350 ","End":"01:00.560","Text":"where I need the column and zeros where I don\u0027t need it."},{"Start":"01:00.560 ","End":"01:02.270","Text":"We\u0027ve done this many times before,"},{"Start":"01:02.270 ","End":"01:04.055","Text":"but I\u0027ll do it again."},{"Start":"01:04.055 ","End":"01:06.320","Text":"Look at the number 240."},{"Start":"01:06.320 ","End":"01:09.275","Text":"We do need the column for 128,"},{"Start":"01:09.275 ","End":"01:11.405","Text":"because 240 is bigger than 128."},{"Start":"01:11.405 ","End":"01:15.365","Text":"However, now we need to subtract the 128 off 240."},{"Start":"01:15.365 ","End":"01:17.990","Text":"Let\u0027s keep track of that up here."},{"Start":"01:17.990 ","End":"01:24.845","Text":"240 minus 128 would give us 112."},{"Start":"01:24.845 ","End":"01:29.000","Text":"I now need to decide if I need the 64 column,"},{"Start":"01:29.000 ","End":"01:32.330","Text":"which I do because 112 is bigger than 64."},{"Start":"01:32.330 ","End":"01:37.085","Text":"But again, subtract 64 off the 112,"},{"Start":"01:37.085 ","End":"01:43.130","Text":"and that would give me 48 and continue on."},{"Start":"01:43.130 ","End":"01:46.235","Text":"Do I need 32 column? Yes, I do."},{"Start":"01:46.235 ","End":"01:52.090","Text":"However, I\u0027ve got to subtract the 32 away from 48 now and I\u0027m left with 16."},{"Start":"01:52.090 ","End":"01:54.145","Text":"Do I need the 16 column?"},{"Start":"01:54.145 ","End":"01:56.560","Text":"Yes, I do. I include that."},{"Start":"01:56.560 ","End":"02:00.250","Text":"Now, however, I\u0027ve got nothing left to make up"},{"Start":"02:00.250 ","End":"02:04.645","Text":"because I\u0027ve accounted for the whole number with just these 4 bits."},{"Start":"02:04.645 ","End":"02:09.069","Text":"These remaining bits here are going to be 0."},{"Start":"02:09.069 ","End":"02:12.030","Text":"There we go. Now,"},{"Start":"02:12.030 ","End":"02:13.300","Text":"I\u0027ve got the number in binary."},{"Start":"02:13.300 ","End":"02:15.790","Text":"However, I was asked to convert it to hexadecimal,"},{"Start":"02:15.790 ","End":"02:19.120","Text":"but the reason I converted into binary first is it\u0027s"},{"Start":"02:19.120 ","End":"02:22.300","Text":"very straightforward converting from binary to"},{"Start":"02:22.300 ","End":"02:26.520","Text":"hexadecimal because we simply deal with 4 bits at a time and"},{"Start":"02:26.520 ","End":"02:31.800","Text":"nibble and we assign that 4-bits hexadecimal character,"},{"Start":"02:31.800 ","End":"02:33.875","Text":"and you\u0027ll remember before as well,"},{"Start":"02:33.875 ","End":"02:37.440","Text":"I said that it was worth writing at the side of your paper."},{"Start":"02:37.440 ","End":"02:41.940","Text":"The various digits from 10 upwards."},{"Start":"02:41.940 ","End":"02:44.535","Text":"If we do that, 10, 11,"},{"Start":"02:44.535 ","End":"02:49.425","Text":"12, 13, 14, 15."},{"Start":"02:49.425 ","End":"02:53.965","Text":"Next to them, just writing the hexadecimal characters,"},{"Start":"02:53.965 ","End":"02:56.525","Text":"A to F in sequence,"},{"Start":"02:56.525 ","End":"02:58.610","Text":"just so that we don\u0027t make a silly mistake."},{"Start":"02:58.610 ","End":"03:03.140","Text":"In this case, we can see that we need to make up these 4 ones."},{"Start":"03:03.140 ","End":"03:05.450","Text":"However, we don\u0027t look at them as 128,"},{"Start":"03:05.450 ","End":"03:07.460","Text":"64, 32, and 16."},{"Start":"03:07.460 ","End":"03:13.330","Text":"We renumber these because these are independent hexadecimal digits,"},{"Start":"03:13.330 ","End":"03:15.340","Text":"each of which is numbered 8,"},{"Start":"03:15.340 ","End":"03:17.290","Text":"4, 2, and 1."},{"Start":"03:17.290 ","End":"03:20.770","Text":"In order to represent this as a hexadecimal digits,"},{"Start":"03:20.770 ","End":"03:22.840","Text":"it\u0027s the 8 and the 4 and the 2 and the 1,"},{"Start":"03:22.840 ","End":"03:24.400","Text":"which would be 15,"},{"Start":"03:24.400 ","End":"03:28.345","Text":"and so 15, we know is F. Therefore,"},{"Start":"03:28.345 ","End":"03:32.439","Text":"that hexadecimal character should be F because that\u0027s 15."},{"Start":"03:32.439 ","End":"03:36.010","Text":"The lower 4 bits are going to be 0,"},{"Start":"03:36.010 ","End":"03:39.765","Text":"because 0 is 0 in hexadecimal, as well as decimal."},{"Start":"03:39.765 ","End":"03:43.050","Text":"We\u0027ve actually got our answer now,"},{"Start":"03:43.050 ","End":"03:48.735","Text":"so 240 in decimal is F0 in hexadecimal."},{"Start":"03:48.735 ","End":"03:50.685","Text":"Let\u0027s move on to the second part now."},{"Start":"03:50.685 ","End":"03:54.665","Text":"251, we\u0027re going to use exactly the same method gives us in practice."},{"Start":"03:54.665 ","End":"04:03.529","Text":"Once again, I\u0027m going to write out the column values 128 because if I go any further,"},{"Start":"04:03.529 ","End":"04:06.650","Text":"I\u0027ll have 256 and this number is less than 256,"},{"Start":"04:06.650 ","End":"04:07.880","Text":"so I need to go that far."},{"Start":"04:07.880 ","End":"04:11.074","Text":"Once again, I\u0027ll use the same method as before,"},{"Start":"04:11.074 ","End":"04:14.630","Text":"converting to a binary number first and then looking at each"},{"Start":"04:14.630 ","End":"04:19.160","Text":"nibble and converting that nibble to a hexadecimal character."},{"Start":"04:19.160 ","End":"04:21.530","Text":"First things first, 251,"},{"Start":"04:21.530 ","End":"04:23.600","Text":"is it greater than 128? Yes, it is."},{"Start":"04:23.600 ","End":"04:25.115","Text":"I need the 128-column,"},{"Start":"04:25.115 ","End":"04:30.065","Text":"but I need to subtract from 251, 128."},{"Start":"04:30.065 ","End":"04:32.300","Text":"I know what\u0027s left to make up,"},{"Start":"04:32.300 ","End":"04:34.715","Text":"and that will be 123."},{"Start":"04:34.715 ","End":"04:37.550","Text":"Do I need the 64? Of course, I do."},{"Start":"04:37.550 ","End":"04:43.300","Text":"Now, I take away 64 and that will give me 59."},{"Start":"04:43.300 ","End":"04:45.450","Text":"Is 59 greater than 32?"},{"Start":"04:45.450 ","End":"04:48.330","Text":"Of course, it is. I need the 32 as well."},{"Start":"04:48.330 ","End":"04:51.055","Text":"Let\u0027s subtract 32 then."},{"Start":"04:51.055 ","End":"04:54.230","Text":"That would give me 27,"},{"Start":"04:54.230 ","End":"04:59.330","Text":"so 27 is obviously greater than 16. Also, I need the 16."},{"Start":"04:59.330 ","End":"05:03.400","Text":"Subtract the 16, then I\u0027ve got 11 left to make up."},{"Start":"05:03.400 ","End":"05:06.440","Text":"I need to make 11 from these remaining bits,"},{"Start":"05:06.440 ","End":"05:09.410","Text":"I can carry on through that procedure was obviously very easy for me to spot"},{"Start":"05:09.410 ","End":"05:13.295","Text":"now that 11 is made from 8, 2, and 1."},{"Start":"05:13.295 ","End":"05:15.605","Text":"I\u0027ll just put ones there."},{"Start":"05:15.605 ","End":"05:17.480","Text":"8, 2,"},{"Start":"05:17.480 ","End":"05:20.315","Text":"and 1, and a 0 there."},{"Start":"05:20.315 ","End":"05:26.230","Text":"I\u0027ve now got the binary number that is the equivalent of this decimal number,"},{"Start":"05:26.230 ","End":"05:28.530","Text":"but I need to convert it into hexadecimal."},{"Start":"05:28.530 ","End":"05:30.140","Text":"Is the question asked for that."},{"Start":"05:30.140 ","End":"05:32.690","Text":"Again, I know already what 1,"},{"Start":"05:32.690 ","End":"05:33.950","Text":"1, 1, 1 is."},{"Start":"05:33.950 ","End":"05:36.860","Text":"I don\u0027t use these headings here."},{"Start":"05:36.860 ","End":"05:39.170","Text":"I use the headings of 8,"},{"Start":"05:39.170 ","End":"05:40.365","Text":"4, 2,"},{"Start":"05:40.365 ","End":"05:42.200","Text":"and 1 because I treat this nibble,"},{"Start":"05:42.200 ","End":"05:44.790","Text":"is completely separate from this nibble."},{"Start":"05:44.920 ","End":"05:48.800","Text":"8 plus 4 plus 2 plus 1 is 15 as we previously found,"},{"Start":"05:48.800 ","End":"05:53.465","Text":"and 15 is F. This character should be F,"},{"Start":"05:53.465 ","End":"05:55.640","Text":"as in the previous answer."},{"Start":"05:55.640 ","End":"06:00.470","Text":"This time now we\u0027ve got 8 plus 2 plus 1, which is 11."},{"Start":"06:00.470 ","End":"06:03.370","Text":"Eleven is B."},{"Start":"06:03.370 ","End":"06:06.295","Text":"There is our final answer."},{"Start":"06:06.295 ","End":"06:08.690","Text":"That was a very straightforward process."},{"Start":"06:08.690 ","End":"06:11.300","Text":"We convert it to binary, first of all,"},{"Start":"06:11.300 ","End":"06:14.765","Text":"from the decimal number using method that we\u0027ve already used previously."},{"Start":"06:14.765 ","End":"06:16.730","Text":"Then once we had the binary value,"},{"Start":"06:16.730 ","End":"06:20.300","Text":"we could treat it as 2 nibbles, completely separate nibbles,"},{"Start":"06:20.300 ","End":"06:28.135","Text":"and give each nibble a hexadecimal character from a column values for that nibble."},{"Start":"06:28.135 ","End":"06:31.670","Text":"That gave us the final answer in hexadecimal."},{"Start":"06:31.670 ","End":"06:33.200","Text":"In the next exercise, we\u0027ll do"},{"Start":"06:33.200 ","End":"06:38.190","Text":"slightly longer examples and I\u0027ll show you a slightly different method. See you then."}],"ID":30082},{"Watched":false,"Name":"Exercise 4 part C","Duration":"11m 6s","ChapterTopicVideoID":25447,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:01.665","Text":"Hey everyone, welcome back."},{"Start":"00:01.665 ","End":"00:05.310","Text":"In these questions we\u0027ve been trying to convert decimal to hexadecimal,"},{"Start":"00:05.310 ","End":"00:09.960","Text":"and we\u0027ve had 2 very short numbers for the first 2 parts of this question."},{"Start":"00:09.960 ","End":"00:11.940","Text":"The third one is a longer number,"},{"Start":"00:11.940 ","End":"00:14.790","Text":"so we\u0027re going to use a slightly different method than we used before,"},{"Start":"00:14.790 ","End":"00:19.680","Text":"where we convert it to binary first and then each group of 4-bits,"},{"Start":"00:19.680 ","End":"00:21.780","Text":"we convert it to a hexadecimal digit."},{"Start":"00:21.780 ","End":"00:23.130","Text":"We\u0027re still going to do the same thing,"},{"Start":"00:23.130 ","End":"00:24.960","Text":"we\u0027re not going to use that method."},{"Start":"00:24.960 ","End":"00:28.410","Text":"What I\u0027d like to do is to assume,"},{"Start":"00:28.410 ","End":"00:31.845","Text":"first of all, you have a calculator and if you do, it\u0027s very straightforward."},{"Start":"00:31.845 ","End":"00:35.220","Text":"I\u0027ll give you an example of a hexadecimal number,"},{"Start":"00:35.220 ","End":"00:38.790","Text":"let\u0027s just pick a random number, say 201."},{"Start":"00:38.790 ","End":"00:41.720","Text":"The way we are expressing this number is"},{"Start":"00:41.720 ","End":"00:44.690","Text":"that there are different column values for each digit."},{"Start":"00:44.690 ","End":"00:46.760","Text":"The first one is the units,"},{"Start":"00:46.760 ","End":"00:50.435","Text":"the next column over is 16 times the units."},{"Start":"00:50.435 ","End":"00:53.210","Text":"The next one is 16 times 16,"},{"Start":"00:53.210 ","End":"00:55.070","Text":"which would be 256."},{"Start":"00:55.070 ","End":"00:56.930","Text":"If we did one another column,"},{"Start":"00:56.930 ","End":"01:01.880","Text":"that would actually be 16 times to 256, which is 4096."},{"Start":"01:01.880 ","End":"01:05.510","Text":"For this example, I\u0027ve just made up, you don\u0027t need that."},{"Start":"01:05.510 ","End":"01:13.200","Text":"What we\u0027re actually saying here is this number is equivalent to 2 lots of 256,"},{"Start":"01:13.200 ","End":"01:16.440","Text":"no lots of 16 because we\u0027ve got 0 here,"},{"Start":"01:16.440 ","End":"01:18.615","Text":"and then 1 lot of 1."},{"Start":"01:18.615 ","End":"01:22.755","Text":"The final answer would be 512 plus 1,"},{"Start":"01:22.755 ","End":"01:24.585","Text":"which is 513,"},{"Start":"01:24.585 ","End":"01:27.530","Text":"so 201 in hexadecimal,"},{"Start":"01:27.530 ","End":"01:30.785","Text":"would be 513 in decimal."},{"Start":"01:30.785 ","End":"01:34.460","Text":"We\u0027re going to try and do the same process for this,"},{"Start":"01:34.460 ","End":"01:36.080","Text":"but the way we would do x,"},{"Start":"01:36.080 ","End":"01:37.700","Text":"we\u0027re obviously doing it in reverse."},{"Start":"01:37.700 ","End":"01:39.620","Text":"I made up a number here,"},{"Start":"01:39.620 ","End":"01:42.725","Text":"and showed you its decimal equivalent."},{"Start":"01:42.725 ","End":"01:46.685","Text":"What we actually want to do is take a decimal and turn it into a hexadecimal."},{"Start":"01:46.685 ","End":"01:49.340","Text":"I\u0027ll show you the process that we need to adopt there,"},{"Start":"01:49.340 ","End":"01:52.685","Text":"and I\u0027ll just clear this off before we start."},{"Start":"01:52.685 ","End":"01:58.070","Text":"What we need to do is we need to divide this number by 256."},{"Start":"01:58.070 ","End":"02:00.050","Text":"I know that the number doesn\u0027t need"},{"Start":"02:00.050 ","End":"02:03.995","Text":"more than 3 columns because if I had 1 in this column,"},{"Start":"02:03.995 ","End":"02:06.140","Text":"it will be 4,096, which is obviously"},{"Start":"02:06.140 ","End":"02:08.765","Text":"much bigger than the number we\u0027re trying to go for here."},{"Start":"02:08.765 ","End":"02:11.015","Text":"I\u0027m going to start with the 256 column,"},{"Start":"02:11.015 ","End":"02:17.035","Text":"because I know a few multiples of this will make more than enough for 1100."},{"Start":"02:17.035 ","End":"02:22.580","Text":"What I\u0027m going to do is I\u0027m going to take 1100 and into my calculator,"},{"Start":"02:22.580 ","End":"02:28.430","Text":"I\u0027m going to divide it by 256 and work out what the answer is."},{"Start":"02:28.430 ","End":"02:33.290","Text":"You\u0027ll find that it\u0027s 4.29687,"},{"Start":"02:33.290 ","End":"02:38.090","Text":"but I\u0027m not interested in the remainder part and the fractional part,"},{"Start":"02:38.090 ","End":"02:39.720","Text":"I just want to know the integer part."},{"Start":"02:39.720 ","End":"02:42.190","Text":"I\u0027m looking to do an integer division here,"},{"Start":"02:42.190 ","End":"02:44.590","Text":"so I\u0027m just interested in the fall."},{"Start":"02:44.590 ","End":"02:48.635","Text":"That gives me the figure I need to write down here,"},{"Start":"02:48.635 ","End":"02:52.065","Text":"so for lots of 256."},{"Start":"02:52.065 ","End":"02:57.950","Text":"Now, I also want to know what\u0027s left over to still make up the remaining columns,"},{"Start":"02:57.950 ","End":"03:02.840","Text":"and so the way I do that is it should be a button on your calculator"},{"Start":"03:02.840 ","End":"03:08.120","Text":"that allows you to work out the remainder when you divide 2 numbers, called modulo."},{"Start":"03:08.120 ","End":"03:11.950","Text":"If you did 1100 modulo 256,"},{"Start":"03:11.950 ","End":"03:17.600","Text":"you divide 256 into 1100 and you\u0027d get a remainder,"},{"Start":"03:17.600 ","End":"03:20.180","Text":"which should actually be 76."},{"Start":"03:20.180 ","End":"03:21.620","Text":"If you turn that into your calculator,"},{"Start":"03:21.620 ","End":"03:23.405","Text":"you\u0027ll find it\u0027s 76."},{"Start":"03:23.405 ","End":"03:28.310","Text":"My aim now is to reproduce 76 from these 2 columns,"},{"Start":"03:28.310 ","End":"03:30.710","Text":"and so how would I go ahead and do that?"},{"Start":"03:30.710 ","End":"03:33.740","Text":"Well, I\u0027ve got 16 columns and I\u0027ve got a 1 column,"},{"Start":"03:33.740 ","End":"03:38.270","Text":"so how many lots of 16 do I need for my 76?"},{"Start":"03:38.270 ","End":"03:40.535","Text":"Well, I could work that out by again doing"},{"Start":"03:40.535 ","End":"03:44.570","Text":"an integer division 76 divided by 16 this time,"},{"Start":"03:44.570 ","End":"03:53.925","Text":"and you\u0027ll find that that will give you the integer part of 76 divided by 16 is 4 again."},{"Start":"03:53.925 ","End":"03:56.885","Text":"If you were to do 76,"},{"Start":"03:56.885 ","End":"04:03.290","Text":"modulo 16, discovered that the remainder would be 12."},{"Start":"04:03.290 ","End":"04:05.035","Text":"This 4 here,"},{"Start":"04:05.035 ","End":"04:08.070","Text":"it needs to grow up into my 16s column,"},{"Start":"04:08.070 ","End":"04:11.000","Text":"and I\u0027ve just got to now find out this final part,"},{"Start":"04:11.000 ","End":"04:13.955","Text":"the 12 and put it in my 1s column."},{"Start":"04:13.955 ","End":"04:18.245","Text":"You\u0027ll remember that when we did our conversions before,"},{"Start":"04:18.245 ","End":"04:26.240","Text":"we noted down all of the numbers from 10-15 on the side of our paper"},{"Start":"04:26.240 ","End":"04:29.840","Text":"just to make it easier for ourselves and to make sure we didn\u0027t make"},{"Start":"04:29.840 ","End":"04:35.210","Text":"a silly mistake transposing 1 hexadecimal character for another."},{"Start":"04:35.210 ","End":"04:37.040","Text":"We go A to F like that."},{"Start":"04:37.040 ","End":"04:41.030","Text":"So 12 is what we\u0027re looking to create in that final column,"},{"Start":"04:41.030 ","End":"04:48.540","Text":"and 12 is the hexadecimal character C. That\u0027s us done 4,"},{"Start":"04:48.540 ","End":"04:53.515","Text":"4, C is the answer to this question."},{"Start":"04:53.515 ","End":"04:56.470","Text":"It\u0027s very straightforward if you have a calculator,"},{"Start":"04:56.470 ","End":"04:58.510","Text":"you work out how many columns you will need,"},{"Start":"04:58.510 ","End":"05:01.190","Text":"how many groups of 4-bits, essentially?"},{"Start":"05:01.190 ","End":"05:02.800","Text":"Once you\u0027ve worked that out,"},{"Start":"05:02.800 ","End":"05:09.550","Text":"you divide the value for the column into the number and take the remainder,"},{"Start":"05:09.550 ","End":"05:11.320","Text":"and then just keep doing"},{"Start":"05:11.320 ","End":"05:15.100","Text":"that process with a remainder until there\u0027s nothing left to make up,"},{"Start":"05:15.100 ","End":"05:17.845","Text":"and you will have your hexadecimal conversion."},{"Start":"05:17.845 ","End":"05:22.735","Text":"That\u0027s great, but what if we aren\u0027t able to use a calculator in the exam,"},{"Start":"05:22.735 ","End":"05:28.450","Text":"what methods can we use to come up with the hexadecimal conversion?"},{"Start":"05:28.450 ","End":"05:32.390","Text":"Well, actually what we can do is we can work"},{"Start":"05:32.390 ","End":"05:36.815","Text":"out all the multiples of 256 and similarly for 16."},{"Start":"05:36.815 ","End":"05:43.235","Text":"Using that, we could easily do the same operation we\u0027ve just done without a calculator."},{"Start":"05:43.235 ","End":"05:47.615","Text":"Again, I would recommend you write on the side of your paper the multiples,"},{"Start":"05:47.615 ","End":"05:53.065","Text":"so let\u0027s just write down the numbers from 256 upwards."},{"Start":"05:53.065 ","End":"05:55.020","Text":"You\u0027ve got 256,"},{"Start":"05:55.020 ","End":"05:57.690","Text":"add 256 to that you get 512,"},{"Start":"05:57.690 ","End":"06:01.785","Text":"add 256 to that, you get 768."},{"Start":"06:01.785 ","End":"06:05.550","Text":"Another 256, you get 124,"},{"Start":"06:05.550 ","End":"06:11.080","Text":"another 256, and you get 1280."},{"Start":"06:11.080 ","End":"06:12.890","Text":"I don\u0027t need to go any further than that,"},{"Start":"06:12.890 ","End":"06:17.120","Text":"because the number I\u0027m looking for 1100 is obviously,"},{"Start":"06:17.120 ","End":"06:18.200","Text":"less than 1280,"},{"Start":"06:18.200 ","End":"06:19.700","Text":"so I don\u0027t need to go any further."},{"Start":"06:19.700 ","End":"06:22.595","Text":"But let\u0027s write down what the multiples are."},{"Start":"06:22.595 ","End":"06:24.990","Text":"Just write down the numbers 1, 2,"},{"Start":"06:24.990 ","End":"06:27.875","Text":"3, 4, however many are going up to."},{"Start":"06:27.875 ","End":"06:34.330","Text":"We know that 4 lots of 256 is 1024,"},{"Start":"06:34.330 ","End":"06:37.325","Text":"so when we\u0027re going to do our conversion,"},{"Start":"06:37.325 ","End":"06:42.485","Text":"we are going to work across the number as we did before."},{"Start":"06:42.485 ","End":"06:47.675","Text":"Let\u0027s write the column values in red as we did previously."},{"Start":"06:47.675 ","End":"06:53.355","Text":"Let\u0027s say we know that that column is 496, that one\u0027s 256."},{"Start":"06:53.355 ","End":"06:55.730","Text":"This one is 16, and this is 1."},{"Start":"06:55.730 ","End":"06:57.920","Text":"We know we don\u0027t need to use this column,"},{"Start":"06:57.920 ","End":"07:00.995","Text":"so if you want, I\u0027ll put a 0 there just to indicate that."},{"Start":"07:00.995 ","End":"07:05.260","Text":"But we know that we will need 4 lots of 256,"},{"Start":"07:05.260 ","End":"07:08.230","Text":"so we\u0027ll write our 4 down here."},{"Start":"07:08.230 ","End":"07:11.060","Text":"We\u0027ve effectively done this division bar up"},{"Start":"07:11.060 ","End":"07:14.660","Text":"here simply by working out what the multiples of"},{"Start":"07:14.660 ","End":"07:22.280","Text":"256 and reading across to find that it\u0027s actually 4 is a multiple of 256,"},{"Start":"07:22.280 ","End":"07:23.885","Text":"that will give us 1024."},{"Start":"07:23.885 ","End":"07:25.550","Text":"Now we\u0027ve got our 1024,"},{"Start":"07:25.550 ","End":"07:27.735","Text":"we do as we did previously,"},{"Start":"07:27.735 ","End":"07:31.880","Text":"when we were doing decimal to binary conversions."},{"Start":"07:31.880 ","End":"07:34.865","Text":"We say, what was the number we started off with?"},{"Start":"07:34.865 ","End":"07:38.090","Text":"That was 1100."},{"Start":"07:38.090 ","End":"07:43.670","Text":"What have we now created that we don\u0027t need to make up anymore."},{"Start":"07:43.670 ","End":"07:50.075","Text":"That\u0027s 1024, if you were to subtract 1024 from 1100,"},{"Start":"07:50.075 ","End":"07:55.320","Text":"by whatever means, you would get 76 as the result."},{"Start":"07:55.320 ","End":"08:01.065","Text":"So 76 is what we\u0027ve got to make up from these remaining 2 columns."},{"Start":"08:01.065 ","End":"08:06.170","Text":"Again, we can work out a little table of multiples of 16,"},{"Start":"08:06.170 ","End":"08:08.630","Text":"and that\u0027s obviously, very straightforward."},{"Start":"08:08.630 ","End":"08:11.155","Text":"We just write down 16,"},{"Start":"08:11.155 ","End":"08:13.995","Text":"and then what 16 plus 16, 32,"},{"Start":"08:13.995 ","End":"08:17.385","Text":"the next one is going to be 48."},{"Start":"08:17.385 ","End":"08:28.185","Text":"Then we\u0027ve got 64 and to that we\u0027ve got 80 and to that we\u0027ve got 96."},{"Start":"08:28.185 ","End":"08:33.435","Text":"And then it\u0027d be 112, 128,"},{"Start":"08:33.435 ","End":"08:38.865","Text":"144, 160,176,"},{"Start":"08:38.865 ","End":"08:41.630","Text":"and I could just keep going for as long as I needed to."},{"Start":"08:41.630 ","End":"08:45.260","Text":"In this case, we\u0027re only looking to make the number 76."},{"Start":"08:45.260 ","End":"08:47.330","Text":"I don\u0027t need to go any further than 76,"},{"Start":"08:47.330 ","End":"08:53.030","Text":"but a useful little check-in is to just see if I\u0027ve got my multiples right."},{"Start":"08:53.030 ","End":"08:55.055","Text":"1, 2, 3,"},{"Start":"08:55.055 ","End":"08:56.720","Text":"4, 5,"},{"Start":"08:56.720 ","End":"08:58.340","Text":"6, 7,"},{"Start":"08:58.340 ","End":"08:59.640","Text":"8, 9,"},{"Start":"08:59.640 ","End":"09:01.050","Text":"when I get to 10,"},{"Start":"09:01.050 ","End":"09:04.800","Text":"obviously, know that 16 times 10 is just to stick a 0 on the end."},{"Start":"09:04.800 ","End":"09:06.650","Text":"I have indeed got 160,"},{"Start":"09:06.650 ","End":"09:08.045","Text":"here is the tenth number,"},{"Start":"09:08.045 ","End":"09:09.655","Text":"but let\u0027s not write it as 10,"},{"Start":"09:09.655 ","End":"09:13.400","Text":"let\u0027s write it as A and then B and so on."},{"Start":"09:13.400 ","End":"09:15.590","Text":"As a seller, I\u0027m going to go any further anyway,"},{"Start":"09:15.590 ","End":"09:18.740","Text":"but it\u0027s just useful to check that we\u0027ve"},{"Start":"09:18.740 ","End":"09:22.385","Text":"got the right number of multiples of 16 in the right order."},{"Start":"09:22.385 ","End":"09:24.680","Text":"Let\u0027s go back to what we were looking to create,"},{"Start":"09:24.680 ","End":"09:27.055","Text":"we were looking to find 76,"},{"Start":"09:27.055 ","End":"09:31.710","Text":"76 is not an exact power of 16,"},{"Start":"09:31.710 ","End":"09:38.555","Text":"so what we are going to find is somewhere between 64 and 80 is our number."},{"Start":"09:38.555 ","End":"09:40.895","Text":"That means 4,"},{"Start":"09:40.895 ","End":"09:42.572","Text":"so I\u0027m 16,"},{"Start":"09:42.572 ","End":"09:46.805","Text":"64, so we need 4 to go here,"},{"Start":"09:46.805 ","End":"09:54.305","Text":"and then if we subtract 64 from 76,"},{"Start":"09:54.305 ","End":"09:56.405","Text":"we know what we\u0027ve got left to make up,"},{"Start":"09:56.405 ","End":"09:57.995","Text":"which is 12,"},{"Start":"09:57.995 ","End":"10:01.040","Text":"and that will go into the final column here."},{"Start":"10:01.040 ","End":"10:04.120","Text":"We know already that 12 is C,"},{"Start":"10:04.120 ","End":"10:08.205","Text":"so we write our C here and we\u0027re done,"},{"Start":"10:08.205 ","End":"10:12.860","Text":"and it\u0027s the same result as we had when we use the calculator."},{"Start":"10:12.860 ","End":"10:14.975","Text":"We know we\u0027ve done the right job,"},{"Start":"10:14.975 ","End":"10:18.350","Text":"so that was just a way of doing a decimal to"},{"Start":"10:18.350 ","End":"10:23.195","Text":"hexadecimal conversion using a calculator or without a calculator,"},{"Start":"10:23.195 ","End":"10:27.590","Text":"just by looking at the powers of 256 or the powers of 16 and so on."},{"Start":"10:27.590 ","End":"10:34.400","Text":"Then, in fact, I should say multiples of 256 or multiples of 16,"},{"Start":"10:34.400 ","End":"10:37.130","Text":"and that works great."},{"Start":"10:37.130 ","End":"10:40.340","Text":"We could have also used the method that we did previously,"},{"Start":"10:40.340 ","End":"10:43.685","Text":"which is to have a 1 long binary number,"},{"Start":"10:43.685 ","End":"10:50.030","Text":"which we break up into 4-bit nibbles and just work out the binary first of all,"},{"Start":"10:50.030 ","End":"10:54.455","Text":"and then take each 4-bit nibble and convert that to hexadecimal."},{"Start":"10:54.455 ","End":"10:57.680","Text":"It\u0027s arguable which one would be quicker than the other?"},{"Start":"10:57.680 ","End":"10:59.870","Text":"But this is just another way of doing it."},{"Start":"10:59.870 ","End":"11:02.390","Text":"We\u0027ve had to look at that now and we\u0027ll do"},{"Start":"11:02.390 ","End":"11:06.450","Text":"a similar example in the next video. See you then."}],"ID":30083},{"Watched":false,"Name":"Exercise 4 part D","Duration":"7m 42s","ChapterTopicVideoID":25435,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:03.389","Text":"Hello, again. In this exercise,"},{"Start":"00:03.389 ","End":"00:07.200","Text":"we\u0027re going to continue on doing decimal to hexadecimal conversions."},{"Start":"00:07.200 ","End":"00:10.620","Text":"We\u0027ve got a fairly large and slightly strange looking number,"},{"Start":"00:10.620 ","End":"00:15.344","Text":"25432, doesn\u0027t look like it\u0027s particularly convenient."},{"Start":"00:15.344 ","End":"00:18.600","Text":"The first job we need to do is to work out"},{"Start":"00:18.600 ","End":"00:21.735","Text":"how many hexadecimal digits we\u0027re going to need."},{"Start":"00:21.735 ","End":"00:27.030","Text":"If it helps, then you can write out the positions,"},{"Start":"00:27.030 ","End":"00:29.385","Text":"the first one being 1,"},{"Start":"00:29.385 ","End":"00:36.450","Text":"the next one being 16, the next one being 256, and then 4096."},{"Start":"00:36.450 ","End":"00:38.480","Text":"We\u0027re looking at that number and we\u0027re saying,"},{"Start":"00:38.480 ","End":"00:42.064","Text":"can I do it with this number of columns?"},{"Start":"00:42.064 ","End":"00:44.000","Text":"The next one over by the way,"},{"Start":"00:44.000 ","End":"00:49.490","Text":"16 lots of 4096 would be 65536."},{"Start":"00:49.490 ","End":"00:53.810","Text":"That\u0027s clearly much bigger than 25432, so we don\u0027t need it."},{"Start":"00:53.810 ","End":"00:57.950","Text":"It looks like all we need is 4 columns for this particular number."},{"Start":"00:57.950 ","End":"01:01.295","Text":"I\u0027m assuming again that you have access to a calculator."},{"Start":"01:01.295 ","End":"01:07.055","Text":"If you do, then we start by looking at how many multiples of 4096 we need,"},{"Start":"01:07.055 ","End":"01:15.345","Text":"so we\u0027ll do an integer division of 25432 and we divide that by 4096,"},{"Start":"01:15.345 ","End":"01:25.545","Text":"and your calculator should tell you that what you need there is 6 lots of 4096,"},{"Start":"01:25.545 ","End":"01:29.570","Text":"so the digit we are going to put here is a 6,"},{"Start":"01:29.570 ","End":"01:33.370","Text":"a hexadecimal digit, and then we can proceed on,"},{"Start":"01:33.370 ","End":"01:35.195","Text":"but I need to know what\u0027s left to make up."},{"Start":"01:35.195 ","End":"01:38.245","Text":"The way I do that is I take the modulo,"},{"Start":"01:38.245 ","End":"01:43.670","Text":"4096 and that will give me what\u0027s left to make up,"},{"Start":"01:43.670 ","End":"01:46.880","Text":"and that is 856."},{"Start":"01:46.880 ","End":"01:49.685","Text":"If you type that into your calculator, you should find."},{"Start":"01:49.685 ","End":"01:53.510","Text":"We\u0027ve got to make 856 now from these remaining columns,"},{"Start":"01:53.510 ","End":"01:59.465","Text":"so 856 divided by 256."},{"Start":"01:59.465 ","End":"02:04.865","Text":"If you type that into your calculator you will find it\u0027s 3 and a remainder."},{"Start":"02:04.865 ","End":"02:10.295","Text":"We\u0027re going to write a 3 in this column because that\u0027s how many to 256s we need."},{"Start":"02:10.295 ","End":"02:15.545","Text":"We now need to work out what\u0027s left to make up in the remaining columns."},{"Start":"02:15.545 ","End":"02:21.390","Text":"We\u0027ll do 856 modulo 256 to see what\u0027s left."},{"Start":"02:21.390 ","End":"02:26.375","Text":"If you type that into your calculator you\u0027ll find it\u0027s 88."},{"Start":"02:26.375 ","End":"02:33.590","Text":"Now, what we want to do is take 88 and divide it by 16 and see how many we get."},{"Start":"02:33.590 ","End":"02:36.215","Text":"Again, that\u0027s an integer division."},{"Start":"02:36.215 ","End":"02:39.985","Text":"88 divided by 16 gives us 5."},{"Start":"02:39.985 ","End":"02:42.615","Text":"We need to write that 5 over here."},{"Start":"02:42.615 ","End":"02:44.495","Text":"We need 5 lots of 16."},{"Start":"02:44.495 ","End":"02:48.290","Text":"Then the last thing we need to do is work out the units column,"},{"Start":"02:48.290 ","End":"02:53.220","Text":"which we\u0027re going to get by taking the modulo."},{"Start":"02:53.220 ","End":"02:55.830","Text":"What you should find is,"},{"Start":"02:55.830 ","End":"02:57.915","Text":"that is 8,"},{"Start":"02:57.915 ","End":"03:04.145","Text":"so our remaining digit is 8 and we have completed"},{"Start":"03:04.145 ","End":"03:11.870","Text":"the conversion of 25432 decimal to hexadecimal,"},{"Start":"03:11.870 ","End":"03:14.615","Text":"which should give us 6358."},{"Start":"03:14.615 ","End":"03:18.365","Text":"As before, if you don\u0027t have a calculator,"},{"Start":"03:18.365 ","End":"03:21.410","Text":"we can still do what we need to do,"},{"Start":"03:21.410 ","End":"03:26.105","Text":"we just need to work out the multiples for each of the columns that we\u0027re looking at."},{"Start":"03:26.105 ","End":"03:31.660","Text":"If we start that for 4096,"},{"Start":"03:31.660 ","End":"03:35.355","Text":"the next one up would be 8192,"},{"Start":"03:35.355 ","End":"03:42.645","Text":"add 4096 to that and you\u0027d get 12288."},{"Start":"03:42.645 ","End":"03:44.820","Text":"Add 4096 to that,"},{"Start":"03:44.820 ","End":"03:48.990","Text":"you\u0027d get 16384,"},{"Start":"03:48.990 ","End":"03:54.615","Text":"add 4096 to that and you\u0027d get 20480,"},{"Start":"03:54.615 ","End":"03:57.025","Text":"add 4096 to that,"},{"Start":"03:57.025 ","End":"04:02.345","Text":"you would get 24576."},{"Start":"04:02.345 ","End":"04:08.780","Text":"We don\u0027t need to go any further because if we added another 4,000-ish onto that,"},{"Start":"04:08.780 ","End":"04:14.120","Text":"we\u0027d be up to the 28,000 mark and we know our number is 25,"},{"Start":"04:14.120 ","End":"04:15.710","Text":"so we don\u0027t need to go any further."},{"Start":"04:15.710 ","End":"04:18.215","Text":"If we write down the multiples next to it,"},{"Start":"04:18.215 ","End":"04:21.060","Text":"1, 2, 3, 4, 5, 6,"},{"Start":"04:22.300 ","End":"04:30.075","Text":"we know that if we were to divide this by 4096,"},{"Start":"04:30.075 ","End":"04:33.300","Text":"we wouldn\u0027t need to go beyond 6."},{"Start":"04:33.300 ","End":"04:38.140","Text":"Therefore, the first digit we\u0027re looking for in our answer would be 6."},{"Start":"04:38.140 ","End":"04:40.540","Text":"Let\u0027s write that down there."},{"Start":"04:40.540 ","End":"04:46.410","Text":"But we now have accounted for 24576 worth,"},{"Start":"04:46.410 ","End":"04:49.915","Text":"so we need to work out how much is left to make up."},{"Start":"04:49.915 ","End":"04:51.805","Text":"If I write that down here,"},{"Start":"04:51.805 ","End":"04:56.155","Text":"25432 is what we started with."},{"Start":"04:56.155 ","End":"05:00.925","Text":"We\u0027ve already got 24576 worth."},{"Start":"05:00.925 ","End":"05:07.500","Text":"What would be leftover if you subtract those 2 numbers out would be 856."},{"Start":"05:07.500 ","End":"05:12.300","Text":"So 856 is what we\u0027ve got to make up from the remaining columns."},{"Start":"05:12.300 ","End":"05:17.075","Text":"I\u0027m going to write out the column headings here just to make this clearer,"},{"Start":"05:17.075 ","End":"05:19.165","Text":"just as we\u0027ve done above."},{"Start":"05:19.165 ","End":"05:22.220","Text":"856 is what we\u0027ve got to make from these remaining columns."},{"Start":"05:22.220 ","End":"05:27.840","Text":"I\u0027ll need now to see how many times I\u0027ll need a 256."},{"Start":"05:27.840 ","End":"05:33.920","Text":"Effectively, I\u0027m going to need to do the same thing here as a table multiples of 256."},{"Start":"05:33.920 ","End":"05:37.025","Text":"If I write those out as far as I need to go,"},{"Start":"05:37.025 ","End":"05:41.930","Text":"we start with 256 and we\u0027ve got 512,"},{"Start":"05:41.930 ","End":"05:44.015","Text":"we\u0027ve got 768,"},{"Start":"05:44.015 ","End":"05:46.540","Text":"then we\u0027ve got 1024."},{"Start":"05:46.540 ","End":"05:49.130","Text":"Actually, I don\u0027t need to go any further than that because"},{"Start":"05:49.130 ","End":"05:52.070","Text":"856 is the number I\u0027m looking to make up."},{"Start":"05:52.070 ","End":"05:55.390","Text":"Let\u0027s just write down the multiples next to him."},{"Start":"05:55.390 ","End":"05:58.920","Text":"If I were to go to 4, it\u0027d be too big,"},{"Start":"05:58.920 ","End":"06:02.730","Text":"so the nearest value is 3."},{"Start":"06:02.730 ","End":"06:10.275","Text":"I\u0027ll get a 3 over here and subtract the 768,"},{"Start":"06:10.275 ","End":"06:12.645","Text":"see what\u0027s left to make up."},{"Start":"06:12.645 ","End":"06:19.090","Text":"If you do 856 minus 768 you will find it\u0027s 88."},{"Start":"06:19.090 ","End":"06:22.925","Text":"I\u0027ve got to make 88 from these remaining 2 columns."},{"Start":"06:22.925 ","End":"06:27.200","Text":"Once again, I can do multiples of 16."},{"Start":"06:27.200 ","End":"06:29.300","Text":"If I write those down here,"},{"Start":"06:29.300 ","End":"06:32.400","Text":"16, 32,"},{"Start":"06:32.400 ","End":"06:36.090","Text":"48, 64,"},{"Start":"06:36.090 ","End":"06:40.235","Text":"the next one\u0027s 80, next one is 96."},{"Start":"06:40.235 ","End":"06:42.020","Text":"But I only need to make 88,"},{"Start":"06:42.020 ","End":"06:44.150","Text":"so I don\u0027t need to go any further."},{"Start":"06:44.150 ","End":"06:46.859","Text":"These multiple 0, 1, 2, 3, 4, 5,"},{"Start":"06:46.859 ","End":"06:51.810","Text":"6, so the nearest 1 is 5."},{"Start":"06:51.810 ","End":"06:56.765","Text":"I\u0027m going to write my 5 here, and that was 80."},{"Start":"06:56.765 ","End":"07:04.220","Text":"Let\u0027s say that we\u0027ve accounted for 80 of the 88 and what\u0027s left to make up is just 8."},{"Start":"07:04.220 ","End":"07:06.770","Text":"I\u0027ve got only 1 column left and"},{"Start":"07:06.770 ","End":"07:09.785","Text":"the only value I need to write in there is what\u0027s left to make up,"},{"Start":"07:09.785 ","End":"07:12.065","Text":"which is 8, and I\u0027m done."},{"Start":"07:12.065 ","End":"07:18.445","Text":"It\u0027s obviously exactly the same as what we worked out when we had the calculator method."},{"Start":"07:18.445 ","End":"07:22.490","Text":"We\u0027ve once again converted from decimal to hexadecimal,"},{"Start":"07:22.490 ","End":"07:25.550","Text":"both with a calculator and without a calculator."},{"Start":"07:25.550 ","End":"07:27.590","Text":"Obviously, way easier with a calculator,"},{"Start":"07:27.590 ","End":"07:29.959","Text":"but it\u0027s not too bad without the calculator,"},{"Start":"07:29.959 ","End":"07:31.940","Text":"you work out the multiples."},{"Start":"07:31.940 ","End":"07:34.220","Text":"If it\u0027s not a massive multiple,"},{"Start":"07:34.220 ","End":"07:37.970","Text":"you don\u0027t have to go very far and then you write out the relevant column value."},{"Start":"07:37.970 ","End":"07:43.080","Text":"We\u0027ll do one more example like this in the next video."}],"ID":30084},{"Watched":false,"Name":"Exercise 4 part E","Duration":"5m 54s","ChapterTopicVideoID":25436,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:03.600","Text":"Welcome back everyone for this final part of"},{"Start":"00:03.600 ","End":"00:08.775","Text":"the exercise on decimal to hexadecimal conversion."},{"Start":"00:08.775 ","End":"00:11.385","Text":"We\u0027ve got a bigger number again,"},{"Start":"00:11.385 ","End":"00:15.030","Text":"and perhaps sometimes you might wonder how you\u0027re going"},{"Start":"00:15.030 ","End":"00:19.395","Text":"to know how many digits you\u0027re going to need, hexadecimal digits."},{"Start":"00:19.395 ","End":"00:21.090","Text":"We really need to solve,"},{"Start":"00:21.090 ","End":"00:24.630","Text":"have an understanding of powers of 16 here."},{"Start":"00:24.630 ","End":"00:32.250","Text":"If we write out the number 16^0, 16^1,"},{"Start":"00:32.270 ","End":"00:39.570","Text":"16^2, 16^3, and 16^4,"},{"Start":"00:39.570 ","End":"00:41.643","Text":"let\u0027s just start out with those,"},{"Start":"00:41.643 ","End":"00:44.930","Text":"we can type those numbers into our calculator and"},{"Start":"00:44.930 ","End":"00:48.740","Text":"work out what the various column values will be."},{"Start":"00:48.740 ","End":"00:50.615","Text":"This one\u0027s going to be 1."},{"Start":"00:50.615 ","End":"00:52.930","Text":"We know this one\u0027s going to be 16,"},{"Start":"00:52.930 ","End":"00:57.850","Text":"256, we\u0027ve seen all of these already, 4,096."},{"Start":"00:57.850 ","End":"00:59.825","Text":"You might remember from one of them."},{"Start":"00:59.825 ","End":"01:04.855","Text":"The next one up would be 65,536."},{"Start":"01:04.855 ","End":"01:07.700","Text":"It answers the question, when do we know to"},{"Start":"01:07.700 ","End":"01:11.255","Text":"stop while we look at the number that we are trying to make,"},{"Start":"01:11.255 ","End":"01:15.275","Text":"and we consider that if we went to an extra column,"},{"Start":"01:15.275 ","End":"01:16.610","Text":"would that be necessary,"},{"Start":"01:16.610 ","End":"01:17.660","Text":"would it not be necessary."},{"Start":"01:17.660 ","End":"01:21.485","Text":"In this case, if we went to 16^5,"},{"Start":"01:21.485 ","End":"01:25.700","Text":"that would actually be a very large number,"},{"Start":"01:25.700 ","End":"01:28.945","Text":"which works out to be this."},{"Start":"01:28.945 ","End":"01:32.690","Text":"That\u0027s obviously way larger than a number we are trying to make."},{"Start":"01:32.690 ","End":"01:35.270","Text":"In fact, if you look at this by inspection,"},{"Start":"01:35.270 ","End":"01:38.510","Text":"we can see that if we double this number here,"},{"Start":"01:38.510 ","End":"01:43.140","Text":"we\u0027d be in the right ballpark for this number."},{"Start":"01:43.760 ","End":"01:49.190","Text":"In fact, if I were to double this number,"},{"Start":"01:49.190 ","End":"01:54.635","Text":"I would get a number 131,072."},{"Start":"01:54.635 ","End":"01:58.860","Text":"That\u0027s obviously bigger than this number here."},{"Start":"01:58.860 ","End":"02:03.155","Text":"So, I know that I don\u0027t need to go any further than this column here."},{"Start":"02:03.155 ","End":"02:06.290","Text":"If I have the benefit of a calculator,"},{"Start":"02:06.290 ","End":"02:09.039","Text":"this is exactly as we\u0027ve done before,"},{"Start":"02:09.039 ","End":"02:13.620","Text":"we take the number 112,000,"},{"Start":"02:16.180 ","End":"02:20.075","Text":"we divide it by, in this case,"},{"Start":"02:20.075 ","End":"02:25.719","Text":"65,536, and we obtain this digit here."},{"Start":"02:25.719 ","End":"02:30.544","Text":"It would give us 1 as an integer part and then a remainder."},{"Start":"02:30.544 ","End":"02:35.400","Text":"The remainder obviously we find by taking 112,000,"},{"Start":"02:35.410 ","End":"02:41.555","Text":"and the Modulo of 65,536."},{"Start":"02:41.555 ","End":"02:44.420","Text":"If we put that into our calculator,"},{"Start":"02:44.420 ","End":"02:53.600","Text":"we get 46,464."},{"Start":"02:53.600 ","End":"02:54.860","Text":"We\u0027ve got our first digit,"},{"Start":"02:54.860 ","End":"02:59.650","Text":"which is 1, and that\u0027s going to go up here."},{"Start":"02:59.650 ","End":"03:03.885","Text":"Let\u0027s carry on then with 46,464."},{"Start":"03:03.885 ","End":"03:08.400","Text":"This time we\u0027re looking to the 4,096 column,"},{"Start":"03:08.400 ","End":"03:11.715","Text":"so we divide by 4,096."},{"Start":"03:11.715 ","End":"03:16.130","Text":"You will find that the integer division of that is 11."},{"Start":"03:16.130 ","End":"03:19.215","Text":"So 11, we can\u0027t write in one column,"},{"Start":"03:19.215 ","End":"03:23.280","Text":"that is of course the hexadecimal character B."},{"Start":"03:23.280 ","End":"03:26.010","Text":"Let\u0027s write B in this column,"},{"Start":"03:26.010 ","End":"03:30.500","Text":"and let\u0027s find out what we\u0027ve got left to make up by"},{"Start":"03:30.500 ","End":"03:37.265","Text":"taking 46,464 Modulo 496."},{"Start":"03:37.265 ","End":"03:43.325","Text":"That will give us a remainder of 1,408."},{"Start":"03:43.325 ","End":"03:46.790","Text":"Carrying on then, we\u0027ve got"},{"Start":"03:46.790 ","End":"03:53.585","Text":"1,408 which we now divide by 256 because that\u0027s the next column alone."},{"Start":"03:53.585 ","End":"03:57.260","Text":"That will give us 5."},{"Start":"03:57.260 ","End":"04:01.405","Text":"Let\u0027s record our 5 up here."},{"Start":"04:01.405 ","End":"04:04.050","Text":"Then we obviously need to find the modulo."},{"Start":"04:04.050 ","End":"04:08.970","Text":"1,408 Modulo"},{"Start":"04:08.970 ","End":"04:16.680","Text":"256 gives us 128,"},{"Start":"04:16.680 ","End":"04:20.655","Text":"and 128 is a nice convenient number, actually."},{"Start":"04:20.655 ","End":"04:24.875","Text":"If we find out by doing the next column,"},{"Start":"04:24.875 ","End":"04:31.845","Text":"128 divided by 16 is actually exactly 8."},{"Start":"04:31.845 ","End":"04:33.880","Text":"We\u0027re going to put the 8 up here."},{"Start":"04:33.880 ","End":"04:41.790","Text":"But if you want to prove that by doing 128 Modulo 16,"},{"Start":"04:41.790 ","End":"04:48.350","Text":"you should get 0 and that is our final digit up here."},{"Start":"04:48.350 ","End":"04:53.360","Text":"So, the answer to our question is 1, B, 5, 8,"},{"Start":"04:53.360 ","End":"05:01.640","Text":"0 in hexadecimal is the equivalent of 112,000 in decimal."},{"Start":"05:01.640 ","End":"05:04.190","Text":"Now, if you were unfortunate enough to get"},{"Start":"05:04.190 ","End":"05:07.260","Text":"this question and not be allowed to use a calculator,"},{"Start":"05:07.260 ","End":"05:09.800","Text":"you can obviously use the method that we did before."},{"Start":"05:09.800 ","End":"05:15.020","Text":"We\u0027d have to find multiples of 65,536 and go as far as we need to,"},{"Start":"05:15.020 ","End":"05:20.825","Text":"multiples of 4096 and likewise multiples of 256, and multiples of 16."},{"Start":"05:20.825 ","End":"05:24.335","Text":"Then using the method on the previous exercises,"},{"Start":"05:24.335 ","End":"05:27.680","Text":"we could work out what we need for each column"},{"Start":"05:27.680 ","End":"05:31.760","Text":"until we have done all the columns and we\u0027d have a result."},{"Start":"05:31.760 ","End":"05:32.960","Text":"I\u0027m not going to do that in"},{"Start":"05:32.960 ","End":"05:36.250","Text":"this particular video because we\u0027ve seen the examples in the previous too."},{"Start":"05:36.250 ","End":"05:41.539","Text":"I\u0027d actually be very surprised if you go on this long to do without a calculator,"},{"Start":"05:41.539 ","End":"05:43.175","Text":"but I guess it could happen."},{"Start":"05:43.175 ","End":"05:48.140","Text":"That\u0027s it for the decimal to hexadecimal conversion questions."},{"Start":"05:48.140 ","End":"05:54.570","Text":"We\u0027ll move on to a new exercise shortly. I\u0027ll see you in the next one."}],"ID":30085},{"Watched":false,"Name":"Exercise 5 parts A-B","Duration":"3m 19s","ChapterTopicVideoID":25438,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.430","Text":"In this question, we\u0027re being asked"},{"Start":"00:02.430 ","End":"00:06.555","Text":"when the particular representations might be most useful,"},{"Start":"00:06.555 ","End":"00:11.325","Text":"and the keyword here I think is to whom it might be useful,"},{"Start":"00:11.325 ","End":"00:17.070","Text":"and we are seeing here that the programmer is the person we\u0027re interested in."},{"Start":"00:17.070 ","End":"00:20.040","Text":"In this situation, we\u0027re really talking about"},{"Start":"00:20.040 ","End":"00:25.245","Text":"the programmer in contrast to the user of the program."},{"Start":"00:25.245 ","End":"00:31.275","Text":"User of the program would be more familiar or humans would be with the decimal system."},{"Start":"00:31.275 ","End":"00:37.595","Text":"So why am I a programmer who want to use a different representation than a normal user?"},{"Start":"00:37.595 ","End":"00:41.420","Text":"Well, we know that binary is more useful to the machine,"},{"Start":"00:41.420 ","End":"00:45.505","Text":"so to a CPU or to a circuit."},{"Start":"00:45.505 ","End":"00:48.770","Text":"That should form the first part of our answer."},{"Start":"00:48.770 ","End":"00:55.990","Text":"We\u0027re seeing here that we\u0027re dealing with a bit or group of bits,"},{"Start":"00:55.990 ","End":"01:01.190","Text":"and that\u0027s an appropriate situation for binary representation."},{"Start":"01:01.190 ","End":"01:05.255","Text":"We then adding to the answer an example,"},{"Start":"01:05.255 ","End":"01:10.144","Text":"a suitable example would be a CPU status register."},{"Start":"01:10.144 ","End":"01:11.870","Text":"Any register really in the CPU."},{"Start":"01:11.870 ","End":"01:17.060","Text":"But that\u0027s a particularly useful situation where you might want to use"},{"Start":"01:17.060 ","End":"01:23.035","Text":"bit representation or network address as well."},{"Start":"01:23.035 ","End":"01:26.110","Text":"Network addresses are often masked with"},{"Start":"01:26.110 ","End":"01:31.450","Text":"binary values to remove certain ranges from the address."},{"Start":"01:31.450 ","End":"01:35.110","Text":"That would be another classic situation where you might want to"},{"Start":"01:35.110 ","End":"01:39.055","Text":"use a binary representation rather than decimal or anything else."},{"Start":"01:39.055 ","End":"01:43.975","Text":"The next part of the question then leads onto us thinking about why"},{"Start":"01:43.975 ","End":"01:50.395","Text":"hexadecimal would be more suited in particular situation for the programmer again."},{"Start":"01:50.395 ","End":"01:55.000","Text":"If we think about one of the characteristics of hexadecimal is"},{"Start":"01:55.000 ","End":"01:59.455","Text":"that 4 bits can be represented by a single hexadecimal digit,"},{"Start":"01:59.455 ","End":"02:04.875","Text":"and that gives us a clue as to what we might want to put in our answer."},{"Start":"02:04.875 ","End":"02:06.610","Text":"In the first part of our answer,"},{"Start":"02:06.610 ","End":"02:12.385","Text":"we could talk about the fact that anytime we\u0027ve got a quite lengthy number,"},{"Start":"02:12.385 ","End":"02:16.284","Text":"it would be fairly inconvenient to write that out as binary."},{"Start":"02:16.284 ","End":"02:19.600","Text":"If the number could be grouped as nibbles,"},{"Start":"02:19.600 ","End":"02:24.130","Text":"then it\u0027s a situation where hexadecimal is particularly useful."},{"Start":"02:24.130 ","End":"02:27.295","Text":"We know that 4 bits is a nibble,"},{"Start":"02:27.295 ","End":"02:32.770","Text":"and therefore, a single hexadecimal digit can represent that nibble."},{"Start":"02:32.770 ","End":"02:37.060","Text":"An example would be 24 bit color value,"},{"Start":"02:37.060 ","End":"02:43.015","Text":"which would need 24 binary digits if we put it as a binary value."},{"Start":"02:43.015 ","End":"02:47.420","Text":"However, if we wrote it out as hexadecimal,"},{"Start":"02:47.420 ","End":"02:51.740","Text":"we just need 6 hexadecimal digits in order to represent"},{"Start":"02:51.740 ","End":"02:56.210","Text":"exactly the same number as a 24 bit binary value,"},{"Start":"02:56.210 ","End":"02:59.960","Text":"which would obviously be 24 binary digits much longer."},{"Start":"02:59.960 ","End":"03:03.545","Text":"There we can see the advantage really of hexadecimal."},{"Start":"03:03.545 ","End":"03:07.325","Text":"That is then the final answer for both parts of this question,"},{"Start":"03:07.325 ","End":"03:10.250","Text":"and in the final question in this topic,"},{"Start":"03:10.250 ","End":"03:14.540","Text":"we\u0027ll move on in the next video in looking at the implications"},{"Start":"03:14.540 ","End":"03:20.340","Text":"of different numbers being encoded in the different representations."}],"ID":30086},{"Watched":false,"Name":"Exercise 6","Duration":"5m 4s","ChapterTopicVideoID":25439,"CourseChapterTopicPlaylistID":217268,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:06.960","Text":"Hello, everyone. In this final exercise we are going to look at a question where it asks"},{"Start":"00:06.960 ","End":"00:09.930","Text":"us to compare 3 numbers in"},{"Start":"00:09.930 ","End":"00:13.860","Text":"different bases and state which is the largest of those numbers."},{"Start":"00:13.860 ","End":"00:15.345","Text":"One of them is in decimal,"},{"Start":"00:15.345 ","End":"00:16.875","Text":"one is in hexidecimal,"},{"Start":"00:16.875 ","End":"00:18.210","Text":"and one is in octal,"},{"Start":"00:18.210 ","End":"00:19.800","Text":"which you don\u0027t come across much,"},{"Start":"00:19.800 ","End":"00:22.275","Text":"but we\u0027ll cover it anyway."},{"Start":"00:22.275 ","End":"00:28.349","Text":"The simplest thing to do here is to put them all into a common base."},{"Start":"00:28.349 ","End":"00:33.245","Text":"I would suggest that given that one that we are all familiar with is decimal,"},{"Start":"00:33.245 ","End":"00:35.520","Text":"is we put them into the base of decimal."},{"Start":"00:35.520 ","End":"00:38.360","Text":"But we could put them into any base and then"},{"Start":"00:38.360 ","End":"00:41.915","Text":"compare them and we work out which one was the largest that way."},{"Start":"00:41.915 ","End":"00:43.790","Text":"So let\u0027s stick with decimals."},{"Start":"00:43.790 ","End":"00:46.790","Text":"We already know what 57 is in decimal."},{"Start":"00:46.790 ","End":"00:53.795","Text":"So let\u0027s go to 39 hexadecimal and work out what that is in decimal."},{"Start":"00:53.795 ","End":"00:57.020","Text":"We know that this first digit is"},{"Start":"00:57.020 ","End":"01:01.385","Text":"the ones column and then the column over is the 16ths column."},{"Start":"01:01.385 ","End":"01:07.595","Text":"Therefore, this number 39 in hexadecimal would be in decimal,"},{"Start":"01:07.595 ","End":"01:12.540","Text":"3 lots of 16 added onto 1 lot of 9,"},{"Start":"01:12.540 ","End":"01:17.455","Text":"and that would give us 57, 48 plus 9."},{"Start":"01:17.455 ","End":"01:25.040","Text":"Turns out that\u0027s exactly the same as the decimal number that we\u0027re comparing it to."},{"Start":"01:25.040 ","End":"01:26.435","Text":"So it\u0027s not bigger."},{"Start":"01:26.435 ","End":"01:29.630","Text":"It\u0027s the same as 57 decimal."},{"Start":"01:29.630 ","End":"01:31.780","Text":"So we know that this one is not the largest."},{"Start":"01:31.780 ","End":"01:33.230","Text":"Let\u0027s look at the last one now,"},{"Start":"01:33.230 ","End":"01:36.785","Text":"which is 71 in octal."},{"Start":"01:36.785 ","End":"01:45.730","Text":"Octal is a number base with only 8 available digits from 0-7."},{"Start":"01:45.730 ","End":"01:48.980","Text":"The reason it\u0027s called octal is"},{"Start":"01:48.980 ","End":"01:54.615","Text":"because 8 is the highest number of combinations obviously."},{"Start":"01:54.615 ","End":"01:57.075","Text":"So it\u0027s based on the number 8."},{"Start":"01:57.075 ","End":"02:01.770","Text":"If we want to convert an octal number into decimal,"},{"Start":"02:01.770 ","End":"02:07.835","Text":"we simply take the first digit and we add that to 8 times the second digit."},{"Start":"02:07.835 ","End":"02:10.265","Text":"So this one is worth 8,"},{"Start":"02:10.265 ","End":"02:11.900","Text":"this one is worth 1,"},{"Start":"02:11.900 ","End":"02:14.565","Text":"and if we put that into decimal,"},{"Start":"02:14.565 ","End":"02:17.745","Text":"we\u0027ll get 8 times 7 plus 1,"},{"Start":"02:17.745 ","End":"02:19.590","Text":"and that\u0027s 56 plus 1,"},{"Start":"02:19.590 ","End":"02:21.495","Text":"which, surprise, surprise,"},{"Start":"02:21.495 ","End":"02:25.455","Text":"is 57 in decimal."},{"Start":"02:25.455 ","End":"02:31.670","Text":"We have got 3 different numbers and it turns out they\u0027re all exactly the same number,"},{"Start":"02:31.670 ","End":"02:33.740","Text":"which is 57 decimal."},{"Start":"02:33.740 ","End":"02:37.940","Text":"So I suppose the point of this exercise would just be to"},{"Start":"02:37.940 ","End":"02:42.995","Text":"highlight that the underlying number is the important thing."},{"Start":"02:42.995 ","End":"02:47.090","Text":"How we represent it is up to us and it depends on"},{"Start":"02:47.090 ","End":"02:53.885","Text":"the circumstances which way or which number base we would choose to represent it as."},{"Start":"02:53.885 ","End":"02:57.274","Text":"The number base we haven\u0027t used here is binary."},{"Start":"02:57.274 ","End":"03:00.890","Text":"So if we wanted to, we could convert this into binary as well."},{"Start":"03:00.890 ","End":"03:02.435","Text":"I\u0027ll go ahead and do that."},{"Start":"03:02.435 ","End":"03:05.210","Text":"Let\u0027s take the decimal number and turn it into"},{"Start":"03:05.210 ","End":"03:08.855","Text":"binary in the fashion that we know already."},{"Start":"03:08.855 ","End":"03:11.780","Text":"We just put the bit values and then we"},{"Start":"03:11.780 ","End":"03:15.530","Text":"decide whether we need the digit or we don\u0027t need the digit."},{"Start":"03:15.530 ","End":"03:19.420","Text":"So it\u0027s going to be 48 plus 9,"},{"Start":"03:19.420 ","End":"03:23.065","Text":"which would be this bit pattern."},{"Start":"03:23.065 ","End":"03:29.959","Text":"That\u0027s also then going to be equivalent to 57 in decimal."},{"Start":"03:29.959 ","End":"03:33.470","Text":"So it doesn\u0027t matter how we represent it,"},{"Start":"03:33.470 ","End":"03:36.395","Text":"whether we represent it as a binary number,"},{"Start":"03:36.395 ","End":"03:39.650","Text":"an octal number, a hexadecimal number,"},{"Start":"03:39.650 ","End":"03:41.855","Text":"or a decimal number."},{"Start":"03:41.855 ","End":"03:43.460","Text":"They\u0027re all the same number."},{"Start":"03:43.460 ","End":"03:48.020","Text":"In this case, the representation depends on your circumstances. What\u0027s most useful."},{"Start":"03:48.020 ","End":"03:52.615","Text":"The machine is going to be storing in a circuit in"},{"Start":"03:52.615 ","End":"03:58.840","Text":"RAM this representation in binary bits of 1s and 0s."},{"Start":"03:58.840 ","End":"04:02.705","Text":"So that\u0027s the best representation to use if we\u0027re looking at the machine level."},{"Start":"04:02.705 ","End":"04:06.335","Text":"If we were looking at things in groups of 3 bits,"},{"Start":"04:06.335 ","End":"04:10.190","Text":"then octal would be a more sensible representation,"},{"Start":"04:10.190 ","End":"04:15.275","Text":"because octal uses groups of 3 bits for each of the octal digits."},{"Start":"04:15.275 ","End":"04:18.440","Text":"If we were doing it in groups of 4 bits,"},{"Start":"04:18.440 ","End":"04:22.220","Text":"then hexadecimal would be a more appropriate representation."},{"Start":"04:22.220 ","End":"04:24.080","Text":"So 4 bits being a nibble."},{"Start":"04:24.080 ","End":"04:26.630","Text":"If we want to look at things in terms of nibbles like we do,"},{"Start":"04:26.630 ","End":"04:29.360","Text":"for example, when we\u0027re talking about hexadecimal numbers,"},{"Start":"04:29.360 ","End":"04:32.495","Text":"RGB is often a good way of using hexadecimal,"},{"Start":"04:32.495 ","End":"04:37.130","Text":"because red, green, and blue values are 8 bits each generally."},{"Start":"04:37.130 ","End":"04:40.475","Text":"So you can divide that into 2 lots of 4 bits."},{"Start":"04:40.475 ","End":"04:44.615","Text":"So RGB tends to be a way that hexadecimal is used."},{"Start":"04:44.615 ","End":"04:48.440","Text":"But the number underlying it all is the same and"},{"Start":"04:48.440 ","End":"04:53.015","Text":"obviously humans would prefer to see it in the decimal form."},{"Start":"04:53.015 ","End":"04:56.900","Text":"That\u0027s it for all the exercises in this first chapter,"},{"Start":"04:56.900 ","End":"04:59.675","Text":"and we\u0027ll move on to build on"},{"Start":"04:59.675 ","End":"05:04.860","Text":"all the concepts we\u0027ve learned here in the next chapter. So I\u0027ll see you then."}],"ID":30087}],"Thumbnail":null,"ID":217268},{"Name":"Signed and twos complement","TopicPlaylistFirstVideoID":0,"Duration":null,"Videos":[{"Watched":false,"Name":"Signed Numbers","Duration":"5m 5s","ChapterTopicVideoID":28715,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:03.225","Text":"Hello and welcome to this video on signed numbers."},{"Start":"00:03.225 ","End":"00:04.470","Text":"By the end of this section,"},{"Start":"00:04.470 ","End":"00:08.160","Text":"you\u0027ll be able to distinguish between signed and unsigned integers,"},{"Start":"00:08.160 ","End":"00:12.795","Text":"interpret binary numbers in sign and magnitude or two\u0027s complement format,"},{"Start":"00:12.795 ","End":"00:17.003","Text":"convert a signed binary integer into its decimal equivalent,"},{"Start":"00:17.003 ","End":"00:21.730","Text":"and perform calculations in binary with signed numbers."},{"Start":"00:21.800 ","End":"00:25.934","Text":"Whilst developing our understanding of number systems previously,"},{"Start":"00:25.934 ","End":"00:31.573","Text":"the decimal values we used in examples were for simplicity sake, all fairly limited."},{"Start":"00:31.573 ","End":"00:33.230","Text":"They were whole numbers."},{"Start":"00:33.230 ","End":"00:38.045","Text":"We didn\u0027t use numbers with a fractional part or negative numbers."},{"Start":"00:38.045 ","End":"00:40.610","Text":"We\u0027ll continue to work with whole numbers for now,"},{"Start":"00:40.610 ","End":"00:44.450","Text":"but consider how to represent negative ones as well."},{"Start":"00:44.450 ","End":"00:49.955","Text":"We\u0027ve already been working with what\u0027s formerly known as an unsigned integer,"},{"Start":"00:49.955 ","End":"00:54.860","Text":"a number with no fractional part that\u0027s greater than or equal to 0,"},{"Start":"00:54.860 ","End":"00:58.580","Text":"whereas a signed integer is a number with"},{"Start":"00:58.580 ","End":"01:03.125","Text":"no fractional part that can be positive or negative."},{"Start":"01:03.125 ","End":"01:07.790","Text":"As we know, everything in a digital system is encoded as 1s and 0s,"},{"Start":"01:07.790 ","End":"01:14.307","Text":"so we need to come up with a way of encoding a signed decimal integer in binary."},{"Start":"01:14.307 ","End":"01:17.380","Text":"There are a few systems we can choose between."},{"Start":"01:17.380 ","End":"01:22.480","Text":"One is called sign-magnitude or sign and magnitude."},{"Start":"01:22.480 ","End":"01:25.870","Text":"It\u0027s a system of encoding a number in binary with"},{"Start":"01:25.870 ","End":"01:30.395","Text":"a positive and negative range using a sign bit."},{"Start":"01:30.395 ","End":"01:35.755","Text":"A sign bit of 0 is used to indicate positive numbers or 0 and"},{"Start":"01:35.755 ","End":"01:41.810","Text":"a sign bit of 1 is used to indicate negative numbers or 0."},{"Start":"01:41.810 ","End":"01:43.680","Text":"In sign and magnitude,"},{"Start":"01:43.680 ","End":"01:46.630","Text":"the leftmost bit is singled out as the sign bit,"},{"Start":"01:46.630 ","End":"01:53.080","Text":"the rest of the binary pattern represents the size or magnitude of the number."},{"Start":"01:53.080 ","End":"01:56.731","Text":"Let\u0027s say we were storing our number in a single byte."},{"Start":"01:56.731 ","End":"01:58.820","Text":"For an unsigned integer,"},{"Start":"01:58.820 ","End":"02:02.790","Text":"the bit pattern would represent the following."},{"Start":"02:02.830 ","End":"02:05.705","Text":"For an unsigned integer,"},{"Start":"02:05.705 ","End":"02:12.930","Text":"this bit pattern would be 1 times 2^7 plus 1 times 2^2,"},{"Start":"02:12.930 ","End":"02:18.100","Text":"which is 128 plus 4, which is 132."},{"Start":"02:18.100 ","End":"02:19.970","Text":"For a signed number,"},{"Start":"02:19.970 ","End":"02:25.490","Text":"we give up the most significant bit and make that a sign bit instead."},{"Start":"02:25.490 ","End":"02:31.502","Text":"A number is now 1 times 2^2, which is 4."},{"Start":"02:31.502 ","End":"02:36.230","Text":"But because the sign bit set this indicates the numbers negative,"},{"Start":"02:36.230 ","End":"02:41.060","Text":"so the binary bit pattern should actually be interpreted as minus 4."},{"Start":"02:41.060 ","End":"02:44.180","Text":"What we\u0027ve just seen is quite significant."},{"Start":"02:44.180 ","End":"02:48.560","Text":"What a binary value signifies is dependent on the context."},{"Start":"02:48.560 ","End":"02:52.430","Text":"In this case, the same binary pattern either indicates"},{"Start":"02:52.430 ","End":"02:59.090","Text":"132 if we interpret it as an unsigned 8-bit integer,"},{"Start":"02:59.090 ","End":"03:08.945","Text":"or minus 4 if we interpret it as a signed 8-bit integer using sign and magnitude format."},{"Start":"03:08.945 ","End":"03:12.350","Text":"Given another example of a different length,"},{"Start":"03:12.350 ","End":"03:17.760","Text":"7 bits, this one has the sign bit set to 0,"},{"Start":"03:17.760 ","End":"03:24.140","Text":"so it indicates a positive number and our job is simply to work out the magnitude,"},{"Start":"03:24.140 ","End":"03:27.245","Text":"which turns out to be 50."},{"Start":"03:27.245 ","End":"03:31.820","Text":"Negative integers can be represented in binary by giving up"},{"Start":"03:31.820 ","End":"03:37.729","Text":"the most significant binary digit value and replacing it with an indicator of the sign."},{"Start":"03:37.729 ","End":"03:40.550","Text":"This is a nice simple system and has"},{"Start":"03:40.550 ","End":"03:44.780","Text":"the advantage that the magnitude part of the binary value is"},{"Start":"03:44.780 ","End":"03:51.742","Text":"the same for our positive or negative number and only the sign bit changes."},{"Start":"03:51.742 ","End":"03:57.890","Text":"The downside of encoding integers as signed rather than unsigned is that the range of"},{"Start":"03:57.890 ","End":"04:00.410","Text":"numbers that can be represented with a given number of"},{"Start":"04:00.410 ","End":"04:04.675","Text":"bits is reduced when using signed numbers."},{"Start":"04:04.675 ","End":"04:12.800","Text":"With 8 bits, the largest number we could encode would be 255 if unsigned."},{"Start":"04:12.800 ","End":"04:18.680","Text":"But we\u0027d be given up half the range if you\u0027re using signed numbers in 8 bits,"},{"Start":"04:18.680 ","End":"04:23.690","Text":"because if 1 bit is being used for the sign then the remaining 7 bits"},{"Start":"04:23.690 ","End":"04:29.145","Text":"mean that the largest value that can be encoded is 127,"},{"Start":"04:29.145 ","End":"04:36.390","Text":"so 8 bits unsigned gives us a range of 0-255 whereas"},{"Start":"04:36.390 ","End":"04:44.535","Text":"8 bits signed gives us a range of minus 127 to positive 127."},{"Start":"04:44.535 ","End":"04:50.750","Text":"One quirk of sign and magnitude is that there are 2 representations of 0,"},{"Start":"04:50.750 ","End":"04:57.185","Text":"one in the negative half of the range and the other in the positive half."},{"Start":"04:57.185 ","End":"04:59.915","Text":"We\u0027ll pause there. In the next video,"},{"Start":"04:59.915 ","End":"05:03.155","Text":"we\u0027ll look at adding numbers in binary."},{"Start":"05:03.155 ","End":"05:06.360","Text":"Thanks for watching and see you soon."}],"ID":30244},{"Watched":false,"Name":"Binary Addition","Duration":"4m 50s","ChapterTopicVideoID":28712,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:01.725","Text":"Hello, welcome back."},{"Start":"00:01.725 ","End":"00:04.680","Text":"We already know that the electronic circuits used to create"},{"Start":"00:04.680 ","End":"00:08.295","Text":"digital systems are suited to binary representation."},{"Start":"00:08.295 ","End":"00:13.245","Text":"When digital circuits are used to implement mathematical operations such as addition,"},{"Start":"00:13.245 ","End":"00:17.175","Text":"naturally, we\u0027d want that addition to be performed in binary."},{"Start":"00:17.175 ","End":"00:21.630","Text":"There\u0027s actually no difference in the procedure for adding binary numbers and"},{"Start":"00:21.630 ","End":"00:27.570","Text":"decimal numbers once you take into account the more limited set of symbols in binary."},{"Start":"00:27.570 ","End":"00:30.405","Text":"When adding two decimal numbers together,"},{"Start":"00:30.405 ","End":"00:33.000","Text":"you proceed from the least significant digits,"},{"Start":"00:33.000 ","End":"00:37.935","Text":"adding them together and recording the result in the row below the two digits."},{"Start":"00:37.935 ","End":"00:41.705","Text":"Where the addition can\u0027t be accommodated in a single column,"},{"Start":"00:41.705 ","End":"00:46.430","Text":"we carry over the most significant digit of the result into the next column."},{"Start":"00:46.430 ","End":"00:49.355","Text":"Here, because 3 plus 9 is 12,"},{"Start":"00:49.355 ","End":"00:51.125","Text":"and that involves two digits,"},{"Start":"00:51.125 ","End":"00:55.850","Text":"we record the 2 here and carry the 1 over to the next column."},{"Start":"00:55.850 ","End":"01:01.640","Text":"The final operation involves adding the two digits in this column and the carry value."},{"Start":"01:01.640 ","End":"01:05.270","Text":"The process is identical in binary,"},{"Start":"01:05.270 ","End":"01:08.075","Text":"0 plus 1 is just 1,"},{"Start":"01:08.075 ","End":"01:09.635","Text":"involves no carry,"},{"Start":"01:09.635 ","End":"01:12.290","Text":"1 plus 0 is the same."},{"Start":"01:12.290 ","End":"01:14.860","Text":"But 1 plus 1, which is 2,"},{"Start":"01:14.860 ","End":"01:20.060","Text":"does involve a carry because we can\u0027t write the symbol 2 as we\u0027re dealing in binary,"},{"Start":"01:20.060 ","End":"01:22.400","Text":"2 in binary is 1, 0,"},{"Start":"01:22.400 ","End":"01:23.750","Text":"and we can\u0027t write 1,"},{"Start":"01:23.750 ","End":"01:25.240","Text":"0 in a single column."},{"Start":"01:25.240 ","End":"01:30.180","Text":"We\u0027d write the 0 in this column and carry the 1 over."},{"Start":"01:30.180 ","End":"01:34.690","Text":"We then bring the 1 down into the next column,"},{"Start":"01:34.690 ","End":"01:37.105","Text":"because there\u0027s nothing else to add."},{"Start":"01:37.105 ","End":"01:42.710","Text":"Similarly, if we had 1 plus 1 plus another 1 from a carry to add,"},{"Start":"01:42.710 ","End":"01:44.465","Text":"we couldn\u0027t write 3."},{"Start":"01:44.465 ","End":"01:47.540","Text":"We\u0027d need to put 3 in binary, which is 1,"},{"Start":"01:47.540 ","End":"01:51.430","Text":"1, but we can\u0027t write that into a single column."},{"Start":"01:51.430 ","End":"01:57.560","Text":"We put a 1 in this column and carry over 1 to the next column."},{"Start":"01:57.560 ","End":"02:02.545","Text":"As before, bring that down as there\u0027s nothing else to add it to here."},{"Start":"02:02.545 ","End":"02:07.250","Text":"Let\u0027s now look at a simple addition of 2, 4-bit numbers."},{"Start":"02:07.250 ","End":"02:09.365","Text":"To keep it as simple as possible,"},{"Start":"02:09.365 ","End":"02:12.845","Text":"we\u0027ll make the numbers unsigned, for now."},{"Start":"02:12.845 ","End":"02:15.805","Text":"1 plus 0 would give us 1,"},{"Start":"02:15.805 ","End":"02:18.480","Text":"1 plus 1 would give us 1, 0."},{"Start":"02:18.480 ","End":"02:20.960","Text":"We write 0 in this first column,"},{"Start":"02:20.960 ","End":"02:22.775","Text":"carry a 1 across,"},{"Start":"02:22.775 ","End":"02:26.880","Text":"then 1 plus 0 plus the carried 1 would again give us 1,"},{"Start":"02:26.880 ","End":"02:31.280","Text":"0, so we write 0 in this column and carry the 1 across."},{"Start":"02:31.280 ","End":"02:33.995","Text":"There\u0027s nothing else to add in the next column,"},{"Start":"02:33.995 ","End":"02:37.460","Text":"so we just bring down the 1 that we carried across and we\u0027ve"},{"Start":"02:37.460 ","End":"02:41.740","Text":"got our final result of 1001."},{"Start":"02:41.740 ","End":"02:45.125","Text":"If we convert each line into decimal,"},{"Start":"02:45.125 ","End":"02:48.725","Text":"we can see if this addition gives us the result we expect."},{"Start":"02:48.725 ","End":"02:53.585","Text":"The first line would give us 4 plus 2 plus 1, which is 7,"},{"Start":"02:53.585 ","End":"02:56.545","Text":"the next line is just 2,"},{"Start":"02:56.545 ","End":"03:01.800","Text":"and the final line is 8 plus 1, which is 9."},{"Start":"03:01.800 ","End":"03:07.145","Text":"That\u0027s what we\u0027d expect the result to be if we added the decimal integers 7 and 2."},{"Start":"03:07.145 ","End":"03:10.085","Text":"The binary addition has worked."},{"Start":"03:10.085 ","End":"03:13.820","Text":"That was a binary addition of two unsigned numbers."},{"Start":"03:13.820 ","End":"03:17.125","Text":"With signed numbers in sign and magnitude format,"},{"Start":"03:17.125 ","End":"03:22.040","Text":"the addition is still straightforward when both numbers have the same sign."},{"Start":"03:22.040 ","End":"03:23.660","Text":"If they\u0027re both positive,"},{"Start":"03:23.660 ","End":"03:28.880","Text":"then you just add the magnitudes together like we\u0027ve done in this example."},{"Start":"03:28.880 ","End":"03:31.145","Text":"If they\u0027re both negative,"},{"Start":"03:31.145 ","End":"03:37.220","Text":"then you add the magnitudes together and make the sign bit of the result negative."},{"Start":"03:37.220 ","End":"03:39.750","Text":"Let\u0027s stick with 2, 4-bit numbers,"},{"Start":"03:39.750 ","End":"03:42.905","Text":"although 1 bit has now been given up to the sign bit,"},{"Start":"03:42.905 ","End":"03:45.185","Text":"which indicates in both cases,"},{"Start":"03:45.185 ","End":"03:47.875","Text":"these are negative numbers."},{"Start":"03:47.875 ","End":"03:51.660","Text":"1 plus 0 would give us 1, again, 1 plus 0,"},{"Start":"03:51.660 ","End":"03:52.875","Text":"and the next column is 1,"},{"Start":"03:52.875 ","End":"03:55.580","Text":"and also in the final column."},{"Start":"03:55.580 ","End":"03:58.670","Text":"The final job now is then to set the sign bit to"},{"Start":"03:58.670 ","End":"04:02.620","Text":"negative because both the numbers we added were negative."},{"Start":"04:02.620 ","End":"04:05.660","Text":"Let\u0027s check the values again in decimal."},{"Start":"04:05.660 ","End":"04:08.030","Text":"The first line is minus 3,"},{"Start":"04:08.030 ","End":"04:10.924","Text":"2 plus 1 with a sign bit of negative."},{"Start":"04:10.924 ","End":"04:15.750","Text":"The second is 4 with just the 4 column and a sign of negative,"},{"Start":"04:15.750 ","End":"04:19.065","Text":"and the result is 4 plus 2 plus 1,"},{"Start":"04:19.065 ","End":"04:20.610","Text":"which is minus 7,"},{"Start":"04:20.610 ","End":"04:24.490","Text":"given that the sign bit is negative."},{"Start":"04:24.530 ","End":"04:29.360","Text":"A nice simple system of using a bit to indicate the sign is straightforward"},{"Start":"04:29.360 ","End":"04:33.440","Text":"when adding a pair of numbers that are both positive or both negative."},{"Start":"04:33.440 ","End":"04:37.040","Text":"But if there\u0027s a mixture of positive and negative numbers,"},{"Start":"04:37.040 ","End":"04:39.250","Text":"it gets more complicated."},{"Start":"04:39.250 ","End":"04:42.815","Text":"Another system of encoding signed numbers is possible,"},{"Start":"04:42.815 ","End":"04:44.915","Text":"the one\u0027s complement form."},{"Start":"04:44.915 ","End":"04:47.870","Text":"We\u0027ll cover one\u0027s complement in the next video."},{"Start":"04:47.870 ","End":"04:51.540","Text":"See you shortly for that one. Thanks for watching."}],"ID":30241},{"Watched":false,"Name":"Ones Complement","Duration":"3m 25s","ChapterTopicVideoID":28713,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:03.570","Text":"Hello, welcome back. In the previous video,"},{"Start":"00:03.570 ","End":"00:06.390","Text":"we discovered that the addition of sign and magnitude numbers was"},{"Start":"00:06.390 ","End":"00:09.930","Text":"straightforward if the sign of both numbers being added was the same,"},{"Start":"00:09.930 ","End":"00:11.940","Text":"but when the signs were different,"},{"Start":"00:11.940 ","End":"00:13.500","Text":"it got more complicated."},{"Start":"00:13.500 ","End":"00:17.835","Text":"An alternative is one\u0027s complement."},{"Start":"00:17.835 ","End":"00:22.800","Text":"This is a system of encoding a number in binary with a positive and negative range,"},{"Start":"00:22.800 ","End":"00:25.800","Text":"with the negative representation of a number being"},{"Start":"00:25.800 ","End":"00:30.045","Text":"the bitwise inversion of the positive representation."},{"Start":"00:30.045 ","End":"00:32.385","Text":"Bitwise inversion, simply put,"},{"Start":"00:32.385 ","End":"00:37.080","Text":"is to just flip each bit in the number to its opposite value."},{"Start":"00:37.080 ","End":"00:39.150","Text":"Where it was a 1 make it 0,"},{"Start":"00:39.150 ","End":"00:41.705","Text":"where it was a 0 make it a 1."},{"Start":"00:41.705 ","End":"00:48.290","Text":"Given this number, inverting each binary digit would give us the one\u0027s complement."},{"Start":"00:48.290 ","End":"00:50.479","Text":"As with sign and magnitude,"},{"Start":"00:50.479 ","End":"00:55.975","Text":"half the range will be used for negative numbers and half the range for positive."},{"Start":"00:55.975 ","End":"01:00.050","Text":"Positive numbers, 0-127 are the same as they"},{"Start":"01:00.050 ","End":"01:04.565","Text":"are for unsigned binary and sign and magnitude representation."},{"Start":"01:04.565 ","End":"01:09.349","Text":"But the negative representations are different to sign and magnitude."},{"Start":"01:09.349 ","End":"01:14.165","Text":"A pattern of all 1s indicates minus 0."},{"Start":"01:14.165 ","End":"01:18.515","Text":"Any number with the MSB as 1 will be a negative number."},{"Start":"01:18.515 ","End":"01:22.174","Text":"As soon as we see a 0 at the MSB,"},{"Start":"01:22.174 ","End":"01:24.660","Text":"we\u0027re in the positive range."},{"Start":"01:24.660 ","End":"01:27.635","Text":"Looking at another example in detail."},{"Start":"01:27.635 ","End":"01:31.160","Text":"Converting a number to a decimal value for a positive number,"},{"Start":"01:31.160 ","End":"01:33.470","Text":"we add up the column values whilst"},{"Start":"01:33.470 ","End":"01:36.935","Text":"ignoring the most significant bit which indicates the sign."},{"Start":"01:36.935 ","End":"01:40.025","Text":"As we can see for this positive number,"},{"Start":"01:40.025 ","End":"01:43.370","Text":"this gives the same bit pattern in one\u0027s complement as we\u0027d"},{"Start":"01:43.370 ","End":"01:47.600","Text":"have with both unsigned numbers and sign and magnitude."},{"Start":"01:47.600 ","End":"01:52.355","Text":"If we now convert the number into its inverse to get the one\u0027s complement,"},{"Start":"01:52.355 ","End":"01:54.095","Text":"we see this pattern."},{"Start":"01:54.095 ","End":"01:56.345","Text":"In the sign magnitude format,"},{"Start":"01:56.345 ","End":"02:02.015","Text":"we\u0027d expect positive and negative values to be the same apart from the sign bit."},{"Start":"02:02.015 ","End":"02:05.795","Text":"But here, we can see clearly that that\u0027s not the same."},{"Start":"02:05.795 ","End":"02:08.855","Text":"This would\u0027ve been the magnitude part and it\u0027s clearly different"},{"Start":"02:08.855 ","End":"02:12.395","Text":"from the magnitude part of the positive number."},{"Start":"02:12.395 ","End":"02:15.485","Text":"The inverse, as we add up the columns,"},{"Start":"02:15.485 ","End":"02:18.110","Text":"actually gives us 83."},{"Start":"02:18.110 ","End":"02:21.949","Text":"We clearly need a different process to calculate"},{"Start":"02:21.949 ","End":"02:26.515","Text":"the decimal value when we\u0027re dealing with one\u0027s complement numbers."},{"Start":"02:26.515 ","End":"02:31.460","Text":"We first take what would\u0027ve been the MSB value in an unsigned number,"},{"Start":"02:31.460 ","End":"02:33.020","Text":"in this case 2^7,"},{"Start":"02:33.020 ","End":"02:37.335","Text":"which is a 128 and we make it negative."},{"Start":"02:37.335 ","End":"02:42.920","Text":"To that, we add 1 and finally,"},{"Start":"02:42.920 ","End":"02:49.440","Text":"add the number we just calculated from the other 7 bits which gives us minus 44."},{"Start":"02:49.440 ","End":"02:52.595","Text":"This meets the definition of a one\u0027s complement number."},{"Start":"02:52.595 ","End":"02:57.590","Text":"A negative integer is the bitwise inverse of its positive counterpart."},{"Start":"02:57.590 ","End":"03:02.089","Text":"But converting it to decimals is a little trickier than sign and magnitude."},{"Start":"03:02.089 ","End":"03:03.980","Text":"Unlike sign and magnitude,"},{"Start":"03:03.980 ","End":"03:08.330","Text":"it also has complications when adding numbers."},{"Start":"03:08.330 ","End":"03:11.090","Text":"You guessed it. There\u0027s yet another system for"},{"Start":"03:11.090 ","End":"03:14.720","Text":"representing binary numbers called two\u0027s complement,"},{"Start":"03:14.720 ","End":"03:18.020","Text":"which happily allows for straightforward additions."},{"Start":"03:18.020 ","End":"03:21.005","Text":"We\u0027ll cover that in the next video."},{"Start":"03:21.005 ","End":"03:25.440","Text":"See you for that one shortly. Thanks for watching."}],"ID":30242},{"Watched":false,"Name":"Twos Complement","Duration":"8m 8s","ChapterTopicVideoID":28714,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.580","Text":"Hello, again. Previously we,"},{"Start":"00:02.580 ","End":"00:07.050","Text":"heard how one\u0027s complement allowed us to represent a negative number in binary,"},{"Start":"00:07.050 ","End":"00:12.525","Text":"simply by performing a bitwise inversion on its positive counterpart."},{"Start":"00:12.525 ","End":"00:16.020","Text":"Two\u0027s complement is a system of encoding a number in binary with"},{"Start":"00:16.020 ","End":"00:22.050","Text":"a positive and negative range using a negative weighting for the most significant bit."},{"Start":"00:22.050 ","End":"00:24.615","Text":"For negative numbers in two\u0027s complement,"},{"Start":"00:24.615 ","End":"00:27.030","Text":"the most significant bit will be 1."},{"Start":"00:27.030 ","End":"00:29.760","Text":"If you\u0027re using 8 bits to encode our number,"},{"Start":"00:29.760 ","End":"00:34.945","Text":"this will give a weighting of minus 128 for that binary digit."},{"Start":"00:34.945 ","End":"00:37.385","Text":"For this specific bit pattern,"},{"Start":"00:37.385 ","End":"00:43.712","Text":"we get the decimal value of minus 79 because we\u0027re adding 49,"},{"Start":"00:43.712 ","End":"00:49.625","Text":"32 plus 16 plus 1, to minus 128."},{"Start":"00:49.625 ","End":"00:53.405","Text":"The system\u0027s closely related to one\u0027s complement."},{"Start":"00:53.405 ","End":"00:57.980","Text":"If we interpret the same binary pattern as a one\u0027s complement decimal number,"},{"Start":"00:57.980 ","End":"01:03.155","Text":"we\u0027ll see that there is a difference of 1 between the 2 interpretations."},{"Start":"01:03.155 ","End":"01:06.920","Text":"In fact, an 8-bit number in one\u0027s complement differs"},{"Start":"01:06.920 ","End":"01:10.640","Text":"very little from an 8-bit number in two\u0027s complement."},{"Start":"01:10.640 ","End":"01:15.100","Text":"For the positive half where the MSB is 0, it\u0027s the same."},{"Start":"01:15.100 ","End":"01:18.905","Text":"But for the negative half where the MSB is 1,"},{"Start":"01:18.905 ","End":"01:24.980","Text":"the two\u0027s complement value and the one\u0027s complement value differ by 1."},{"Start":"01:24.980 ","End":"01:28.880","Text":"There\u0027s also only a single 0 in two\u0027s complement,"},{"Start":"01:28.880 ","End":"01:36.815","Text":"so we get a slightly wider range of numbers between minus 128 and positive 127."},{"Start":"01:36.815 ","End":"01:40.880","Text":"We can convert a negative integer in decimal into"},{"Start":"01:40.880 ","End":"01:45.290","Text":"two\u0027s complement binary by performing the following steps."},{"Start":"01:45.290 ","End":"01:49.010","Text":"Turn the negative number into its positive binary equivalent,"},{"Start":"01:49.010 ","End":"01:50.720","Text":"pad it out with zeros,"},{"Start":"01:50.720 ","End":"01:53.840","Text":"invert a pattern, and then add 1."},{"Start":"01:53.840 ","End":"01:57.475","Text":"Let\u0027s work through an example, 8-bit number."},{"Start":"01:57.475 ","End":"02:00.715","Text":"First, we find the positive representation"},{"Start":"02:00.715 ","End":"02:04.059","Text":"of the negative number we\u0027re looking to encode."},{"Start":"02:04.059 ","End":"02:06.925","Text":"We\u0027re looking to encode minus 27,"},{"Start":"02:06.925 ","End":"02:10.035","Text":"what values do we need to encode?"},{"Start":"02:10.035 ","End":"02:12.410","Text":"We\u0027ll need 16,"},{"Start":"02:12.410 ","End":"02:14.300","Text":"so let\u0027s start there."},{"Start":"02:14.300 ","End":"02:19.025","Text":"We\u0027ll also need the 8 as there\u0027s 11 left to make up."},{"Start":"02:19.025 ","End":"02:24.465","Text":"Now, we need 3 more so 0 here, 1,"},{"Start":"02:24.465 ","End":"02:31.510","Text":"and 1, so 16 plus 8 plus 2 plus 1 gives us 27 as was our objective."},{"Start":"02:31.510 ","End":"02:37.340","Text":"The next step is to pad the number out with zeros on the left-hand side."},{"Start":"02:37.340 ","End":"02:44.315","Text":"Now, we get the one\u0027s complement of the binary number by inverting every bit."},{"Start":"02:44.315 ","End":"02:49.790","Text":"This, by the way, is why we had to pad out a number with zeros to the left."},{"Start":"02:49.790 ","End":"02:52.565","Text":"That\u0027s the inversion done."},{"Start":"02:52.565 ","End":"02:56.974","Text":"All that\u0027s left to do is add 1 to the result."},{"Start":"02:56.974 ","End":"03:02.020","Text":"We add 1 on the first column, we\u0027ll get 1."},{"Start":"03:02.020 ","End":"03:08.120","Text":"Next column. We\u0027re adding 0 and we will for all the subsequent columns,"},{"Start":"03:08.120 ","End":"03:15.600","Text":"so the number will stay the same in these columns because we\u0027re adding 0."},{"Start":"03:15.940 ","End":"03:22.210","Text":"The final result is our decimal number now encoded in two\u0027s complement binary."},{"Start":"03:22.210 ","End":"03:26.360","Text":"The advantage of two\u0027s complement over sign and magnitude and"},{"Start":"03:26.360 ","End":"03:30.965","Text":"one\u0027s complement is adding two\u0027s complement numbers is more straightforward."},{"Start":"03:30.965 ","End":"03:33.830","Text":"We don\u0027t have to apply any special rules depending on"},{"Start":"03:33.830 ","End":"03:37.160","Text":"whether the numbers are positive or negative or a mixture."},{"Start":"03:37.160 ","End":"03:39.320","Text":"Let\u0027s see an example of this where we add"},{"Start":"03:39.320 ","End":"03:44.255","Text":"a positive number to a negative number using 4 bits."},{"Start":"03:44.255 ","End":"03:46.940","Text":"1 plus 0 would be 1,"},{"Start":"03:46.940 ","End":"03:48.560","Text":"0 plus 1 would be 1,"},{"Start":"03:48.560 ","End":"03:50.450","Text":"1 plus 0, again, 1,"},{"Start":"03:50.450 ","End":"03:53.155","Text":"and 0 plus 1 would be 1."},{"Start":"03:53.155 ","End":"03:55.610","Text":"Let\u0027s check that that calculation gives us"},{"Start":"03:55.610 ","End":"03:59.225","Text":"the correct result by converting each line to decimal."},{"Start":"03:59.225 ","End":"04:03.665","Text":"The first line would give us 4 plus 1, which is 5."},{"Start":"04:03.665 ","End":"04:08.180","Text":"The second line would give us minus 6 because it\u0027s minus 8 plus"},{"Start":"04:08.180 ","End":"04:13.125","Text":"2 and the final line is minus 8 plus 7,"},{"Start":"04:13.125 ","End":"04:15.100","Text":"which will give us minus 1."},{"Start":"04:15.100 ","End":"04:18.470","Text":"If we had done a decimal addition of 5 to minus 6,"},{"Start":"04:18.470 ","End":"04:20.300","Text":"we would have got minus 1 as well,"},{"Start":"04:20.300 ","End":"04:26.270","Text":"so this binary addition of this pair of two\u0027s complement numbers seems to have worked."},{"Start":"04:26.270 ","End":"04:29.900","Text":"Let\u0027s try it again with 2 negative numbers."},{"Start":"04:29.900 ","End":"04:33.670","Text":"We know they\u0027re negative because the MSB in both bits is 1,"},{"Start":"04:33.670 ","End":"04:37.940","Text":"1 plus 1 is 1, 0,"},{"Start":"04:37.940 ","End":"04:41.290","Text":"so we put 0 in this column and carry 1 across,"},{"Start":"04:41.290 ","End":"04:44.460","Text":"0 plus 1 plus 1 is again 1,"},{"Start":"04:44.460 ","End":"04:47.625","Text":"0, so 0 in this column and 1 across,"},{"Start":"04:47.625 ","End":"04:51.420","Text":"1 plus 1 plus 1 would be 1, 1,"},{"Start":"04:51.420 ","End":"04:55.980","Text":"so 1 in this column and carry the 1 across and finally,"},{"Start":"04:55.980 ","End":"04:57.750","Text":"1 plus 1 plus 1 would, again,"},{"Start":"04:57.750 ","End":"05:03.259","Text":"be 1, 1, 1 in this column and we would carry the 1 across,"},{"Start":"05:03.259 ","End":"05:05.810","Text":"but it won\u0027t make a difference to the result,"},{"Start":"05:05.810 ","End":"05:08.615","Text":"so we\u0027ll ignore it here."},{"Start":"05:08.615 ","End":"05:14.115","Text":"Let\u0027s check that that calculation worked by converting each line to decimal, again."},{"Start":"05:14.115 ","End":"05:18.180","Text":"Minus 8 plus 5 is minus 3,"},{"Start":"05:18.180 ","End":"05:22.255","Text":"and minus 8 plus 7 is minus 1,"},{"Start":"05:22.255 ","End":"05:25.730","Text":"and minus 8 plus 4 will give us minus 4."},{"Start":"05:25.730 ","End":"05:27.530","Text":"We do the addition in decimal,"},{"Start":"05:27.530 ","End":"05:31.680","Text":"minus 3 plus minus 1 would indeed give us minus 4."},{"Start":"05:31.680 ","End":"05:37.584","Text":"Again, the binary addition has worked with our pair of two\u0027s complement numbers."},{"Start":"05:37.584 ","End":"05:41.920","Text":"Two\u0027s complement for its simplicity and adding numbers is therefore"},{"Start":"05:41.920 ","End":"05:47.285","Text":"the preferred encoding for signed binary numbers generally."},{"Start":"05:47.285 ","End":"05:51.550","Text":"Binary subtraction works in the same way as addition."},{"Start":"05:51.550 ","End":"05:55.505","Text":"If we took 1 away from 1, we\u0027d get 0."},{"Start":"05:55.505 ","End":"05:56.615","Text":"Again, in the next column,"},{"Start":"05:56.615 ","End":"05:58.655","Text":"1 minus 1 would give us 0,"},{"Start":"05:58.655 ","End":"06:00.890","Text":"1 minus 0 would just be 1,"},{"Start":"06:00.890 ","End":"06:04.385","Text":"and 0 minus 0 is just 0."},{"Start":"06:04.385 ","End":"06:07.130","Text":"If we were to convert each line to decimal,"},{"Start":"06:07.130 ","End":"06:09.665","Text":"we\u0027d see that the subtraction has worked."},{"Start":"06:09.665 ","End":"06:13.970","Text":"But we can actually do the subtraction using addition instead."},{"Start":"06:13.970 ","End":"06:20.720","Text":"We do this by turning the second number into a negative and then perform addition."},{"Start":"06:20.720 ","End":"06:28.545","Text":"We can convert 3 to minus 3 in two\u0027s complement by flipping the bits and adding 1."},{"Start":"06:28.545 ","End":"06:35.235","Text":"Now, we can add 7 and minus 3 instead of subtracting 3 from 7,"},{"Start":"06:35.235 ","End":"06:38.940","Text":"and we get 1, 0 for that first column."},{"Start":"06:38.940 ","End":"06:40.395","Text":"Carry the 1 across,"},{"Start":"06:40.395 ","End":"06:43.515","Text":"1 plus 0 plus 1 would give us 1, 0, again."},{"Start":"06:43.515 ","End":"06:47.460","Text":"Carry the 1 across, 1 plus 1 plus 1 would give us 1, 1,"},{"Start":"06:47.460 ","End":"06:51.240","Text":"so 1 in this column and 1 across and then finally,"},{"Start":"06:51.240 ","End":"06:54.600","Text":"1 plus 1 would give us 1, 0,"},{"Start":"06:54.600 ","End":"06:59.565","Text":"so 0 in this column and we discard the carried 1."},{"Start":"06:59.565 ","End":"07:01.860","Text":"That final line, 0, 1, 0,"},{"Start":"07:01.860 ","End":"07:05.500","Text":"0 would give us 4."},{"Start":"07:06.890 ","End":"07:09.950","Text":"Well, that\u0027s obviously the correct result, but you might ask,"},{"Start":"07:09.950 ","End":"07:14.930","Text":"why would you want to add a negative number instead of just subtracting?"},{"Start":"07:14.930 ","End":"07:18.650","Text":"Well, assuming we already have a digital circuit in place that can"},{"Start":"07:18.650 ","End":"07:22.655","Text":"convert a number into its negative two\u0027s complement equivalent,"},{"Start":"07:22.655 ","End":"07:25.550","Text":"we only need to create a digital circuit for"},{"Start":"07:25.550 ","End":"07:30.110","Text":"addition and we don\u0027t need 1 for subtraction."},{"Start":"07:30.110 ","End":"07:33.800","Text":"That potentially saves us money on components, on space,"},{"Start":"07:33.800 ","End":"07:39.380","Text":"on the circuit layout and electrical energy for the extra subtraction circuit."},{"Start":"07:39.380 ","End":"07:44.060","Text":"That\u0027s it on two\u0027s compliment and this topic in general,"},{"Start":"07:44.060 ","End":"07:49.340","Text":"so be sure to complete the exercises to consolidate your understanding."},{"Start":"07:49.340 ","End":"07:53.809","Text":"In this section, we learned how to distinguish between signed and unsigned integers,"},{"Start":"07:53.809 ","End":"07:58.040","Text":"interpret binary numbers in sign and magnitude or two\u0027s complement format."},{"Start":"07:58.040 ","End":"08:02.000","Text":"Convert a signed binary integer into its decimal equivalent."},{"Start":"08:02.000 ","End":"08:06.410","Text":"Perform calculations in binary with signed numbers."},{"Start":"08:06.410 ","End":"08:08.850","Text":"Thank you very much for watching."}],"ID":30243},{"Watched":false,"Name":"Exercise 1 parts A-C","Duration":"3m 28s","ChapterTopicVideoID":25523,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:03.000","Text":"Hello everybody, in this question we\u0027ve been asked to"},{"Start":"00:03.000 ","End":"00:05.940","Text":"take a binary number and state its value in"},{"Start":"00:05.940 ","End":"00:11.775","Text":"decimal when it\u0027s an unsigned number or a sign number using sign and magnitude,"},{"Start":"00:11.775 ","End":"00:14.370","Text":"or a sign number using two\u0027s complement."},{"Start":"00:14.370 ","End":"00:15.960","Text":"Let\u0027s go ahead and do that."},{"Start":"00:15.960 ","End":"00:19.500","Text":"In part a, we simply need to write out a number,"},{"Start":"00:19.500 ","End":"00:21.900","Text":"1, 0, 1, 0,"},{"Start":"00:21.900 ","End":"00:23.490","Text":"1, 1, 0,"},{"Start":"00:23.490 ","End":"00:29.400","Text":"and its bit values above each bit so we\u0027ve got 1, 2, 4,"},{"Start":"00:29.400 ","End":"00:31.785","Text":"8, 16,"},{"Start":"00:31.785 ","End":"00:36.225","Text":"32, and we stop at 64 because there\u0027s no more bits."},{"Start":"00:36.225 ","End":"00:40.250","Text":"We\u0027ve done many exercises like this already hopefully so far,"},{"Start":"00:40.250 ","End":"00:44.210","Text":"we know the answer to this is simply by adding together,"},{"Start":"00:44.210 ","End":"00:51.900","Text":"the digits where there is a 1. so we have 64 plus 16 plus 4 plus 2,"},{"Start":"00:51.900 ","End":"00:54.585","Text":"and that gives us 86."},{"Start":"00:54.585 ","End":"00:57.830","Text":"There we go answer for part a, done."},{"Start":"00:57.830 ","End":"00:59.310","Text":"For an unsigned number,"},{"Start":"00:59.310 ","End":"01:02.340","Text":"this bit pattern is 86 in decimal."},{"Start":"01:02.340 ","End":"01:03.750","Text":"Now the second part,"},{"Start":"01:03.750 ","End":"01:07.805","Text":"part b we\u0027ve got a signed number using sign and magnitude."},{"Start":"01:07.805 ","End":"01:09.605","Text":"For sign and magnitude,"},{"Start":"01:09.605 ","End":"01:13.130","Text":"we\u0027re still going to write the number out as we have done previously."},{"Start":"01:13.130 ","End":"01:18.245","Text":"However, the column values will stop at different point."},{"Start":"01:18.245 ","End":"01:20.660","Text":"Let\u0027s have a look up where we would stop,"},{"Start":"01:20.660 ","End":"01:30.435","Text":"we go 1 2 4 8 16 32 and in sign and magnitude this final bit here is the sign bit."},{"Start":"01:30.435 ","End":"01:32.015","Text":"It doesn\u0027t have a value,"},{"Start":"01:32.015 ","End":"01:36.740","Text":"is just indicating the sign is it a positive number or is it a negative number?"},{"Start":"01:36.740 ","End":"01:43.960","Text":"In this case, the answer is going to be 16 plus 4 plus 2,"},{"Start":"01:43.960 ","End":"01:46.250","Text":"which is obviously 22."},{"Start":"01:46.250 ","End":"01:49.790","Text":"But now we\u0027re indicating by the sign bit this is a negative number,"},{"Start":"01:49.790 ","End":"01:52.765","Text":"so the answer would actually be minus 22."},{"Start":"01:52.765 ","End":"01:56.015","Text":"That is indicated by a sign bit of 1,"},{"Start":"01:56.015 ","End":"01:58.580","Text":"where 1 indicates a negative number,"},{"Start":"01:58.580 ","End":"02:01.250","Text":"0 indicates a positive number."},{"Start":"02:01.250 ","End":"02:03.950","Text":"That\u0027s great, we\u0027ve done part a and b now,"},{"Start":"02:03.950 ","End":"02:08.280","Text":"a final part is using two\u0027s complement format."},{"Start":"02:08.280 ","End":"02:11.875","Text":"Once again we\u0027ll write out a number itself."},{"Start":"02:11.875 ","End":"02:16.130","Text":"However the interpretation will be different once again,"},{"Start":"02:16.130 ","End":"02:22.820","Text":"in this case, the final column will take on a different meaning."},{"Start":"02:22.820 ","End":"02:24.895","Text":"We got 1, 2, 4, 8,"},{"Start":"02:24.895 ","End":"02:27.460","Text":"16, 32, as before."},{"Start":"02:27.460 ","End":"02:29.525","Text":"However, this last column now,"},{"Start":"02:29.525 ","End":"02:32.750","Text":"rather than being 64 as it is for an unsigned number,"},{"Start":"02:32.750 ","End":"02:34.550","Text":"it will now be minus 64."},{"Start":"02:34.550 ","End":"02:37.430","Text":"The implications on the result therefore,"},{"Start":"02:37.430 ","End":"02:40.430","Text":"will be that we have minus 64,"},{"Start":"02:40.430 ","End":"02:45.430","Text":"to which we add 16 and 4 and 2."},{"Start":"02:45.430 ","End":"02:50.415","Text":"That will give us a final answer of minus 42,"},{"Start":"02:50.415 ","End":"02:52.505","Text":"if you add all those together,"},{"Start":"02:52.505 ","End":"02:54.725","Text":"you will get a result of minus 42."},{"Start":"02:54.725 ","End":"02:58.370","Text":"We\u0027re now done we\u0027ve converted the binary numbers we were asked in"},{"Start":"02:58.370 ","End":"03:03.590","Text":"the original question into decimal, but using unsigned,"},{"Start":"03:03.590 ","End":"03:05.630","Text":"signed with sign and magnitude,"},{"Start":"03:05.630 ","End":"03:10.010","Text":"and signed with two\u0027s complement and we see we get 3 very different results,"},{"Start":"03:10.010 ","End":"03:14.750","Text":"86 if it is a unsigned number,"},{"Start":"03:14.750 ","End":"03:16.870","Text":"we have minus 22,"},{"Start":"03:16.870 ","End":"03:23.045","Text":"if it is a signed number but using sign and magnitude and we have minus 42,"},{"Start":"03:23.045 ","End":"03:26.690","Text":"if it\u0027s again a signed number but this time using two\u0027s complement."},{"Start":"03:26.690 ","End":"03:29.370","Text":"That\u0027s it, see you in the next 1."}],"ID":26329},{"Watched":false,"Name":"Exercise 2 parts A-C","Duration":"7m 37s","ChapterTopicVideoID":25512,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:01.890","Text":"Hello again, everybody."},{"Start":"00:01.890 ","End":"00:06.085","Text":"In this question we\u0027ve been asked to take a binary number and, again,"},{"Start":"00:06.085 ","End":"00:08.940","Text":"state the value in decimal for an unsigned number,"},{"Start":"00:08.940 ","End":"00:12.900","Text":"a signed number using sign and magnitude and a signed number using two\u0027s complement."},{"Start":"00:12.900 ","End":"00:16.605","Text":"We\u0027ve seen this before, but we\u0027ve got a much longer number here now."},{"Start":"00:16.605 ","End":"00:18.570","Text":"We\u0027ll proceed as we did before,"},{"Start":"00:18.570 ","End":"00:22.529","Text":"but this time I suggest we break up into nibbles, the numbers."},{"Start":"00:22.529 ","End":"00:25.142","Text":"We\u0027ve got 12 bits exactly,"},{"Start":"00:25.142 ","End":"00:27.150","Text":"so I\u0027ll write those out as 3 nibbles."},{"Start":"00:27.150 ","End":"00:34.016","Text":"That\u0027s 1011, 0011,"},{"Start":"00:34.016 ","End":"00:36.540","Text":"and 0110, and then let\u0027s do as before,"},{"Start":"00:36.540 ","End":"00:38.460","Text":"the column headings for each of those bits"},{"Start":"00:38.460 ","End":"00:40.510","Text":"are the weightings whatever way you want to call it,"},{"Start":"00:40.510 ","End":"00:41.862","Text":"1, 2, 4,"},{"Start":"00:41.862 ","End":"00:44.923","Text":"8,16, 32, 64,"},{"Start":"00:44.923 ","End":"00:50.380","Text":"128, and then finally 256,"},{"Start":"00:50.380 ","End":"00:53.605","Text":"512, 1,024,"},{"Start":"00:53.605 ","End":"00:57.390","Text":"and that means that final bit is worth 2,048."},{"Start":"00:57.390 ","End":"01:01.040","Text":"We now just need to add these numbers together, however,"},{"Start":"01:01.040 ","End":"01:05.180","Text":"because this is quite a large set of numbers and multi digits,"},{"Start":"01:05.180 ","End":"01:09.035","Text":"and I\u0027m going to assume you don\u0027t have access to a calculator in the exam,"},{"Start":"01:09.035 ","End":"01:14.135","Text":"then let\u0027s stack those numbers on top of each other where everywhere where we have a 1,"},{"Start":"01:14.135 ","End":"01:18.770","Text":"so we start with 2,048 and we have a 512."},{"Start":"01:18.770 ","End":"01:22.760","Text":"Make sure you\u0027re very careful about aligning the digits here by the way,"},{"Start":"01:22.760 ","End":"01:28.465","Text":"very easy to make a mistake if you misalign the digits."},{"Start":"01:28.465 ","End":"01:32.820","Text":"You got 16, and then 4, and 2."},{"Start":"01:32.820 ","End":"01:35.195","Text":"We\u0027re going to add those together now."},{"Start":"01:35.195 ","End":"01:38.255","Text":"Let\u0027s go for it. 8 plus 2, 10."},{"Start":"01:38.255 ","End":"01:40.225","Text":"16, 18,"},{"Start":"01:40.225 ","End":"01:43.110","Text":"24, 28, 30."},{"Start":"01:43.110 ","End":"01:49.185","Text":"Let\u0027s put our 0 here and carry across the 3 to up here."},{"Start":"01:49.185 ","End":"01:51.790","Text":"Now we\u0027ve got 7 plus 1,"},{"Start":"01:51.790 ","End":"01:54.420","Text":"8, 13, 16,"},{"Start":"01:54.420 ","End":"01:57.210","Text":"17, so I put my 7 here,"},{"Start":"01:57.210 ","End":"02:00.300","Text":"and carry across my 1 to here."},{"Start":"02:00.300 ","End":"02:02.220","Text":"We\u0027ve got 1 plus 5,"},{"Start":"02:02.220 ","End":"02:04.305","Text":"6 plus 2 is 8,"},{"Start":"02:04.305 ","End":"02:05.760","Text":"so 8 here,"},{"Start":"02:05.760 ","End":"02:09.095","Text":"and then finally just bring down the 2, and there we go."},{"Start":"02:09.095 ","End":"02:10.460","Text":"We have our result."},{"Start":"02:10.460 ","End":"02:14.330","Text":"This bit pattern, if it represents an unsigned number,"},{"Start":"02:14.330 ","End":"02:16.910","Text":"is a 2,870 in decimal."},{"Start":"02:16.910 ","End":"02:18.305","Text":"We\u0027ve done the first part."},{"Start":"02:18.305 ","End":"02:22.700","Text":"Now, we already know that a sign number using sign and magnitude,"},{"Start":"02:22.700 ","End":"02:25.040","Text":"we have to give up one of the bits as the sign bit."},{"Start":"02:25.040 ","End":"02:29.240","Text":"It\u0027s going to be this bit here is now going to not be a number,"},{"Start":"02:29.240 ","End":"02:30.880","Text":"it\u0027s going to be a signed bit."},{"Start":"02:30.880 ","End":"02:35.210","Text":"We can use the previous answer to help us actually for the next part,"},{"Start":"02:35.210 ","End":"02:39.140","Text":"we can ignore this first digit now, we don\u0027t need it."},{"Start":"02:39.140 ","End":"02:41.195","Text":"The next one was 1,024 anyway."},{"Start":"02:41.195 ","End":"02:45.950","Text":"All we have to do now is to add all of these other numbers together where there is a 1."},{"Start":"02:45.950 ","End":"02:51.755","Text":"Let\u0027s go ahead and stack those as before on the right-hand side here."},{"Start":"02:51.755 ","End":"02:55.100","Text":"512, 256,"},{"Start":"02:55.100 ","End":"02:57.485","Text":"32, 16,"},{"Start":"02:57.485 ","End":"03:02.262","Text":"4 and 2, and so 8,"},{"Start":"03:02.262 ","End":"03:05.595","Text":"10, 16, 20, 2 is 22."},{"Start":"03:05.595 ","End":"03:09.150","Text":"2 there carry across 2,"},{"Start":"03:09.150 ","End":"03:11.850","Text":"3, 8, 11, 12."},{"Start":"03:11.850 ","End":"03:18.630","Text":"Let\u0027s put a 2 here and carry across the 1 goes up here,"},{"Start":"03:18.630 ","End":"03:21.870","Text":"we\u0027ve got 6 plus 2 is 8."},{"Start":"03:21.870 ","End":"03:25.105","Text":"Our final answer is 822."},{"Start":"03:25.105 ","End":"03:29.060","Text":"However, it\u0027s not our final answer in that this is"},{"Start":"03:29.060 ","End":"03:33.200","Text":"a signed magnitude number and we don\u0027t completely ignore this bit here,"},{"Start":"03:33.200 ","End":"03:35.060","Text":"which we said is not 2048, anymore."},{"Start":"03:35.060 ","End":"03:37.535","Text":"It\u0027s the sign bit, and because it\u0027s a 1,"},{"Start":"03:37.535 ","End":"03:39.566","Text":"this means that this is a negative number,"},{"Start":"03:39.566 ","End":"03:42.650","Text":"therefore, the result is minus 822."},{"Start":"03:42.650 ","End":"03:46.535","Text":"For the final part, I am going to write out the number again this time,"},{"Start":"03:46.535 ","End":"03:52.640","Text":"just to highlight the fact that the most significant bit has taken on a different value."},{"Start":"03:52.640 ","End":"03:56.210","Text":"It\u0027s not just indicating a negative or a positive number,"},{"Start":"03:56.210 ","End":"03:58.745","Text":"it\u0027s actually taking on a value."},{"Start":"03:58.745 ","End":"04:03.335","Text":"It\u0027s as before for the column values apart from the final column,"},{"Start":"04:03.335 ","End":"04:05.030","Text":"it\u0027s 1, 2, 4,"},{"Start":"04:05.030 ","End":"04:06.770","Text":"and 8, and by the way,"},{"Start":"04:06.770 ","End":"04:11.250","Text":"you should be getting used to these numbers and you can write them down even without"},{"Start":"04:11.250 ","End":"04:16.310","Text":"thinking as you become more and more familiar with powers of 2."},{"Start":"04:16.310 ","End":"04:19.580","Text":"But the last one here is now not 2,048,"},{"Start":"04:19.580 ","End":"04:22.280","Text":"it\u0027s minus 2,048,"},{"Start":"04:22.280 ","End":"04:23.945","Text":"just that 1 column."},{"Start":"04:23.945 ","End":"04:25.670","Text":"All the others are positive numbers."},{"Start":"04:25.670 ","End":"04:30.830","Text":"The implication for the answer then is that what we\u0027ve got here is"},{"Start":"04:30.830 ","End":"04:36.270","Text":"minus 2,048 plus whatever the rest of these bits are,"},{"Start":"04:36.270 ","End":"04:40.220","Text":"and we\u0027ve already worked that out in the previous answer, part b,"},{"Start":"04:40.220 ","End":"04:45.020","Text":"it was 822 when you added all these numbers together."},{"Start":"04:45.020 ","End":"04:50.160","Text":"What we want to do is we want to say minus 2,048 plus 822,"},{"Start":"04:50.160 ","End":"04:54.830","Text":"and that would be our result for part c. It\u0027s a little"},{"Start":"04:54.830 ","End":"04:59.690","Text":"bit harder to take a large negative number and add a positive number to it,"},{"Start":"04:59.690 ","End":"05:04.370","Text":"it\u0027s more intuitive to take a small number away from a larger number."},{"Start":"05:04.370 ","End":"05:07.580","Text":"We can do that. We can take 822 away"},{"Start":"05:07.580 ","End":"05:11.120","Text":"from 2,048 and then just change the sign at the end,"},{"Start":"05:11.120 ","End":"05:16.260","Text":"and that will be the same as doing minus 2,048 plus 822."},{"Start":"05:16.260 ","End":"05:19.005","Text":"Let me just show you that."},{"Start":"05:19.005 ","End":"05:24.675","Text":"If I put 2,048 not minus 2,048, but 2,048,"},{"Start":"05:24.675 ","End":"05:28.595","Text":"and then I subtract from that 822,"},{"Start":"05:28.595 ","End":"05:31.520","Text":"and then whatever the result is will change"},{"Start":"05:31.520 ","End":"05:35.585","Text":"the sign and it\u0027ll be the same as doing these operations here."},{"Start":"05:35.585 ","End":"05:38.165","Text":"Let\u0027s go ahead and do that."},{"Start":"05:38.165 ","End":"05:40.695","Text":"8 minus 2 is 6,"},{"Start":"05:40.695 ","End":"05:43.110","Text":"4 minus 2 is 2."},{"Start":"05:43.110 ","End":"05:49.125","Text":"Can\u0027t do 0 minus 8 so this becomes 1 and I bring a 1 across to here."},{"Start":"05:49.125 ","End":"05:52.665","Text":"10 minus 8 is 2,"},{"Start":"05:52.665 ","End":"05:53.970","Text":"and I\u0027ve got 1 here,"},{"Start":"05:53.970 ","End":"05:55.365","Text":"so I bring the 1 down."},{"Start":"05:55.365 ","End":"05:57.865","Text":"There is my answer 1,226."},{"Start":"05:57.865 ","End":"05:59.120","Text":"But as I said,"},{"Start":"05:59.120 ","End":"06:04.625","Text":"the result here is going to be minus 1,226 because this,"},{"Start":"06:04.625 ","End":"06:07.670","Text":"I did just as a nice convenience subtraction to"},{"Start":"06:07.670 ","End":"06:11.960","Text":"subtract the smaller number from the larger number,"},{"Start":"06:11.960 ","End":"06:13.610","Text":"it\u0027s the same as doing this operation,"},{"Start":"06:13.610 ","End":"06:15.080","Text":"but flip the sign at the end."},{"Start":"06:15.080 ","End":"06:18.590","Text":"It gives me minus 1,226."},{"Start":"06:18.590 ","End":"06:20.435","Text":"If you\u0027re unsure of that,"},{"Start":"06:20.435 ","End":"06:23.015","Text":"then if you look at the columns here,"},{"Start":"06:23.015 ","End":"06:25.310","Text":"you\u0027ve got minus 2,048,"},{"Start":"06:25.310 ","End":"06:26.645","Text":"and the rest of this,"},{"Start":"06:26.645 ","End":"06:30.530","Text":"you\u0027ve got 512 plus 256 plus some other numbers."},{"Start":"06:30.530 ","End":"06:36.660","Text":"You\u0027re looking at roughly 800 here being added on to minus 2,000."},{"Start":"06:36.660 ","End":"06:40.500","Text":"Minus 2,000 plus roughly 800 is roughly 1,200,"},{"Start":"06:40.500 ","End":"06:43.865","Text":"and you can see that numbers in that ballpark."},{"Start":"06:43.865 ","End":"06:45.725","Text":"It looks like we\u0027ve got it right."},{"Start":"06:45.725 ","End":"06:48.245","Text":"Final answer then."},{"Start":"06:48.245 ","End":"06:53.622","Text":"We\u0027ve been asked to work out what the pattern 1011, 0011,"},{"Start":"06:53.622 ","End":"06:58.130","Text":"0110 is as an unsigned number,"},{"Start":"06:58.130 ","End":"07:00.424","Text":"as a signed number using sign and magnitude,"},{"Start":"07:00.424 ","End":"07:02.825","Text":"and as a signed number using two\u0027s complement,"},{"Start":"07:02.825 ","End":"07:06.470","Text":"and once again, we see that they\u0027re very different results depending"},{"Start":"07:06.470 ","End":"07:10.505","Text":"on how we\u0027re interpreting them because it\u0027s"},{"Start":"07:10.505 ","End":"07:13.940","Text":"either indicating a positive digit"},{"Start":"07:13.940 ","End":"07:18.080","Text":"or we\u0027re using less of the bits to represent the number,"},{"Start":"07:18.080 ","End":"07:21.200","Text":"the magnitude, and then the final bit is used for the sign."},{"Start":"07:21.200 ","End":"07:23.930","Text":"Therefore, we got a very different result in part b and"},{"Start":"07:23.930 ","End":"07:27.005","Text":"then slightly different method for two\u0027s complement."},{"Start":"07:27.005 ","End":"07:29.210","Text":"The last bit does have a value,"},{"Start":"07:29.210 ","End":"07:30.830","Text":"but it\u0027s a negative value,"},{"Start":"07:30.830 ","End":"07:34.640","Text":"and then we add on all the positives to get a final result."},{"Start":"07:34.640 ","End":"07:38.370","Text":"There we go, thanks very much and I\u0027ll see you in the next one."}],"ID":26330},{"Watched":false,"Name":"Exercise 3 parts A-B","Duration":"3m 5s","ChapterTopicVideoID":25513,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:04.185","Text":"Hello, again, everyone. In this question we\u0027ve been asked to convert"},{"Start":"00:04.185 ","End":"00:08.429","Text":"the decimal number minus 256 into binary."},{"Start":"00:08.429 ","End":"00:10.070","Text":"We\u0027re going to do that in 2 ways."},{"Start":"00:10.070 ","End":"00:13.095","Text":"In part A, we\u0027re going to do it using sign and magnitude,"},{"Start":"00:13.095 ","End":"00:16.245","Text":"and in part B, we\u0027re going to use two\u0027s complement."},{"Start":"00:16.245 ","End":"00:20.430","Text":"In previous exercises, we saw that sign and"},{"Start":"00:20.430 ","End":"00:23.760","Text":"magnitude representation involves a bit"},{"Start":"00:23.760 ","End":"00:26.810","Text":"which is reserved for the sign and the rest of it is the magnitude,"},{"Start":"00:26.810 ","End":"00:28.440","Text":"so the first thing we\u0027ve got to do is work out"},{"Start":"00:28.440 ","End":"00:31.260","Text":"the magnitude and how many bits we\u0027re going to need for that."},{"Start":"00:31.260 ","End":"00:34.500","Text":"Let\u0027s start by writing out the bit values."},{"Start":"00:34.500 ","End":"00:39.005","Text":"We keep going essentially until we don\u0027t need any more bits."},{"Start":"00:39.005 ","End":"00:43.320","Text":"Initially, writes out 2 nibbles and I need to keep going."},{"Start":"00:43.320 ","End":"00:45.290","Text":"There is an extra nibble here,"},{"Start":"00:45.290 ","End":"00:48.950","Text":"that I\u0027ll need to go into in order to express 256."},{"Start":"00:48.950 ","End":"00:50.240","Text":"I don\u0027t need to go any further."},{"Start":"00:50.240 ","End":"00:52.580","Text":"This turns out to be a very convenient number,"},{"Start":"00:52.580 ","End":"00:59.085","Text":"it\u0027s just going to be a single 1 and all of the other bits are going to be 0."},{"Start":"00:59.085 ","End":"01:03.875","Text":"That\u0027s the magnitude part of it worked out, we\u0027ve got 256."},{"Start":"01:03.875 ","End":"01:10.610","Text":"It\u0027s a simple case in sign and magnitude of setting the value for the sign bit."},{"Start":"01:10.610 ","End":"01:13.460","Text":"In this case, it\u0027s a negative number,"},{"Start":"01:13.460 ","End":"01:15.815","Text":"so the sign bit is going to need to be 1,"},{"Start":"01:15.815 ","End":"01:19.880","Text":"and we\u0027ve completed the conversion for part A,"},{"Start":"01:19.880 ","End":"01:23.130","Text":"and the answer is 110000 and four more 0s after that as well."},{"Start":"01:23.150 ","End":"01:27.365","Text":"There we go."},{"Start":"01:27.365 ","End":"01:32.270","Text":"That\u0027s minus 256 in sign and magnitude, right there."},{"Start":"01:32.270 ","End":"01:35.990","Text":"For two\u0027s complement, it\u0027s slightly different method,"},{"Start":"01:35.990 ","End":"01:40.760","Text":"but we still have to start by using the column values."},{"Start":"01:40.760 ","End":"01:44.052","Text":"We know now how many columns we need,"},{"Start":"01:44.052 ","End":"01:46.445","Text":"but let\u0027s write those out again."},{"Start":"01:46.445 ","End":"01:49.470","Text":"Now, there we go and we\u0027ll stop there."},{"Start":"01:49.470 ","End":"01:54.920","Text":"What we\u0027re looking for is minus 256 because this is two\u0027s compliment,"},{"Start":"01:54.920 ","End":"01:58.985","Text":"the most significant bit becomes a negative value."},{"Start":"01:58.985 ","End":"02:00.380","Text":"We don\u0027t need a sign bit."},{"Start":"02:00.380 ","End":"02:03.935","Text":"We just made this most significant bit a negative number."},{"Start":"02:03.935 ","End":"02:06.890","Text":"Once again, this is very convenient because the number we\u0027re"},{"Start":"02:06.890 ","End":"02:10.670","Text":"actually looking for in this case is minus 256."},{"Start":"02:10.670 ","End":"02:13.465","Text":"That\u0027s simply going to be a 1 there,"},{"Start":"02:13.465 ","End":"02:17.885","Text":"and all the other binary digits are going to be 0."},{"Start":"02:17.885 ","End":"02:24.215","Text":"We are done, and the final answer is 1 and four 0s,"},{"Start":"02:24.215 ","End":"02:27.075","Text":"followed by another four 0s."},{"Start":"02:27.075 ","End":"02:32.255","Text":"That is minus 256 in two\u0027s complement."},{"Start":"02:32.255 ","End":"02:37.820","Text":"Supposing this very simple example we\u0027re really seeing here is the number of bits"},{"Start":"02:37.820 ","End":"02:40.115","Text":"required might be different for"},{"Start":"02:40.115 ","End":"02:44.430","Text":"the same number in sign and magnitude and two\u0027s complement."},{"Start":"02:44.430 ","End":"02:46.820","Text":"In the next exercise we\u0027ll use"},{"Start":"02:46.820 ","End":"02:50.120","Text":"a slightly longer number and we\u0027ll see what effect that has."},{"Start":"02:50.120 ","End":"02:53.405","Text":"But because we\u0027re on a power of 2 boundary here,"},{"Start":"02:53.405 ","End":"02:55.475","Text":"if this was quite a convenient number,"},{"Start":"02:55.475 ","End":"02:58.730","Text":"and we only needed 9 bits for two\u0027s complement,"},{"Start":"02:58.730 ","End":"03:02.955","Text":"but we actually needed 10 bits for sign and magnitude."},{"Start":"03:02.955 ","End":"03:06.280","Text":"That\u0027s us done, I\u0027ll see you in the next one."}],"ID":26331},{"Watched":false,"Name":"Exercise 4 parts A-B","Duration":"7m 52s","ChapterTopicVideoID":25514,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.970","Text":"Hey, everyone. In this question,"},{"Start":"00:02.970 ","End":"00:06.134","Text":"we\u0027ve been asked to convert a decimal number,"},{"Start":"00:06.134 ","End":"00:09.855","Text":"which is minus 1,394 into binary this time."},{"Start":"00:09.855 ","End":"00:12.560","Text":"Previously, we were looking at binary into decimal."},{"Start":"00:12.560 ","End":"00:14.130","Text":"The order is slightly different this time."},{"Start":"00:14.130 ","End":"00:19.080","Text":"In part a, we\u0027ve been asked to do two\u0027s complement and then part b, sign and magnitude."},{"Start":"00:19.080 ","End":"00:22.320","Text":"We were very lucky in that we had a quite convenient number last time."},{"Start":"00:22.320 ","End":"00:27.255","Text":"This is a longer number and it\u0027s not on a boundary of a power of 2."},{"Start":"00:27.255 ","End":"00:30.780","Text":"This is probably a bit more realistic on previous exercise."},{"Start":"00:30.780 ","End":"00:34.290","Text":"But we\u0027ll start by doing what we did before,"},{"Start":"00:34.290 ","End":"00:37.065","Text":"which is to work out how many columns we need."},{"Start":"00:37.065 ","End":"00:43.950","Text":"I\u0027m going to start out by writing the column values on the right-hand side,"},{"Start":"00:43.950 ","End":"00:48.440","Text":"and then working across 2 and stopping when we don\u0027t need any more columns."},{"Start":"00:48.440 ","End":"00:52.190","Text":"If we start with 1 and we basically just keep going"},{"Start":"00:52.190 ","End":"00:58.190","Text":"until we\u0027ve reached a number that is larger than the number we\u0027re looking to represent."},{"Start":"00:58.190 ","End":"01:02.850","Text":"256, 512, 1,024."},{"Start":"01:02.850 ","End":"01:04.838","Text":"We\u0027re now getting close,"},{"Start":"01:04.838 ","End":"01:07.820","Text":"and 2,048 is indeed larger"},{"Start":"01:07.820 ","End":"01:12.125","Text":"than the number that we\u0027re looking to represent, which is 1394."},{"Start":"01:12.125 ","End":"01:18.775","Text":"What I\u0027m going to do now is I\u0027m going to write out where I will need a 1 and obviously,"},{"Start":"01:18.775 ","End":"01:19.955","Text":"leave the others blank."},{"Start":"01:19.955 ","End":"01:22.235","Text":"Now this is a negative number."},{"Start":"01:22.235 ","End":"01:27.560","Text":"This most significant bit here in two\u0027s complement would be minus 2,048."},{"Start":"01:27.560 ","End":"01:30.050","Text":"But I\u0027m going to show you a method that, for the moment,"},{"Start":"01:30.050 ","End":"01:32.420","Text":"ignores that and we\u0027ll convert"},{"Start":"01:32.420 ","End":"01:36.610","Text":"the number first into one\u0027s complement and then into two\u0027s complement."},{"Start":"01:36.610 ","End":"01:39.420","Text":"For reasons that will become apparent,"},{"Start":"01:39.420 ","End":"01:41.280","Text":"it\u0027s a much easier method."},{"Start":"01:41.280 ","End":"01:44.556","Text":"First of all, let\u0027s try and represent the positive number,"},{"Start":"01:44.556 ","End":"01:47.330","Text":"1,394 in the bits that we have available."},{"Start":"01:47.330 ","End":"01:48.890","Text":"In order to do that,"},{"Start":"01:48.890 ","End":"01:50.510","Text":"I will need this column,"},{"Start":"01:50.510 ","End":"01:52.460","Text":"so I\u0027ll need 1,024."},{"Start":"01:52.460 ","End":"01:55.490","Text":"The number I originally started with,"},{"Start":"01:55.490 ","End":"01:58.985","Text":"I need to subtract 1,024 from it."},{"Start":"01:58.985 ","End":"02:03.205","Text":"That\u0027s 0 there, 7 there,"},{"Start":"02:03.205 ","End":"02:08.075","Text":"and 3 there, so I\u0027ve got 370 left to make up. I\u0027ll carry on."},{"Start":"02:08.075 ","End":"02:10.050","Text":"I don\u0027t need the 512 column,"},{"Start":"02:10.050 ","End":"02:11.555","Text":"so I put a 0 there."},{"Start":"02:11.555 ","End":"02:16.820","Text":"I do need the 256 column because 370 is greater than 256."},{"Start":"02:16.820 ","End":"02:18.185","Text":"I put a 1 there,"},{"Start":"02:18.185 ","End":"02:22.775","Text":"and now I have to subtract the 256 from 370."},{"Start":"02:22.775 ","End":"02:28.675","Text":"I\u0027ll need to borrow 1 from here because I can\u0027t subtract 6 from 0."},{"Start":"02:28.675 ","End":"02:31.860","Text":"Let\u0027s take 1 from here."},{"Start":"02:31.860 ","End":"02:34.150","Text":"10 minus 6 would be 4,"},{"Start":"02:34.150 ","End":"02:37.806","Text":"6 now minus 5 would be 1,"},{"Start":"02:37.806 ","End":"02:40.350","Text":"and 3 minus 2 is 1."},{"Start":"02:40.350 ","End":"02:41.970","Text":"Now I\u0027ve got 114."},{"Start":"02:41.970 ","End":"02:46.450","Text":"Carrying on. I don\u0027t need 128 because 114 is less than 128."},{"Start":"02:46.450 ","End":"02:52.273","Text":"I do need 64, but I\u0027m going to have to now subtract 64 from 114,"},{"Start":"02:52.273 ","End":"02:53.690","Text":"and you get the idea."},{"Start":"02:53.690 ","End":"02:57.005","Text":"You just carry on in this manner."},{"Start":"02:57.005 ","End":"03:00.860","Text":"50 is indeed greater than 32."},{"Start":"03:00.860 ","End":"03:03.140","Text":"I will need a 32."},{"Start":"03:03.140 ","End":"03:10.235","Text":"Therefore, subtract 32 from 50 to work out what I need the remaining bits. That\u0027s 18."},{"Start":"03:10.235 ","End":"03:12.965","Text":"Now I can carry on inspecting each bit and comparing it,"},{"Start":"03:12.965 ","End":"03:15.980","Text":"but I can actually see now because I\u0027ve very few bits"},{"Start":"03:15.980 ","End":"03:19.520","Text":"left that 18 can be made up of 16 and 2."},{"Start":"03:19.520 ","End":"03:22.650","Text":"I\u0027ll just write a 1 where 16 is,"},{"Start":"03:22.650 ","End":"03:25.070","Text":"and a 1 where 2 is,"},{"Start":"03:25.070 ","End":"03:27.140","Text":"the other bits are going to be 0."},{"Start":"03:27.140 ","End":"03:30.770","Text":"There\u0027s my bit pattern now for 1,394."},{"Start":"03:30.770 ","End":"03:33.860","Text":"You\u0027ll notice I\u0027ve ignored this most significant bit."},{"Start":"03:33.860 ","End":"03:35.510","Text":"I\u0027m assuming these are all positive."},{"Start":"03:35.510 ","End":"03:37.835","Text":"They\u0027re not because this is a two\u0027s complement number."},{"Start":"03:37.835 ","End":"03:39.500","Text":"This one would be a negative number."},{"Start":"03:39.500 ","End":"03:43.545","Text":"But for now, let\u0027s just assume it\u0027s positive and I\u0027m going to put a 0 there."},{"Start":"03:43.545 ","End":"03:48.545","Text":"This representation is positive 1,394."},{"Start":"03:48.545 ","End":"03:50.930","Text":"Let\u0027s get it into a negative number now,"},{"Start":"03:50.930 ","End":"03:52.970","Text":"and the method for that is to,"},{"Start":"03:52.970 ","End":"03:56.525","Text":"first of all, take the one\u0027s complement of all these bits."},{"Start":"03:56.525 ","End":"03:57.710","Text":"To do the one\u0027s complement,"},{"Start":"03:57.710 ","End":"04:01.745","Text":"you simply just flip all the bits to the opposite value."},{"Start":"04:01.745 ","End":"04:03.980","Text":"Where you had a 0, you turn it into a 1."},{"Start":"04:03.980 ","End":"04:05.960","Text":"Where you have a 1, you turn it into a 0."},{"Start":"04:05.960 ","End":"04:09.320","Text":"Let\u0027s do that. There we go."},{"Start":"04:09.320 ","End":"04:11.780","Text":"Now, to turn this into two\u0027s complement,"},{"Start":"04:11.780 ","End":"04:14.953","Text":"you simply add 1 to the number,"},{"Start":"04:14.953 ","End":"04:17.780","Text":"and addition we haven\u0027t really covered yet in the exercises,"},{"Start":"04:17.780 ","End":"04:20.150","Text":"but it\u0027s a simple enough process."},{"Start":"04:20.150 ","End":"04:22.925","Text":"It\u0027s the same as it is for a decimal number."},{"Start":"04:22.925 ","End":"04:25.670","Text":"You just add the columns together."},{"Start":"04:25.670 ","End":"04:27.117","Text":"If they fit in the column, great."},{"Start":"04:27.117 ","End":"04:29.600","Text":"If not, you carry over to the next column."},{"Start":"04:29.600 ","End":"04:32.900","Text":"What we\u0027re trying to add here is a number 1,"},{"Start":"04:32.900 ","End":"04:37.025","Text":"which if I write it out in full with all of these bits here,"},{"Start":"04:37.025 ","End":"04:39.830","Text":"would be represented in this way."},{"Start":"04:39.830 ","End":"04:47.405","Text":"I want to add these two numbers together and see if I can add the columns 1 plus 1 is 2."},{"Start":"04:47.405 ","End":"04:50.480","Text":"I can\u0027t write 2 because this is a binary number."},{"Start":"04:50.480 ","End":"04:51.800","Text":"I\u0027d have to write 1, 0,"},{"Start":"04:51.800 ","End":"04:53.895","Text":"which is the binary equivalent of 2."},{"Start":"04:53.895 ","End":"04:56.180","Text":"I can\u0027t even write those in 1 column,"},{"Start":"04:56.180 ","End":"04:59.600","Text":"so I write the 0 and I carry the 1 across."},{"Start":"04:59.600 ","End":"05:02.900","Text":"Now I had 1 plus 0 plus 0."},{"Start":"05:02.900 ","End":"05:04.390","Text":"That is just 1."},{"Start":"05:04.390 ","End":"05:07.710","Text":"I can write the 1 there and it fits in 1 column and then just carry on"},{"Start":"05:07.710 ","End":"05:11.450","Text":"across all of these other columns doing the same thing."},{"Start":"05:11.450 ","End":"05:14.150","Text":"1 plus 0 is 1, 1 plus 0 is 1,"},{"Start":"05:14.150 ","End":"05:21.030","Text":"0 plus 0 is 0, 0, 0, 1, 0, 1, 0, 1."},{"Start":"05:22.180 ","End":"05:26.150","Text":"I now have the number in two\u0027s complement."},{"Start":"05:26.150 ","End":"05:30.860","Text":"This is the representation of minus 1,394."},{"Start":"05:30.860 ","End":"05:33.095","Text":"Here\u0027s positive 1,394."},{"Start":"05:33.095 ","End":"05:35.600","Text":"I\u0027ve taken the one\u0027s complement, flipping all the bits,"},{"Start":"05:35.600 ","End":"05:38.930","Text":"and then adding 1 gives me the two\u0027s complement."},{"Start":"05:38.930 ","End":"05:43.055","Text":"I now have minus 1394 in this bit pattern here."},{"Start":"05:43.055 ","End":"05:44.930","Text":"If you look at the column values,"},{"Start":"05:44.930 ","End":"05:48.795","Text":"this would be minus 2,048."},{"Start":"05:48.795 ","End":"05:50.568","Text":"If I write it up here,"},{"Start":"05:50.568 ","End":"05:52.970","Text":"and this number now therefore,"},{"Start":"05:52.970 ","End":"05:57.075","Text":"becomes minus 2,048 with all of these bits added on."},{"Start":"05:57.075 ","End":"06:00.300","Text":"If you look at that, we\u0027ve got 500 there, 128 there,"},{"Start":"06:00.300 ","End":"06:06.140","Text":"so roughly 600, and we\u0027re starting off with minus 2,000 and adding 600 to it."},{"Start":"06:06.140 ","End":"06:09.420","Text":"You\u0027ll see that will give us minus 1,400 roughly,"},{"Start":"06:09.420 ","End":"06:10.800","Text":"which is where we\u0027re at."},{"Start":"06:10.800 ","End":"06:15.230","Text":"It looks like with just a very rough check that we\u0027ve got the right number there."},{"Start":"06:15.230 ","End":"06:17.840","Text":"We have done the first part,"},{"Start":"06:17.840 ","End":"06:20.975","Text":"and so let\u0027s just write it out formally the answer,"},{"Start":"06:20.975 ","End":"06:26.705","Text":"what is minus 1,394 in two\u0027s complement would be as so."},{"Start":"06:26.705 ","End":"06:32.415","Text":"That\u0027s 101010001110."},{"Start":"06:32.415 ","End":"06:36.930","Text":"That is minus 1,394 in two\u0027s complement."},{"Start":"06:36.930 ","End":"06:41.300","Text":"Part b, we\u0027ve been asked to convert it to sign and magnitude format."},{"Start":"06:41.300 ","End":"06:42.770","Text":"It\u0027s actually very straightforward."},{"Start":"06:42.770 ","End":"06:44.900","Text":"We already had 1,394,"},{"Start":"06:44.900 ","End":"06:46.730","Text":"which was this bit pattern here."},{"Start":"06:46.730 ","End":"06:49.880","Text":"All we need to do now is add a sign bit to it and we\u0027ll"},{"Start":"06:49.880 ","End":"06:53.795","Text":"have minus 1,394 in sign and magnitude."},{"Start":"06:53.795 ","End":"06:56.060","Text":"If I just look at the magnitude part of"},{"Start":"06:56.060 ","End":"06:59.695","Text":"this first number where we worked out positive 1,394,"},{"Start":"06:59.695 ","End":"07:01.560","Text":"I could just make use of that."},{"Start":"07:01.560 ","End":"07:09.120","Text":"It\u0027s 101 0111 0010."},{"Start":"07:09.120 ","End":"07:10.190","Text":"There was my initial number,"},{"Start":"07:10.190 ","End":"07:17.450","Text":"but I need a sign bit here because this is a negative number that is going to be here,"},{"Start":"07:17.450 ","End":"07:20.510","Text":"which is going to be a 1 for my sign bit."},{"Start":"07:20.510 ","End":"07:22.820","Text":"There is my final answer then."},{"Start":"07:22.820 ","End":"07:31.660","Text":"Nice and easy because I\u0027ve already done most of the work, 1101 0111 0010."},{"Start":"07:31.660 ","End":"07:38.164","Text":"You\u0027ll see the bit pattern for minus 1,394 in two\u0027s complement"},{"Start":"07:38.164 ","End":"07:44.705","Text":"looks radically different to the bit pattern for minus 1,394 in sign and magnitude,"},{"Start":"07:44.705 ","End":"07:49.025","Text":"but rest assured those are the correct representation."},{"Start":"07:49.025 ","End":"07:50.825","Text":"That\u0027s this exercise done."},{"Start":"07:50.825 ","End":"07:53.370","Text":"Thanks very much and I\u0027ll see you in the next one."}],"ID":26332},{"Watched":false,"Name":"Exercise 5 parts A-B","Duration":"4m 10s","ChapterTopicVideoID":25515,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:01.590","Text":"Hey, welcome back everyone."},{"Start":"00:01.590 ","End":"00:04.410","Text":"In this question, we\u0027ve been asked to state the range of"},{"Start":"00:04.410 ","End":"00:08.970","Text":"a 12-bit number using two\u0027s complement and sign and magnitude."},{"Start":"00:08.970 ","End":"00:13.380","Text":"We\u0027re talking here about a signed number and there is a formula we"},{"Start":"00:13.380 ","End":"00:17.925","Text":"can use to work out a range and you simply have to memorize this for the exams."},{"Start":"00:17.925 ","End":"00:23.070","Text":"The formula is, so it\u0027s 2 to the n minus 1,"},{"Start":"00:23.070 ","End":"00:26.010","Text":"I should say on the negative side,"},{"Start":"00:26.010 ","End":"00:30.000","Text":"up to 2 to the n minus 1 on the positive side,"},{"Start":"00:30.000 ","End":"00:32.070","Text":"but we have to subtract 1 from that,"},{"Start":"00:32.070 ","End":"00:33.570","Text":"and I\u0027ll explain why in a moment."},{"Start":"00:33.570 ","End":"00:34.830","Text":"If you have a calculator,"},{"Start":"00:34.830 ","End":"00:39.105","Text":"this is a simple case of taking the n minus 1 part,"},{"Start":"00:39.105 ","End":"00:43.565","Text":"putting 2 to the power of that and then the same on the positive side."},{"Start":"00:43.565 ","End":"00:46.070","Text":"But if you don\u0027t have a calculator,"},{"Start":"00:46.070 ","End":"00:48.110","Text":"what we have to work out is,"},{"Start":"00:48.110 ","End":"00:51.350","Text":"how do we find out what 2^11 is."},{"Start":"00:51.350 ","End":"00:54.740","Text":"We can use the method we\u0027ve been using up until now to do that."},{"Start":"00:54.740 ","End":"00:57.230","Text":"Let\u0027s start writing out digits from"},{"Start":"00:57.230 ","End":"01:02.150","Text":"0-12 and 0 is where we start and that\u0027s important that we start at 0,"},{"Start":"01:02.150 ","End":"01:07.411","Text":"so don\u0027t forget to do that, 0,"},{"Start":"01:07.411 ","End":"01:08.614","Text":"1, 2, 3,"},{"Start":"01:08.614 ","End":"01:10.221","Text":"4, 5, 6, 7,"},{"Start":"01:10.221 ","End":"01:11.627","Text":"8, 9, 10,"},{"Start":"01:11.627 ","End":"01:13.340","Text":"11, and 12."},{"Start":"01:13.340 ","End":"01:15.320","Text":"Let me stress again,"},{"Start":"01:15.320 ","End":"01:17.060","Text":"you need to start from 0."},{"Start":"01:17.060 ","End":"01:22.440","Text":"Then what we need to do is right underneath starting with 1,"},{"Start":"01:22.440 ","End":"01:25.140","Text":"because 2^0 is 1,"},{"Start":"01:25.140 ","End":"01:26.680","Text":"that\u0027s really all you need to remember."},{"Start":"01:26.680 ","End":"01:29.260","Text":"Anything to the power of 0 is 1, obviously."},{"Start":"01:29.260 ","End":"01:32.755","Text":"Then we just keep moving across and doubling each time."},{"Start":"01:32.755 ","End":"01:36.935","Text":"So we have 2 there, 4, 8,1 6, 32, 64, 128, 256, 512,"},{"Start":"01:36.935 ","End":"01:37.940","Text":"1,024,"},{"Start":"01:44.630 ","End":"01:47.210","Text":"2,048,"},{"Start":"01:47.210 ","End":"01:49.990","Text":"and then finally 4,096."},{"Start":"01:49.990 ","End":"01:52.990","Text":"What we\u0027ve been asked to work out"},{"Start":"01:52.990 ","End":"01:56.470","Text":"is the range of a 12-bit number and we\u0027re going so therefore"},{"Start":"01:56.470 ","End":"02:03.330","Text":"2^11 minus 2^11 and therefore we\u0027re going to need this digit here, 2^11 there."},{"Start":"02:03.330 ","End":"02:04.760","Text":"That\u0027s the number that we want,"},{"Start":"02:04.760 ","End":"02:06.990","Text":"so it\u0027s 2,048, we know,"},{"Start":"02:06.990 ","End":"02:10.985","Text":"is 2^11 and that\u0027s the negative side then done,"},{"Start":"02:10.985 ","End":"02:12.560","Text":"for the positive side,"},{"Start":"02:12.560 ","End":"02:15.240","Text":"it\u0027s going to be 2,048,"},{"Start":"02:15.240 ","End":"02:19.670","Text":"what we\u0027re going to subtract from that 1 so the final answer will therefore"},{"Start":"02:19.670 ","End":"02:25.225","Text":"be minus 2,048 to 2,047,"},{"Start":"02:25.225 ","End":"02:27.935","Text":"and we\u0027re done with part A."},{"Start":"02:27.935 ","End":"02:29.430","Text":"For sign and magnitude,"},{"Start":"02:29.430 ","End":"02:32.865","Text":"the formula is slightly different, it\u0027s this,"},{"Start":"02:32.865 ","End":"02:34.455","Text":"2 to the n minus 1,"},{"Start":"02:34.455 ","End":"02:39.740","Text":"minus 1 and then the positive part is the same as two\u0027s complement."},{"Start":"02:39.740 ","End":"02:42.005","Text":"So it\u0027s actually symmetrical,"},{"Start":"02:42.005 ","End":"02:45.740","Text":"which actually easier to remember this formula and as the previous one,"},{"Start":"02:45.740 ","End":"02:48.210","Text":"because we are getting minus 2 to the n minus 1,"},{"Start":"02:48.210 ","End":"02:51.090","Text":"minus 1 up to 2 to the n minus 1, minus 1,"},{"Start":"02:51.090 ","End":"02:53.630","Text":"so it just looks a little bit neater to the eyes,"},{"Start":"02:53.630 ","End":"02:54.830","Text":"slightly easier to remember."},{"Start":"02:54.830 ","End":"02:57.515","Text":"So you might want to remember it this way and then"},{"Start":"02:57.515 ","End":"03:01.115","Text":"just know that the two\u0027s complement version is lop-sided."},{"Start":"03:01.115 ","End":"03:05.580","Text":"The negative half doesn\u0027t have minus 1 subtracted from it."},{"Start":"03:05.580 ","End":"03:09.049","Text":"In this case then we\u0027ve got the same number as before."},{"Start":"03:09.049 ","End":"03:12.110","Text":"We know 2^11 is 2,048,"},{"Start":"03:12.110 ","End":"03:16.655","Text":"so we simply need to write here 2,048 minus 1,"},{"Start":"03:16.655 ","End":"03:20.930","Text":"and it\u0027s going to go up to positive 2,048 minus 1,"},{"Start":"03:20.930 ","End":"03:22.985","Text":"so the final answer, therefore,"},{"Start":"03:22.985 ","End":"03:28.935","Text":"is minus 2,047 up to positive 2,047,"},{"Start":"03:28.935 ","End":"03:32.330","Text":"and we have now completed the question and what"},{"Start":"03:32.330 ","End":"03:35.810","Text":"we\u0027re seeing here is basically that a two\u0027s complement number has"},{"Start":"03:35.810 ","End":"03:39.770","Text":"a slightly larger range by 1 and the reason for that is"},{"Start":"03:39.770 ","End":"03:44.705","Text":"because when you are encoding a number as sign and magnitude,"},{"Start":"03:44.705 ","End":"03:46.220","Text":"which we are in part B,"},{"Start":"03:46.220 ","End":"03:50.840","Text":"you\u0027re seeing that the number 0 has two representations,"},{"Start":"03:50.840 ","End":"03:52.640","Text":"minus 0 and positive 0,"},{"Start":"03:52.640 ","End":"03:54.260","Text":"it sounds crazy, but obviously,"},{"Start":"03:54.260 ","End":"03:56.390","Text":"the magnitude part occupies some of"},{"Start":"03:56.390 ","End":"03:59.630","Text":"the number and the final most significant bit is the sign bit."},{"Start":"03:59.630 ","End":"04:03.110","Text":"So you can actually have a bit pattern of plus 0 and minus 0 and"},{"Start":"04:03.110 ","End":"04:06.710","Text":"that explains why you\u0027ve got 1 less than you have with two\u0027s complement."},{"Start":"04:06.710 ","End":"04:09.900","Text":"So that\u0027s it for this question. I\u0027ll see you for the next one."}],"ID":26333},{"Watched":false,"Name":"Exercise 6","Duration":"5m 4s","ChapterTopicVideoID":25516,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:05.490","Text":"Hello, everyone. In this question we\u0027ve been asked to find out how many bits would be"},{"Start":"00:05.490 ","End":"00:11.580","Text":"required to store a decimal number minus 32,000 in two\u0027s complement representation."},{"Start":"00:11.580 ","End":"00:15.645","Text":"So this is really a disguised version of the range question,"},{"Start":"00:15.645 ","End":"00:19.710","Text":"and we\u0027re going to need to have a slightly different formula this time,"},{"Start":"00:19.710 ","End":"00:22.490","Text":"and that\u0027s to work out the number of bits required,"},{"Start":"00:22.490 ","End":"00:25.485","Text":"and that formula looks like this."},{"Start":"00:25.485 ","End":"00:32.220","Text":"The number of bits b is log base 2 of p,"},{"Start":"00:32.220 ","End":"00:33.930","Text":"the number we\u0027re trying to find out."},{"Start":"00:33.930 ","End":"00:36.818","Text":"The reason I\u0027ve called it p is,"},{"Start":"00:36.818 ","End":"00:42.030","Text":"for the moment, we are going to treat this as a positive number."},{"Start":"00:42.030 ","End":"00:46.125","Text":"So let\u0027s just look at 32,000 not minus 32,000."},{"Start":"00:46.125 ","End":"00:51.770","Text":"If you type this into your calculator log base 2 of 32,000,"},{"Start":"00:51.770 ","End":"00:54.155","Text":"you will get an answer of"},{"Start":"00:54.155 ","End":"01:01.560","Text":"14.96578 and some other digits which I\u0027m not going to write down,"},{"Start":"01:01.560 ","End":"01:05.510","Text":"because we are not going to include this fractional part."},{"Start":"01:05.510 ","End":"01:07.550","Text":"We\u0027re simply going to ignore it."},{"Start":"01:07.550 ","End":"01:09.327","Text":"The reason for that is,"},{"Start":"01:09.327 ","End":"01:11.300","Text":"whatever number you\u0027re trying to find out,"},{"Start":"01:11.300 ","End":"01:15.785","Text":"p, is going to fall generally between 2 powers of 2."},{"Start":"01:15.785 ","End":"01:18.155","Text":"If it was exactly 14,"},{"Start":"01:18.155 ","End":"01:23.700","Text":"you\u0027ll find that 2^14 is 16384,"},{"Start":"01:23.700 ","End":"01:26.370","Text":"if it was exactly 15, the next power up,"},{"Start":"01:26.370 ","End":"01:29.925","Text":"it would be 32,768,"},{"Start":"01:29.925 ","End":"01:33.980","Text":"and that number is generally going to fall somewhere in-between those 2."},{"Start":"01:33.980 ","End":"01:36.230","Text":"It might be exactly 16,384,"},{"Start":"01:36.230 ","End":"01:38.240","Text":"it might be exactly 32,768,"},{"Start":"01:38.240 ","End":"01:40.160","Text":"but the chances are it\u0027s going to be somewhere in-between."},{"Start":"01:40.160 ","End":"01:42.658","Text":"Hence, why we ignore the fractional part,"},{"Start":"01:42.658 ","End":"01:45.680","Text":"and we simply add one on to the end."},{"Start":"01:45.680 ","End":"01:50.495","Text":"Our final answer for b is going to be 15,"},{"Start":"01:50.495 ","End":"01:55.220","Text":"except it\u0027s not really our final answer because this is just for a positive number."},{"Start":"01:55.220 ","End":"01:57.260","Text":"In summary, for this first bit,"},{"Start":"01:57.260 ","End":"02:01.805","Text":"we just needed to work out how many bits do we need for 32,000,"},{"Start":"02:01.805 ","End":"02:03.930","Text":"and we\u0027ve worked out that it\u0027s 15,"},{"Start":"02:03.930 ","End":"02:07.625","Text":"by taking the log of 32,000 to base 2,"},{"Start":"02:07.625 ","End":"02:11.070","Text":"ignoring the fractional part by adding 1 on,"},{"Start":"02:11.070 ","End":"02:14.330","Text":"so that we fall somewhere within the range."},{"Start":"02:14.330 ","End":"02:17.087","Text":"That\u0027s the first part done."},{"Start":"02:17.087 ","End":"02:20.920","Text":"What we now need to do is to think about it in terms of a negative number."},{"Start":"02:20.920 ","End":"02:24.170","Text":"You\u0027ll recall that the formula for the range"},{"Start":"02:24.170 ","End":"02:27.740","Text":"of a two\u0027s complement number looks like this,"},{"Start":"02:27.740 ","End":"02:35.500","Text":"it\u0027s minus 2 to the n minus 1 up to positive 2 to the n minus 1,"},{"Start":"02:35.500 ","End":"02:37.335","Text":"with 1 taken away."},{"Start":"02:37.335 ","End":"02:41.780","Text":"That number n is the number of bits that we\u0027re going to need."},{"Start":"02:41.780 ","End":"02:46.475","Text":"We have already worked out to get 32,000 we need 15."},{"Start":"02:46.475 ","End":"02:53.285","Text":"If we were to write this out minus 2^15 up to 2^15 with 1 taken off,"},{"Start":"02:53.285 ","End":"03:03.043","Text":"you\u0027ll find that that range is minus 32,768 up to 32,767."},{"Start":"03:03.043 ","End":"03:05.510","Text":"So it is 15 that we need up here."},{"Start":"03:05.510 ","End":"03:08.840","Text":"Then what we need to do finally to work out how many bits we"},{"Start":"03:08.840 ","End":"03:12.360","Text":"need for a two\u0027s complement number is to simply say,"},{"Start":"03:12.360 ","End":"03:16.215","Text":"well, we know that n minus 1 is 15,"},{"Start":"03:16.215 ","End":"03:19.296","Text":"therefore, n must be 16."},{"Start":"03:19.296 ","End":"03:22.640","Text":"So we\u0027ve now worked out how many bits we need to"},{"Start":"03:22.640 ","End":"03:26.770","Text":"represent a number minus 32,000 in two\u0027s complement."},{"Start":"03:26.770 ","End":"03:30.365","Text":"Now, what if you don\u0027t have access to a calculator in the exam?"},{"Start":"03:30.365 ","End":"03:33.619","Text":"Well, we can still work out how many bits will be required,"},{"Start":"03:33.619 ","End":"03:36.320","Text":"but it\u0027s going to be a bit more long-winded."},{"Start":"03:36.320 ","End":"03:38.060","Text":"We\u0027ve done similar things previously,"},{"Start":"03:38.060 ","End":"03:44.510","Text":"so what we do is we start out by writing out the digit 1 and then moving to the left,"},{"Start":"03:44.510 ","End":"03:48.117","Text":"just doubling each time as we have done many times before."},{"Start":"03:48.117 ","End":"03:49.880","Text":"So eventually, we\u0027ll get to"},{"Start":"03:49.880 ","End":"03:53.990","Text":"a number that\u0027s larger than the number that we\u0027re looking for."},{"Start":"03:53.990 ","End":"03:59.350","Text":"But it\u0027s going to take us a while to get there, 2048,"},{"Start":"03:59.350 ","End":"04:06.245","Text":"4096, 8192 getting close now, 16384, 32768."},{"Start":"04:06.245 ","End":"04:10.715","Text":"So we\u0027ve now got a number that\u0027s larger than 32,000,"},{"Start":"04:10.715 ","End":"04:15.725","Text":"and, of course, in two\u0027s complement this last column is going to be a negative number,"},{"Start":"04:15.725 ","End":"04:22.533","Text":"but we will be able to express the range minus 32,768 up to positive 32,767,"},{"Start":"04:22.533 ","End":"04:26.000","Text":"because if you add all of these digits together and this bit is a 0,"},{"Start":"04:26.000 ","End":"04:27.965","Text":"it will be 32,767."},{"Start":"04:27.965 ","End":"04:34.430","Text":"So we now simply have to count the number of bits that we\u0027ve got that we\u0027ve counted out,"},{"Start":"04:34.430 ","End":"04:37.265","Text":"and it turns out to be 16,"},{"Start":"04:37.265 ","End":"04:42.087","Text":"and that\u0027s exactly what we calculated when we had a calculator."},{"Start":"04:42.087 ","End":"04:48.300","Text":"So we\u0027ve got our final answer,"},{"Start":"04:48.300 ","End":"04:50.600","Text":"the number of bits required is 16,"},{"Start":"04:50.600 ","End":"04:55.215","Text":"which we worked out here by just using accounting method,"},{"Start":"04:55.215 ","End":"05:00.974","Text":"and here we worked out using 2 formulae and a calculator."},{"Start":"05:00.974 ","End":"05:05.340","Text":"So there we go. That\u0027s your answer to this one. I\u0027ll see you in the next one."}],"ID":26334},{"Watched":false,"Name":"Exercise 7 part A","Duration":"3m 24s","ChapterTopicVideoID":25517,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:05.759","Text":"Hello, again. In this video we are going to perform a binary addition."},{"Start":"00:05.759 ","End":"00:10.410","Text":"We\u0027ve been told to perform the addition with 12 bits in the operation"},{"Start":"00:10.410 ","End":"00:15.450","Text":"and to use unsigned numbers in each of these parts of the question."},{"Start":"00:15.450 ","End":"00:21.270","Text":"We start with an 8-bit unsigned number and we\u0027re adding to another 8-bit unsigned number."},{"Start":"00:21.270 ","End":"00:23.220","Text":"Given that it\u0027s in 12 bits,"},{"Start":"00:23.220 ","End":"00:28.095","Text":"we should start by padding 4 bits at the beginning of each number."},{"Start":"00:28.095 ","End":"00:30.180","Text":"Obviously, that doesn\u0027t make a difference to"},{"Start":"00:30.180 ","End":"00:32.910","Text":"the number itself because they are leading 0s."},{"Start":"00:32.910 ","End":"00:36.500","Text":"There\u0027s our first number and adding to that again,"},{"Start":"00:36.500 ","End":"00:41.480","Text":"we\u0027re going to pad the first 4 bits because it is only an 8-bit number that we\u0027ve been"},{"Start":"00:41.480 ","End":"00:46.940","Text":"given and align all the digits underneath for the second binary number."},{"Start":"00:46.940 ","End":"00:49.670","Text":"There we go. If we add those two together,"},{"Start":"00:49.670 ","End":"00:54.274","Text":"we use the same method for adding as we would do for decimal numbers,"},{"Start":"00:54.274 ","End":"00:56.546","Text":"just doing a columnar addition."},{"Start":"00:56.546 ","End":"00:59.700","Text":"Each time the number can be represented in 1 column,"},{"Start":"00:59.700 ","End":"01:01.730","Text":"we just write the number, if it cannot,"},{"Start":"01:01.730 ","End":"01:04.010","Text":"we carry over to the next column."},{"Start":"01:04.010 ","End":"01:08.060","Text":"Now it\u0027s worth writing down at the side of your paper when you\u0027re doing an exam,"},{"Start":"01:08.060 ","End":"01:10.550","Text":"what exactly all of the combinations are,"},{"Start":"01:10.550 ","End":"01:13.100","Text":"because it\u0027s very easy to get mixed up."},{"Start":"01:13.100 ","End":"01:17.250","Text":"For example 0 plus 1 is 1 as we know,"},{"Start":"01:17.250 ","End":"01:18.810","Text":"and so it\u0027s 1 plus 0,"},{"Start":"01:18.810 ","End":"01:21.570","Text":"but 1 plus 1 is 1,"},{"Start":"01:21.570 ","End":"01:24.005","Text":"0, we\u0027re obviously in binary."},{"Start":"01:24.005 ","End":"01:27.065","Text":"When we write it down, we need to write down as 1, 0."},{"Start":"01:27.065 ","End":"01:29.600","Text":"Similarly, if we have a carry bit involved,"},{"Start":"01:29.600 ","End":"01:32.420","Text":"1 plus 1 plus 1 is 1, 1."},{"Start":"01:32.420 ","End":"01:35.090","Text":"Now, it may seem obvious now, but as I say,"},{"Start":"01:35.090 ","End":"01:39.410","Text":"it\u0027s very easy for the brain to misfire and for you to make a silly mistake."},{"Start":"01:39.410 ","End":"01:42.590","Text":"Let\u0027s go through this particular calculation now."},{"Start":"01:42.590 ","End":"01:45.440","Text":"What we\u0027re looking at is 0 plus 0,"},{"Start":"01:45.440 ","End":"01:48.280","Text":"which we know is 0, 0 plus 1 is 1,"},{"Start":"01:48.280 ","End":"01:50.850","Text":"1 plus 0 is 1,"},{"Start":"01:50.850 ","End":"01:54.038","Text":"1 plus 0 is 1 again,"},{"Start":"01:54.038 ","End":"01:55.665","Text":"and 1 again,"},{"Start":"01:55.665 ","End":"02:02.480","Text":"as we keep moving in this direction and then all these remaining digits are 0 plus 0,"},{"Start":"02:02.480 ","End":"02:04.405","Text":"so we know they\u0027re all going to be 0s."},{"Start":"02:04.405 ","End":"02:06.360","Text":"I\u0027ll just fill those in 1 go."},{"Start":"02:06.360 ","End":"02:08.795","Text":"We now have a 12-bit number,"},{"Start":"02:08.795 ","End":"02:11.795","Text":"which is the answer to this question."},{"Start":"02:11.795 ","End":"02:13.900","Text":"The result is that."},{"Start":"02:13.900 ","End":"02:17.090","Text":"If we wanted to do a quick crosscheck here,"},{"Start":"02:17.090 ","End":"02:20.570","Text":"you could get a calculator out and work out,"},{"Start":"02:20.570 ","End":"02:22.655","Text":"if you are allowed a calculator that is,"},{"Start":"02:22.655 ","End":"02:25.715","Text":"or you could simply use the method that we have always done,"},{"Start":"02:25.715 ","End":"02:28.250","Text":"which is to label the columns."},{"Start":"02:28.250 ","End":"02:30.290","Text":"I don\u0027t need to go any further because these are all 0s,"},{"Start":"02:30.290 ","End":"02:32.950","Text":"but if we were to add together these columns,"},{"Start":"02:32.950 ","End":"02:37.165","Text":"you\u0027d find that this value comes out to be 172 in"},{"Start":"02:37.165 ","End":"02:43.190","Text":"decimal and the one below it is 64 plus 16 is 80, 82."},{"Start":"02:43.190 ","End":"02:47.615","Text":"If you add those two numbers together, you\u0027ll get 254."},{"Start":"02:47.615 ","End":"02:50.630","Text":"Actually, we can see this number here"},{"Start":"02:50.630 ","End":"02:54.920","Text":"is all of the bits in the 8-bit number apart from 1,"},{"Start":"02:54.920 ","End":"02:57.350","Text":"and that would actually give us 254."},{"Start":"02:57.350 ","End":"02:59.945","Text":"We know we\u0027ve done our calculation correctly."},{"Start":"02:59.945 ","End":"03:02.870","Text":"Now, be careful about writing this at the side"},{"Start":"03:02.870 ","End":"03:05.750","Text":"of your paper if you are using this as a cross-check."},{"Start":"03:05.750 ","End":"03:09.230","Text":"You do want to make it obvious that you have used binary for"},{"Start":"03:09.230 ","End":"03:11.570","Text":"the addition not cheated and gone"},{"Start":"03:11.570 ","End":"03:14.675","Text":"straight to a decimal number and another decimal number,"},{"Start":"03:14.675 ","End":"03:18.290","Text":"and then added them up to produce a final decimal number,"},{"Start":"03:18.290 ","End":"03:20.320","Text":"which you\u0027ve then converted into binary."},{"Start":"03:20.320 ","End":"03:25.890","Text":"You need to make clear that you answered this question by doing a binary addition."}],"ID":26335},{"Watched":false,"Name":"Exercise 7 part B","Duration":"3m 13s","ChapterTopicVideoID":25518,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.320 ","End":"00:03.090","Text":"Continuing on with part B."},{"Start":"00:03.090 ","End":"00:04.500","Text":"Now, we\u0027ve, again,"},{"Start":"00:04.500 ","End":"00:07.185","Text":"got two 8-bit numbers."},{"Start":"00:07.185 ","End":"00:10.920","Text":"We will start by writing them out on top of each other."},{"Start":"00:10.920 ","End":"00:18.495","Text":"The first number is 1011010101."},{"Start":"00:18.495 ","End":"00:25.020","Text":"The number we\u0027re adding to it is 11011011."},{"Start":"00:25.020 ","End":"00:28.440","Text":"Now once again, this is a 12-bit number we\u0027ve been told in the question,"},{"Start":"00:28.440 ","End":"00:33.885","Text":"so we should pad the four 0s in front for both of those numbers."},{"Start":"00:33.885 ","End":"00:38.435","Text":"Let\u0027s go ahead and calculate out each of those columns,"},{"Start":"00:38.435 ","End":"00:41.915","Text":"1 plus 1 is going to be 1, 0."},{"Start":"00:41.915 ","End":"00:50.235","Text":"So 0 in this column and now we carry across 1 to this column here."},{"Start":"00:50.235 ","End":"00:54.785","Text":"Now, 1 plus 0 plus 1 gives us 1, 0 again."},{"Start":"00:54.785 ","End":"01:00.485","Text":"We write the 0 once again here and carry across a 1 up to here,"},{"Start":"01:00.485 ","End":"01:02.615","Text":"1 plus 1 plus 0,"},{"Start":"01:02.615 ","End":"01:04.850","Text":"once again, is 1, 0."},{"Start":"01:04.850 ","End":"01:08.690","Text":"So 0 here, carry across the 1 up to here,"},{"Start":"01:08.690 ","End":"01:10.910","Text":"1 plus 0 plus 1, again,"},{"Start":"01:10.910 ","End":"01:12.680","Text":"0 in this column,"},{"Start":"01:12.680 ","End":"01:15.800","Text":"1 carried across to here."},{"Start":"01:15.800 ","End":"01:18.500","Text":"This time we\u0027ve got 1 plus 1 plus 1."},{"Start":"01:18.500 ","End":"01:21.900","Text":"If we look at in a little 8 memoir on the side here,"},{"Start":"01:21.900 ","End":"01:24.590","Text":"1 plus 1 plus 1 is actually 1, 1."},{"Start":"01:24.590 ","End":"01:30.925","Text":"What we need to do is to write a 1 in this column and carry a 1 across to here."},{"Start":"01:30.925 ","End":"01:34.035","Text":"Now we have 1 plus 0 plus 0,"},{"Start":"01:34.035 ","End":"01:35.710","Text":"which is just 1."},{"Start":"01:35.710 ","End":"01:38.315","Text":"No carry to worry about this time,"},{"Start":"01:38.315 ","End":"01:40.353","Text":"1 plus 1 again is 1,"},{"Start":"01:40.353 ","End":"01:43.490","Text":"0, so 0 here."},{"Start":"01:43.490 ","End":"01:46.665","Text":"Carry across a 1,"},{"Start":"01:46.665 ","End":"01:49.980","Text":"and 1 plus 1 plus 1 is,"},{"Start":"01:49.980 ","End":"01:52.650","Text":"as we know again, 1, 1."},{"Start":"01:52.650 ","End":"01:56.175","Text":"We have a 1 in this column,"},{"Start":"01:56.175 ","End":"02:00.765","Text":"and we carry across a 1 to here."},{"Start":"02:00.765 ","End":"02:05.230","Text":"Now, 1 plus 0 plus 0 gives us 1."},{"Start":"02:05.230 ","End":"02:08.735","Text":"All the remaining columns are just 0,"},{"Start":"02:08.735 ","End":"02:11.865","Text":"so going to end up at 0."},{"Start":"02:11.865 ","End":"02:13.670","Text":"Here is our final answer."},{"Start":"02:13.670 ","End":"02:18.260","Text":"These two binary numbers added together will give us this number."},{"Start":"02:18.260 ","End":"02:21.785","Text":"Once again, we could check this if we wanted to."},{"Start":"02:21.785 ","End":"02:30.795","Text":"I\u0027m just going to tell you that this first number here works out to 213 and denary,"},{"Start":"02:30.795 ","End":"02:35.120","Text":"this number below it is 219."},{"Start":"02:35.120 ","End":"02:40.685","Text":"If you worked out the result by putting the column headings above each number,"},{"Start":"02:40.685 ","End":"02:45.495","Text":"you find that the result works out to be 432,"},{"Start":"02:45.495 ","End":"02:51.830","Text":"and that is indeed what we should expect if we add together 213 and 219."},{"Start":"02:51.830 ","End":"02:56.240","Text":"Once again, a cross-check here has proved that addition has worked correctly."},{"Start":"02:56.240 ","End":"02:58.670","Text":"Once again, I\u0027m going to caveat this by saying,"},{"Start":"02:58.670 ","End":"03:02.150","Text":"be careful to not give the impression that you\u0027ve just added"},{"Start":"03:02.150 ","End":"03:07.145","Text":"up to denary numbers and produce a denary response and then written out as binary."},{"Start":"03:07.145 ","End":"03:08.540","Text":"If you\u0027re going to do a cross-check,"},{"Start":"03:08.540 ","End":"03:13.500","Text":"do it somewhere else just to not give the impression that you\u0027ve cheated."}],"ID":26336},{"Watched":false,"Name":"Exercise 7 part C","Duration":"3m 5s","ChapterTopicVideoID":25519,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.490","Text":"In the final part of the question, Part C,"},{"Start":"00:02.490 ","End":"00:03.585","Text":"we\u0027re going to add 2,"},{"Start":"00:03.585 ","End":"00:06.420","Text":"10-bit numbers this time together."},{"Start":"00:06.420 ","End":"00:08.220","Text":"We still are going to produce"},{"Start":"00:08.220 ","End":"00:12.390","Text":"a 12-bit result because we are doing all of the operations using 12 bits."},{"Start":"00:12.390 ","End":"00:14.895","Text":"Let\u0027s write out those 2 numbers,"},{"Start":"00:14.895 ","End":"00:23.565","Text":"starting with the one on top, which is 1100111011."},{"Start":"00:23.565 ","End":"00:33.120","Text":"Then we\u0027ve got 1000101010."},{"Start":"00:33.120 ","End":"00:35.190","Text":"This time, because we\u0027ve got 10 bits already,"},{"Start":"00:35.190 ","End":"00:40.190","Text":"we only need to pad with 2 0s at the front of each of those numbers."},{"Start":"00:40.190 ","End":"00:44.260","Text":"We can proceed to add together all the columns as before."},{"Start":"00:44.260 ","End":"00:46.920","Text":"1 plus 0 is 1,"},{"Start":"00:46.920 ","End":"00:48.855","Text":"there is no carry to deal with that."},{"Start":"00:48.855 ","End":"00:50.790","Text":"1 plus 1 is 1, 0,"},{"Start":"00:50.790 ","End":"00:52.430","Text":"so we put a 0 here,"},{"Start":"00:52.430 ","End":"00:54.970","Text":"carry across a 1 to here,"},{"Start":"00:54.970 ","End":"00:57.660","Text":"1 plus 0 plus 0 is 1,"},{"Start":"00:57.660 ","End":"01:00.060","Text":"1 plus 1 is 1, 0,"},{"Start":"01:00.060 ","End":"01:03.360","Text":"again, so 0 here carry across a 1."},{"Start":"01:03.360 ","End":"01:06.960","Text":"1 plus 1 plus 0 is again 1, 0.,"},{"Start":"01:06.960 ","End":"01:09.240","Text":"so 0 here,"},{"Start":"01:09.240 ","End":"01:11.940","Text":"carry a 1 across to here."},{"Start":"01:11.940 ","End":"01:15.750","Text":"1 plus 1 plus 1 is 1, 1."},{"Start":"01:15.750 ","End":"01:18.750","Text":"This time, we\u0027ve got a whole 1 here,"},{"Start":"01:18.750 ","End":"01:21.840","Text":"and we carry a 1 over to here."},{"Start":"01:21.840 ","End":"01:24.975","Text":"1 plus 0 plus 0 is 1,"},{"Start":"01:24.975 ","End":"01:27.060","Text":"0 plus 0 is 0,"},{"Start":"01:27.060 ","End":"01:29.055","Text":"1 plus 0 is 1,"},{"Start":"01:29.055 ","End":"01:31.530","Text":"1 plus 1 is 1, 0."},{"Start":"01:31.530 ","End":"01:33.090","Text":"So 0 here,"},{"Start":"01:33.090 ","End":"01:34.875","Text":"carry across the 1,"},{"Start":"01:34.875 ","End":"01:39.150","Text":"1 plus 0 plus 0 is a 1 here."},{"Start":"01:39.150 ","End":"01:43.630","Text":"Then finally, two 0s added together gives us a leading 0 there."},{"Start":"01:43.630 ","End":"01:48.060","Text":"We\u0027ve got our final result, which is this."},{"Start":"01:48.060 ","End":"01:51.825","Text":"This number is an 11-bit number this time."},{"Start":"01:51.825 ","End":"01:54.775","Text":"We\u0027ve added these two 10-bit numbers and produced an 11-bit number."},{"Start":"01:54.775 ","End":"01:57.280","Text":"If we were to do a cross check,"},{"Start":"01:57.280 ","End":"02:03.610","Text":"we would find that this first number here comes out to be 827 tannery."},{"Start":"02:03.610 ","End":"02:08.060","Text":"The second number comes out to be 554 tannery."},{"Start":"02:08.060 ","End":"02:13.995","Text":"This result, if you work it out, is 1381 tannery."},{"Start":"02:13.995 ","End":"02:15.780","Text":"These 2 numbers added together do,"},{"Start":"02:15.780 ","End":"02:18.350","Text":"in fact, produce 1381."},{"Start":"02:18.350 ","End":"02:21.410","Text":"Once again, we know we\u0027ve done the correct calculation. There we go."},{"Start":"02:21.410 ","End":"02:27.740","Text":"We\u0027ve done three additions in 12 bits using unsigned binary numbers here."},{"Start":"02:27.740 ","End":"02:29.870","Text":"In each case, we were dealing with"},{"Start":"02:29.870 ","End":"02:33.605","Text":"quite convenient numbers because there was enough space to deal with the result."},{"Start":"02:33.605 ","End":"02:35.825","Text":"The first one being two 8-bit numbers,"},{"Start":"02:35.825 ","End":"02:37.925","Text":"that produced an 8-bit number of results."},{"Start":"02:37.925 ","End":"02:40.610","Text":"The second one also was two 8-bit numbers,"},{"Start":"02:40.610 ","End":"02:42.965","Text":"but this time we produced a 9-bit result."},{"Start":"02:42.965 ","End":"02:47.465","Text":"The final one, two 10-bit numbers produced an 11-bit results."},{"Start":"02:47.465 ","End":"02:49.100","Text":"In the next exercise,"},{"Start":"02:49.100 ","End":"02:54.005","Text":"we\u0027ll see how we can use signed and unsigned numbers."},{"Start":"02:54.005 ","End":"02:56.345","Text":"If we use a signed number,"},{"Start":"02:56.345 ","End":"02:58.490","Text":"we can add it to another signed number,"},{"Start":"02:58.490 ","End":"03:01.385","Text":"and using that, we can do subtraction."},{"Start":"03:01.385 ","End":"03:05.790","Text":"We\u0027ll see that in the next question. See you then."}],"ID":26337},{"Watched":false,"Name":"Exercise 8 part A","Duration":"4m 40s","ChapterTopicVideoID":25520,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:01.875","Text":"Welcome back everyone."},{"Start":"00:01.875 ","End":"00:03.120","Text":"In this question,"},{"Start":"00:03.120 ","End":"00:09.794","Text":"we\u0027ve been asked to subtract one number from another using two\u0027s complement and addition."},{"Start":"00:09.794 ","End":"00:14.130","Text":"The way we do that is we take the second number,"},{"Start":"00:14.130 ","End":"00:16.560","Text":"the one that we\u0027re going to subtract from the first number,"},{"Start":"00:16.560 ","End":"00:19.890","Text":"and we turn it into a negative representation using"},{"Start":"00:19.890 ","End":"00:22.980","Text":"two\u0027s complement and then we can simply add the two numbers"},{"Start":"00:22.980 ","End":"00:25.785","Text":"together and the result will be the same as"},{"Start":"00:25.785 ","End":"00:30.105","Text":"subtracting this number from that one because we turned this into a negative number."},{"Start":"00:30.105 ","End":"00:32.240","Text":"Let\u0027s see how that works."},{"Start":"00:32.240 ","End":"00:35.535","Text":"The first thing we\u0027ve got to do is to take the number that we\u0027re going to"},{"Start":"00:35.535 ","End":"00:38.690","Text":"subtract and pad it to the relevant number of bits,"},{"Start":"00:38.690 ","End":"00:40.010","Text":"in this case 8."},{"Start":"00:40.010 ","End":"00:45.170","Text":"Let\u0027s write the number out first of all, 11011."},{"Start":"00:45.170 ","End":"00:46.760","Text":"That\u0027s only 5 bits,"},{"Start":"00:46.760 ","End":"00:51.355","Text":"so we need three 0s in front of it so there\u0027s our number as 8 bits now."},{"Start":"00:51.355 ","End":"00:55.010","Text":"Now what we\u0027re going to do is we\u0027re going to take a one\u0027s complement."},{"Start":"00:55.010 ","End":"00:57.600","Text":"What that means is everywhere where there is 0,"},{"Start":"00:57.600 ","End":"00:59.100","Text":"we\u0027re going to flip it into a 1,"},{"Start":"00:59.100 ","End":"01:00.150","Text":"everywhere there\u0027s a 1,"},{"Start":"01:00.150 ","End":"01:01.965","Text":"we\u0027re going to flip it into 0."},{"Start":"01:01.965 ","End":"01:04.740","Text":"This number will look like this,"},{"Start":"01:04.740 ","End":"01:07.695","Text":"0 turns into 1 so it\u0027s this 1 and this 1,"},{"Start":"01:07.695 ","End":"01:11.000","Text":"this 1 turns into 0 as does this 1."},{"Start":"01:11.000 ","End":"01:12.733","Text":"This 0 turns into 1,"},{"Start":"01:12.733 ","End":"01:15.060","Text":"these 1s turn into 0s,"},{"Start":"01:15.060 ","End":"01:17.665","Text":"so we\u0027ve now got the one\u0027s complement,"},{"Start":"01:17.665 ","End":"01:20.330","Text":"and to get into two\u0027s complement now this number"},{"Start":"01:20.330 ","End":"01:23.030","Text":"and a negative representation of what we originally had,"},{"Start":"01:23.030 ","End":"01:24.725","Text":"we simply add 1 to it."},{"Start":"01:24.725 ","End":"01:28.850","Text":"The 1 goes there but I\u0027m going to put all zeros in so"},{"Start":"01:28.850 ","End":"01:33.305","Text":"that they will align up and so reads correctly."},{"Start":"01:33.305 ","End":"01:38.520","Text":"Let\u0027s go ahead and add 1 to the one\u0027s complement here,"},{"Start":"01:38.520 ","End":"01:40.965","Text":"and we\u0027ll get 1 there,"},{"Start":"01:40.965 ","End":"01:43.080","Text":"0 there, 1 there,"},{"Start":"01:43.080 ","End":"01:45.000","Text":"0 there, 0 there,"},{"Start":"01:45.000 ","End":"01:48.941","Text":"1 there, 1 there, and 1 there."},{"Start":"01:48.941 ","End":"01:52.430","Text":"There we have it. This number now is a"},{"Start":"01:52.430 ","End":"01:57.725","Text":"negative of this number and it turns out this number here is 27."},{"Start":"01:57.725 ","End":"02:02.474","Text":"If you work it out using a bit positions minus 1 to 8,"},{"Start":"02:02.474 ","End":"02:04.166","Text":"64, 32,"},{"Start":"02:04.166 ","End":"02:07.395","Text":"skip the 16, skip the 8,"},{"Start":"02:07.395 ","End":"02:09.620","Text":"add 4, skip the 2, add 1,"},{"Start":"02:09.620 ","End":"02:12.725","Text":"you\u0027ll find that that work out to be minus 27."},{"Start":"02:12.725 ","End":"02:14.165","Text":"Now we\u0027ve got our number,"},{"Start":"02:14.165 ","End":"02:16.610","Text":"we\u0027re going to take it across to"},{"Start":"02:16.610 ","End":"02:20.510","Text":"the other side and we\u0027re going to add together this number"},{"Start":"02:20.510 ","End":"02:23.590","Text":"and then the negative number we just worked out"},{"Start":"02:23.590 ","End":"02:27.200","Text":"and that will be the same as subtracting this number from that number."},{"Start":"02:27.200 ","End":"02:28.850","Text":"Let\u0027s have a look."},{"Start":"02:28.850 ","End":"02:34.790","Text":"Let\u0027s start out by writing the original number 1010111."},{"Start":"02:34.790 ","End":"02:36.575","Text":"You\u0027ll notice there\u0027s only 7 bits,"},{"Start":"02:36.575 ","End":"02:38.510","Text":"so we need to pad it with a 0."},{"Start":"02:38.510 ","End":"02:40.730","Text":"There\u0027s our first number and then a"},{"Start":"02:40.730 ","End":"02:43.400","Text":"second number which we turn into a negative we\u0027re going to"},{"Start":"02:43.400 ","End":"02:52.340","Text":"write below it 11100101 and we\u0027re going to add those two together,"},{"Start":"02:52.340 ","End":"02:57.560","Text":"which is the same as subtracting because we\u0027ve turned this into"},{"Start":"02:57.560 ","End":"03:03.240","Text":"a negative number and we know how to do addition now,"},{"Start":"03:03.240 ","End":"03:04.365","Text":"so let\u0027s do this."},{"Start":"03:04.365 ","End":"03:06.450","Text":"1 plus 1 is 1, 0,"},{"Start":"03:06.450 ","End":"03:10.727","Text":"so 0 here and 1 gets carried across to there."},{"Start":"03:10.727 ","End":"03:13.350","Text":"1 plus 1 plus 0 is again 1,"},{"Start":"03:13.350 ","End":"03:17.070","Text":"0 so 0 goes here and 1 gets carried across."},{"Start":"03:17.070 ","End":"03:20.640","Text":"1 plus 1 plus 1 is 1, 1,"},{"Start":"03:20.640 ","End":"03:22.755","Text":"so 1 in this column,"},{"Start":"03:22.755 ","End":"03:24.600","Text":"carry 1 across to here,"},{"Start":"03:24.600 ","End":"03:27.990","Text":"1 plus 0 plus 0 is 1."},{"Start":"03:27.990 ","End":"03:30.750","Text":"That\u0027s the first 4 bits dealt with now."},{"Start":"03:30.750 ","End":"03:33.435","Text":"1 plus 0 is 1,"},{"Start":"03:33.435 ","End":"03:35.350","Text":"0 plus 1 is 1,"},{"Start":"03:35.350 ","End":"03:37.050","Text":"1 plus 1 is 1, 0,"},{"Start":"03:37.050 ","End":"03:38.940","Text":"so 0 here,"},{"Start":"03:38.940 ","End":"03:41.055","Text":"carry the 1 across to here."},{"Start":"03:41.055 ","End":"03:43.050","Text":"1 plus 0 plus 1 is 1, 0,"},{"Start":"03:43.050 ","End":"03:46.255","Text":"so 0 there, carry 1 across."},{"Start":"03:46.255 ","End":"03:47.870","Text":"However, this will give us"},{"Start":"03:47.870 ","End":"03:51.290","Text":"a 9th bit if we were to bring this down will be 1 plus 0 plus 0,"},{"Start":"03:51.290 ","End":"03:53.270","Text":"which would give us a ninth bit down here."},{"Start":"03:53.270 ","End":"03:57.525","Text":"We discard that leftmost bit it\u0027s not needed for the result."},{"Start":"03:57.525 ","End":"04:02.960","Text":"What we\u0027re left with then our answer is 00111100,"},{"Start":"04:02.960 ","End":"04:09.300","Text":"and that, if we were to work out these bit patterns,"},{"Start":"04:09.300 ","End":"04:12.225","Text":"is actually in decimal."},{"Start":"04:12.225 ","End":"04:15.035","Text":"That number works out to be 60."},{"Start":"04:15.035 ","End":"04:18.320","Text":"If we look at how original number that we started with,"},{"Start":"04:18.320 ","End":"04:23.105","Text":"that number there turns out to be 87 in decimal,"},{"Start":"04:23.105 ","End":"04:26.195","Text":"and this number is 27,"},{"Start":"04:26.195 ","End":"04:29.725","Text":"but we turned it into minus 27 here."},{"Start":"04:29.725 ","End":"04:33.169","Text":"If you were to add 87 and minus 27,"},{"Start":"04:33.169 ","End":"04:40.980","Text":"you would indeed just end up with 60 so it looks like we\u0027ve done the first part right."}],"ID":26338},{"Watched":false,"Name":"Exercise 8 part B","Duration":"4m 26s","ChapterTopicVideoID":25521,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:06.690","Text":"For Part B, we\u0027ve got a 7-bit number now being subtracted from our 8-bit number."},{"Start":"00:06.690 ","End":"00:09.600","Text":"Let\u0027s do exactly as we did before,"},{"Start":"00:09.600 ","End":"00:14.790","Text":"write out the number 1101001,"},{"Start":"00:14.790 ","End":"00:16.740","Text":"but we\u0027re going to have to pad it with 1,"},{"Start":"00:16.740 ","End":"00:19.290","Text":"0 at the beginning so that we\u0027ve now got 8 bits,"},{"Start":"00:19.290 ","End":"00:24.150","Text":"then we\u0027re going to take the one\u0027s compliment by flipping all the bits."},{"Start":"00:24.150 ","End":"00:26.610","Text":"This 0 becomes a 1,"},{"Start":"00:26.610 ","End":"00:28.440","Text":"these two 1 becomes 0,"},{"Start":"00:28.440 ","End":"00:30.105","Text":"this 0 becomes a 1,"},{"Start":"00:30.105 ","End":"00:32.160","Text":"0 here, 1 here,"},{"Start":"00:32.160 ","End":"00:34.305","Text":"1 here, and 0 here."},{"Start":"00:34.305 ","End":"00:37.485","Text":"We now have the one\u0027s complement of this number,"},{"Start":"00:37.485 ","End":"00:40.580","Text":"and then we\u0027re going to add 1 to it again as we did"},{"Start":"00:40.580 ","End":"00:44.480","Text":"before so that we have a number in two\u0027s compliment,"},{"Start":"00:44.480 ","End":"00:46.445","Text":"but now it\u0027ll be a negative number."},{"Start":"00:46.445 ","End":"00:49.640","Text":"We\u0027re adding together this number and 1,"},{"Start":"00:49.640 ","End":"00:51.875","Text":"we will get 0 plus 1 is 1,"},{"Start":"00:51.875 ","End":"00:54.890","Text":"1 here, 1 here, 0 here,"},{"Start":"00:54.890 ","End":"00:58.745","Text":"1 there, 0 here, 0 here, and 1 there."},{"Start":"00:58.745 ","End":"01:01.865","Text":"Now we have an 8-bit number,"},{"Start":"01:01.865 ","End":"01:06.020","Text":"which is the negative of this number."},{"Start":"01:06.020 ","End":"01:09.770","Text":"What you will find if you work this out,"},{"Start":"01:09.770 ","End":"01:15.650","Text":"this number here that we started with was 105,"},{"Start":"01:15.650 ","End":"01:20.065","Text":"and we\u0027ve now turned it into minus 105."},{"Start":"01:20.065 ","End":"01:25.445","Text":"Let\u0027s go ahead and add the 2 numbers together."},{"Start":"01:25.445 ","End":"01:29.210","Text":"This number and the negative number that we\u0027ve now made from here,"},{"Start":"01:29.210 ","End":"01:33.725","Text":"and we\u0027ll have our result of subtracting this number from this number."},{"Start":"01:33.725 ","End":"01:41.095","Text":"Here\u0027s our first number, 11101111,"},{"Start":"01:41.095 ","End":"01:44.570","Text":"and we\u0027re going to add to that the number that we\u0027re going to bring across"},{"Start":"01:44.570 ","End":"01:50.070","Text":"from here, which is 10010111."},{"Start":"01:50.680 ","End":"01:54.605","Text":"Let\u0027s go ahead and do that calculation."},{"Start":"01:54.605 ","End":"01:57.320","Text":"1 and 1 is 1, 0,"},{"Start":"01:57.320 ","End":"01:59.230","Text":"so 0 here,"},{"Start":"01:59.230 ","End":"02:02.805","Text":"and carry across a 1 to here."},{"Start":"02:02.805 ","End":"02:05.450","Text":"1 plus 1 plus 1 is 1,"},{"Start":"02:05.450 ","End":"02:07.050","Text":"1, so 1 here,"},{"Start":"02:07.050 ","End":"02:09.030","Text":"and 1 carried across here,"},{"Start":"02:09.030 ","End":"02:12.435","Text":"1 plus 1 plus 1 again is 1, 1,"},{"Start":"02:12.435 ","End":"02:16.230","Text":"so 1 here and carry across a 1 there,"},{"Start":"02:16.230 ","End":"02:19.040","Text":"1 plus 1 plus 0 is 1,"},{"Start":"02:19.040 ","End":"02:22.150","Text":"0, so 0 in this column,"},{"Start":"02:22.150 ","End":"02:24.545","Text":"carry 1 across to here,"},{"Start":"02:24.545 ","End":"02:26.960","Text":"1 plus 0 plus 0 is again 1, 0,"},{"Start":"02:26.960 ","End":"02:29.880","Text":"0 here, carry 1 here,"},{"Start":"02:29.880 ","End":"02:31.920","Text":"1 plus 1 plus 0 is 1, 0,"},{"Start":"02:31.920 ","End":"02:34.290","Text":"0 here, carry across here,"},{"Start":"02:34.290 ","End":"02:37.260","Text":"1 plus 1 plus 0 is 0, 1, 0 again,"},{"Start":"02:37.260 ","End":"02:40.305","Text":"and then finally we got 1 plus 1 plus 1,"},{"Start":"02:40.305 ","End":"02:41.790","Text":"which is 1, 1,"},{"Start":"02:41.790 ","End":"02:43.080","Text":"and 1 here,"},{"Start":"02:43.080 ","End":"02:47.615","Text":"and I would carry a 1 across there and then add that to two 0s below it."},{"Start":"02:47.615 ","End":"02:49.895","Text":"But again, that would give me a 9th bit,"},{"Start":"02:49.895 ","End":"02:54.155","Text":"and I discard this leftmost bit as I don\u0027t need it for the result."},{"Start":"02:54.155 ","End":"02:59.330","Text":"Now, you may have noticed that the number that we started out with here"},{"Start":"02:59.330 ","End":"03:05.465","Text":"that we were going to subtract this number from is already a negative number,"},{"Start":"03:05.465 ","End":"03:07.670","Text":"you\u0027ll notice, because the most significant bit,"},{"Start":"03:07.670 ","End":"03:09.155","Text":"and this is an 8 bit number,"},{"Start":"03:09.155 ","End":"03:12.895","Text":"is a 1, which would represent minus 128,"},{"Start":"03:12.895 ","End":"03:15.170","Text":"and then we\u0027d add all these common values together."},{"Start":"03:15.170 ","End":"03:20.000","Text":"We\u0027ve started with a negative number and we\u0027re adding a negative number now."},{"Start":"03:20.000 ","End":"03:22.670","Text":"It\u0027d be interesting to see if this works out,"},{"Start":"03:22.670 ","End":"03:25.340","Text":"does work out, but let me just show you why."},{"Start":"03:25.340 ","End":"03:28.960","Text":"What we\u0027ve got in this first number here then,"},{"Start":"03:28.960 ","End":"03:33.345","Text":"this turns out to be minus 17."},{"Start":"03:33.345 ","End":"03:35.825","Text":"This number now that we\u0027ve worked out,"},{"Start":"03:35.825 ","End":"03:38.315","Text":"we did start with plus 105,"},{"Start":"03:38.315 ","End":"03:45.425","Text":"it\u0027s now minus 105 because we wanted to subtract the second number from the first number."},{"Start":"03:45.425 ","End":"03:47.780","Text":"If you work out this bit pattern here,"},{"Start":"03:47.780 ","End":"03:53.805","Text":"it\u0027s actually minus 128 plus 4 plus 2,"},{"Start":"03:53.805 ","End":"03:57.390","Text":"and so that is minus 122,"},{"Start":"03:57.390 ","End":"04:06.745","Text":"and minus 17 with minus 105 added to it would actually give you minus 122."},{"Start":"04:06.745 ","End":"04:09.795","Text":"We know that this operation has worked,"},{"Start":"04:09.795 ","End":"04:15.365","Text":"and the reason that it works is because we\u0027re within the range of the available numbers."},{"Start":"04:15.365 ","End":"04:19.475","Text":"You\u0027ll recall that an 8-bit two\u0027s complement number goes from minus"},{"Start":"04:19.475 ","End":"04:26.280","Text":"128 to positive 127 because the result fits into that range, we\u0027re absolutely fine."}],"ID":26339},{"Watched":false,"Name":"Exercise 8 part C","Duration":"3m 54s","ChapterTopicVideoID":25522,"CourseChapterTopicPlaylistID":237670,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.050 ","End":"00:02.820","Text":"For the final part of the question,"},{"Start":"00:02.820 ","End":"00:05.700","Text":"we\u0027re going to subtract this number from this one."},{"Start":"00:05.700 ","End":"00:07.665","Text":"It\u0027s quite a small number here."},{"Start":"00:07.665 ","End":"00:12.660","Text":"We\u0027re going to subtract a larger number from it and see what effect that has."},{"Start":"00:12.660 ","End":"00:15.690","Text":"Starting with the number we\u0027re going to subtract,"},{"Start":"00:15.690 ","End":"00:18.780","Text":"we\u0027ve got to turn that into a negative number in two\u0027s complement."},{"Start":"00:18.780 ","End":"00:24.795","Text":"So first of all, let\u0027s write out the number 110101."},{"Start":"00:24.795 ","End":"00:28.350","Text":"We need to add that. It\u0027s got the correct number of bits."},{"Start":"00:28.350 ","End":"00:32.010","Text":"We\u0027ve got 6 bits, so we need to add 2 zeros at the beginning."},{"Start":"00:32.010 ","End":"00:35.190","Text":"Then we\u0027re going to take the one\u0027s complement."},{"Start":"00:35.190 ","End":"00:36.765","Text":"Let\u0027s flip all the bits."},{"Start":"00:36.765 ","End":"00:40.055","Text":"0 becomes 1, 1 becomes 0."},{"Start":"00:40.055 ","End":"00:43.970","Text":"Then to the number here that we\u0027ve got the one\u0027s complement,"},{"Start":"00:43.970 ","End":"00:47.625","Text":"we need to add 1 to turn it into two\u0027s complement."},{"Start":"00:47.625 ","End":"00:50.325","Text":"That will give us the following,"},{"Start":"00:50.325 ","End":"00:51.930","Text":"0 plus 1 is 1,"},{"Start":"00:51.930 ","End":"00:58.590","Text":"1 plus 0 is 1,"},{"Start":"00:58.590 ","End":"01:00.285","Text":"0, 1, 0, 0, 1, and 1."},{"Start":"01:00.285 ","End":"01:03.110","Text":"There we have it. This number is"},{"Start":"01:03.110 ","End":"01:08.675","Text":"the negative representation of the number here that we started with,"},{"Start":"01:08.675 ","End":"01:11.020","Text":"which is the 1 we want to subtract."},{"Start":"01:11.020 ","End":"01:13.370","Text":"We\u0027re going to carry this number across,"},{"Start":"01:13.370 ","End":"01:17.070","Text":"but let\u0027s write out the number here first."},{"Start":"01:17.070 ","End":"01:20.030","Text":"We\u0027ve got 0111,"},{"Start":"01:20.030 ","End":"01:22.550","Text":"however, we got a pad this to make it 8 bits."},{"Start":"01:22.550 ","End":"01:25.190","Text":"We need 4 0s in front of it."},{"Start":"01:25.190 ","End":"01:29.970","Text":"There we go and bring this number across the side."},{"Start":"01:29.970 ","End":"01:33.150","Text":"We have 11001011."},{"Start":"01:37.340 ","End":"01:41.680","Text":"What we end up with is 1 plus 1, 1,"},{"Start":"01:41.680 ","End":"01:46.080","Text":"0, so 0 here and 1 carried across to here."},{"Start":"01:46.080 ","End":"01:48.660","Text":"1 plus 1 plus 1 is 1,"},{"Start":"01:48.660 ","End":"01:50.070","Text":"1 so 1 here,"},{"Start":"01:50.070 ","End":"01:52.380","Text":"carry across 1 to here."},{"Start":"01:52.380 ","End":"01:54.340","Text":"1 plus 1 plus 0 is 1,"},{"Start":"01:54.340 ","End":"01:57.750","Text":"0 0 here, carry across a 1 to there."},{"Start":"01:57.750 ","End":"01:59.820","Text":"1 plus 0 plus 1 is 1,"},{"Start":"01:59.820 ","End":"02:02.355","Text":"0 again, so 0 here."},{"Start":"02:02.355 ","End":"02:03.900","Text":"Carry out 1 across to here,"},{"Start":"02:03.900 ","End":"02:06.795","Text":"1 plus 0 plus 0 is 1,"},{"Start":"02:06.795 ","End":"02:09.645","Text":"0 plus 0 is 0,"},{"Start":"02:09.645 ","End":"02:12.000","Text":"0 plus 1 is 1,"},{"Start":"02:12.000 ","End":"02:14.590","Text":"0 plus 1 is 1."},{"Start":"02:14.590 ","End":"02:16.880","Text":"There\u0027s nothing left. There is no carry over here,"},{"Start":"02:16.880 ","End":"02:18.665","Text":"so there\u0027s no bits to discard."},{"Start":"02:18.665 ","End":"02:21.695","Text":"Our final answer is this number here."},{"Start":"02:21.695 ","End":"02:26.315","Text":"Once again, I could check all of these numbers."},{"Start":"02:26.315 ","End":"02:28.490","Text":"I started off with this number here,"},{"Start":"02:28.490 ","End":"02:33.545","Text":"which is clearly 7 and the number here,"},{"Start":"02:33.545 ","End":"02:40.235","Text":"which we turn into a negative representation down here was minus 53."},{"Start":"02:40.235 ","End":"02:49.865","Text":"We have minus 46 plus 7 minus 5300 to it is indeed minus 46."},{"Start":"02:49.865 ","End":"02:56.930","Text":"In summary, then we\u0027ve been able to subtract a number from another number by"},{"Start":"02:56.930 ","End":"02:59.690","Text":"using addition simply by taking the number we want to"},{"Start":"02:59.690 ","End":"03:03.620","Text":"subtract and turning it into a negative number in two\u0027s complement."},{"Start":"03:03.620 ","End":"03:07.285","Text":"To do that, we put it into one\u0027s complement first and then add 1."},{"Start":"03:07.285 ","End":"03:10.955","Text":"We\u0027ve got in two\u0027s complement and then we can add the 2 numbers together."},{"Start":"03:10.955 ","End":"03:16.420","Text":"The result would be the same as subtracting this number from the first number."},{"Start":"03:16.420 ","End":"03:23.520","Text":"It works in every case where we have an extra digit on the left-hand side, we discard it."},{"Start":"03:23.520 ","End":"03:25.080","Text":"We did in the first 2 examples,"},{"Start":"03:25.080 ","End":"03:26.795","Text":"we did it in the 3rd example,"},{"Start":"03:26.795 ","End":"03:32.000","Text":"the result will always be correct given that it will fit into the range available."},{"Start":"03:32.000 ","End":"03:34.070","Text":"All these numbers have been carefully chosen"},{"Start":"03:34.070 ","End":"03:36.350","Text":"so that they do fall into the range available."},{"Start":"03:36.350 ","End":"03:39.965","Text":"Remember that the range for a two\u0027s complement number,"},{"Start":"03:39.965 ","End":"03:41.720","Text":"which is unsigned format,"},{"Start":"03:41.720 ","End":"03:47.030","Text":"would be minus 128 to positive 127."},{"Start":"03:47.030 ","End":"03:49.820","Text":"All of these results fit into that range,"},{"Start":"03:49.820 ","End":"03:51.455","Text":"hence, they\u0027re all good."},{"Start":"03:51.455 ","End":"03:55.000","Text":"Thanks very much for watching. See you for the next one."}],"ID":26340}],"Thumbnail":null,"ID":237670},{"Name":"Fixed and floating point","TopicPlaylistFirstVideoID":0,"Duration":null,"Videos":[{"Watched":false,"Name":"Exercise 1 parts A-D","Duration":"6m 30s","ChapterTopicVideoID":25508,"CourseChapterTopicPlaylistID":237671,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.700","Text":"Welcome back, everybody. In this question we\u0027ve"},{"Start":"00:02.700 ","End":"00:05.160","Text":"been asked to convert a decimal number which,"},{"Start":"00:05.160 ","End":"00:09.660","Text":"this time, contains a fractional part or a decimal part,"},{"Start":"00:09.660 ","End":"00:11.175","Text":"whichever way you want to say that,"},{"Start":"00:11.175 ","End":"00:15.240","Text":"and it\u0027s fairly straightforward because we\u0027ve been told we\u0027ve"},{"Start":"00:15.240 ","End":"00:19.425","Text":"got to use 8 bits with 3 bits as the fractional part,"},{"Start":"00:19.425 ","End":"00:22.620","Text":"and therefore, the rest is going to be the integer part."},{"Start":"00:22.620 ","End":"00:24.360","Text":"How do we go ahead and do this?"},{"Start":"00:24.360 ","End":"00:28.170","Text":"Well, if we want to know the mathematical basis for this,"},{"Start":"00:28.170 ","End":"00:32.550","Text":"the way that we\u0027d calculate powers for base 2 numbers is"},{"Start":"00:32.550 ","End":"00:38.580","Text":"we start at the position of 2^0,"},{"Start":"00:38.580 ","End":"00:41.115","Text":"and then we go 2^1,"},{"Start":"00:41.115 ","End":"00:45.980","Text":"2^2 and so on for as long as we need to go."},{"Start":"00:45.980 ","End":"00:50.420","Text":"In this case, if we use 5 bits for the integer part,"},{"Start":"00:50.420 ","End":"00:53.420","Text":"and 3 bits for the fractional part,"},{"Start":"00:53.420 ","End":"00:56.050","Text":"indices will go to negative numbers."},{"Start":"00:56.050 ","End":"00:59.625","Text":"Here it\u0027s going to be 2 to the power minus 1,"},{"Start":"00:59.625 ","End":"01:04.275","Text":"2 to the power minus 2 and then finally 2 to the power minus 3."},{"Start":"01:04.275 ","End":"01:07.513","Text":"These 3 parts are going to represent the fractional part,"},{"Start":"01:07.513 ","End":"01:10.670","Text":"these 5 bits are going to represent the integer part."},{"Start":"01:10.670 ","End":"01:13.070","Text":"If we work out what these are,"},{"Start":"01:13.070 ","End":"01:17.825","Text":"we should be familiar with the positive part on the integer here."},{"Start":"01:17.825 ","End":"01:19.760","Text":"2^0 is 1,"},{"Start":"01:19.760 ","End":"01:22.295","Text":"2^1 is 2,"},{"Start":"01:22.295 ","End":"01:24.780","Text":"and 4, and then 8."},{"Start":"01:24.780 ","End":"01:29.165","Text":"We know this already from all the conversions we\u0027ve done in previous exercises."},{"Start":"01:29.165 ","End":"01:30.980","Text":"That was our integer part,"},{"Start":"01:30.980 ","End":"01:32.770","Text":"but the fractional part,"},{"Start":"01:32.770 ","End":"01:35.525","Text":"if we imagine that we have a decimal place here,"},{"Start":"01:35.525 ","End":"01:40.625","Text":"the positions to the right of the decimal place are going to be fractions."},{"Start":"01:40.625 ","End":"01:44.110","Text":"The first 1, 2 to the power minus 1 is 1/2."},{"Start":"01:44.110 ","End":"01:46.600","Text":"1/2 of 1/2 is 1/4,"},{"Start":"01:46.600 ","End":"01:51.030","Text":"and 1/2 of 1/4 is 1/8."},{"Start":"01:51.030 ","End":"01:54.365","Text":"These are now our new column values for"},{"Start":"01:54.365 ","End":"01:59.285","Text":"the binary number we\u0027re going to form to create this decimal number."},{"Start":"01:59.285 ","End":"02:01.415","Text":"Let\u0027s have a look at that then."},{"Start":"02:01.415 ","End":"02:04.139","Text":"To make 27 straightforward,"},{"Start":"02:04.139 ","End":"02:08.810","Text":"we can pretty much do this without any real calculations on the side."},{"Start":"02:08.810 ","End":"02:12.770","Text":"16 plus 8 would give us 24."},{"Start":"02:12.770 ","End":"02:17.265","Text":"We need 3 more so we put 0 there and there\u0027s our 3."},{"Start":"02:17.265 ","End":"02:20.355","Text":"24 plus 2 is 26,"},{"Start":"02:20.355 ","End":"02:24.610","Text":"plus 1 is 27, so we\u0027ve made 27 of the 27.5."},{"Start":"02:24.610 ","End":"02:27.290","Text":"0.5 of course is 1/2,"},{"Start":"02:27.290 ","End":"02:29.250","Text":"so I\u0027ll also need this column,"},{"Start":"02:29.250 ","End":"02:31.760","Text":"the others can be 0s."},{"Start":"02:31.760 ","End":"02:34.235","Text":"I\u0027ve done part a."},{"Start":"02:34.235 ","End":"02:41.000","Text":"Here is the binary pattern that represents 27.5 as an integer if we are"},{"Start":"02:41.000 ","End":"02:48.485","Text":"dealing with an 8-bit number with 3 bits as the fractional part in fixed point."},{"Start":"02:48.485 ","End":"02:51.740","Text":"We\u0027ll move on to a thing called floating point later on,"},{"Start":"02:51.740 ","End":"02:54.110","Text":"but we need to understand how fixed point works"},{"Start":"02:54.110 ","End":"02:57.245","Text":"before and there are some scenarios where you do use fixed point."},{"Start":"02:57.245 ","End":"03:00.415","Text":"There\u0027s a special type of CPU called a DSP."},{"Start":"03:00.415 ","End":"03:05.235","Text":"Some DSPs use fixed point arithmetic for speed."},{"Start":"03:05.235 ","End":"03:07.790","Text":"The next one, we\u0027ll do it in exactly the same way,"},{"Start":"03:07.790 ","End":"03:09.710","Text":"this time I won\u0027t bother looking at the powers,"},{"Start":"03:09.710 ","End":"03:13.175","Text":"we\u0027ll just write out the column values again."},{"Start":"03:13.175 ","End":"03:18.335","Text":"Column values, because we\u0027ve got the same number of bits available,"},{"Start":"03:18.335 ","End":"03:21.605","Text":"8 bits, and 3 of them are going to be the fractional part."},{"Start":"03:21.605 ","End":"03:27.530","Text":"We just half each time rather than double each time when we\u0027re going to the right."},{"Start":"03:27.530 ","End":"03:30.500","Text":"We used to double each time going in this direction,"},{"Start":"03:30.500 ","End":"03:33.245","Text":"now we\u0027re going to halve each time when we go in this direction."},{"Start":"03:33.245 ","End":"03:37.295","Text":"That effectively, is where our decimal point is going to be."},{"Start":"03:37.295 ","End":"03:40.800","Text":"For this one, to make 30.25,"},{"Start":"03:40.800 ","End":"03:42.870","Text":"I need the 16,"},{"Start":"03:42.870 ","End":"03:46.050","Text":"I\u0027ll need the 8, so that\u0027s 24."},{"Start":"03:46.050 ","End":"03:49.050","Text":"If I have the 4, I\u0027ll have 28."},{"Start":"03:49.050 ","End":"03:53.480","Text":"I\u0027ll need the 2 then to make up 30. So there\u0027s my 30."},{"Start":"03:53.480 ","End":"03:54.740","Text":"If I put in a 0 there,"},{"Start":"03:54.740 ","End":"03:57.800","Text":"that\u0027s the integer part done, I\u0027ve got 30."},{"Start":"03:57.800 ","End":"04:01.640","Text":"0.25 is going to be made up with a single one of these columns,"},{"Start":"04:01.640 ","End":"04:05.810","Text":"which is this 1 because 0.25 is, of course, 1/4."},{"Start":"04:05.810 ","End":"04:09.735","Text":"That is part b done."},{"Start":"04:09.735 ","End":"04:13.345","Text":"Moving on to part c then, same fashion."},{"Start":"04:13.345 ","End":"04:16.548","Text":"Let\u0027s do the column headings again, 16, 8, 4, 2, 1,"},{"Start":"04:16.548 ","End":"04:23.745","Text":"1/2, 1/4, and 1/8."},{"Start":"04:23.745 ","End":"04:27.200","Text":"To get 15, we don\u0027t need the 16 columns,"},{"Start":"04:27.200 ","End":"04:28.490","Text":"so let\u0027s put 0 there."},{"Start":"04:28.490 ","End":"04:34.220","Text":"We do need the 8. From 8 we\u0027ll need another 7 to make 15."},{"Start":"04:34.220 ","End":"04:37.435","Text":"I\u0027m going to need all of these columns,"},{"Start":"04:37.435 ","End":"04:40.185","Text":"4 plus 2 plus 1,"},{"Start":"04:40.185 ","End":"04:43.070","Text":"then 0.75 is a little"},{"Start":"04:43.070 ","End":"04:45.800","Text":"bit trickier than the ones we\u0027ve had previously because it doesn\u0027t fall neatly."},{"Start":"04:45.800 ","End":"04:50.345","Text":"I\u0027ll need to add 2 of these columns together and of course it\u0027s 3/4."},{"Start":"04:50.345 ","End":"04:53.735","Text":"Another way of saying that is 6/8,"},{"Start":"04:53.735 ","End":"04:59.105","Text":"is really 1/2 plus 1/4 will do me here so the 1/2 and the 1/4,"},{"Start":"04:59.105 ","End":"05:01.295","Text":"and there\u0027s nothing in that column."},{"Start":"05:01.295 ","End":"05:03.950","Text":"Now c is done also."},{"Start":"05:03.950 ","End":"05:05.750","Text":"Then the final one."},{"Start":"05:05.750 ","End":"05:08.600","Text":"I\u0027ll, once again, write out the column headings,"},{"Start":"05:08.600 ","End":"05:11.540","Text":"but it\u0027s all the same for this particular question because"},{"Start":"05:11.540 ","End":"05:15.515","Text":"all 4 parts of the question are using the same format."},{"Start":"05:15.515 ","End":"05:19.195","Text":"Then we just need to make the integer part which is 9."},{"Start":"05:19.195 ","End":"05:22.625","Text":"I can see straight away that\u0027s going to involve 8 and 1."},{"Start":"05:22.625 ","End":"05:25.385","Text":"Everything else is going to be a 0."},{"Start":"05:25.385 ","End":"05:29.385","Text":"Then 0.375 is 1/8,"},{"Start":"05:29.385 ","End":"05:32.970","Text":"which is 0.125 plus 1/4."},{"Start":"05:32.970 ","End":"05:37.560","Text":"That would give me 0.375 so I want 1s there,"},{"Start":"05:37.560 ","End":"05:43.115","Text":"a 0 there, and I have now completed all 4 parts of the exercise."},{"Start":"05:43.115 ","End":"05:45.065","Text":"Just to summarize what we\u0027ve done here,"},{"Start":"05:45.065 ","End":"05:48.230","Text":"we did the same method as we\u0027ve always done for binary numbers,"},{"Start":"05:48.230 ","End":"05:50.705","Text":"which is we have going leftwards,"},{"Start":"05:50.705 ","End":"05:54.185","Text":"twice the previous column for each column heading."},{"Start":"05:54.185 ","End":"05:58.010","Text":"This time though, we decided that where the decimal place was,"},{"Start":"05:58.010 ","End":"06:02.225","Text":"we had to go half when we\u0027re going right of the decimal place."},{"Start":"06:02.225 ","End":"06:05.060","Text":"1/2 of 1 is 1/2,"},{"Start":"06:05.060 ","End":"06:07.655","Text":"1/2 of 1/2 is 1/4,"},{"Start":"06:07.655 ","End":"06:09.470","Text":"1/2 of 1/4 is 1/8."},{"Start":"06:09.470 ","End":"06:11.315","Text":"That\u0027s why we\u0027ve got these column headings,"},{"Start":"06:11.315 ","End":"06:15.180","Text":"and because all 4 parts of this question were the same format,"},{"Start":"06:15.180 ","End":"06:17.795","Text":"8 bits with 3 bits of the fractional part,"},{"Start":"06:17.795 ","End":"06:20.450","Text":"we have the same column headings for each part of the question."},{"Start":"06:20.450 ","End":"06:24.110","Text":"Then we just worked out the integer part and the fractional part."},{"Start":"06:24.110 ","End":"06:26.465","Text":"We did it. That\u0027s great."},{"Start":"06:26.465 ","End":"06:31.270","Text":"We\u0027ll do a slightly harder one in the next question. See you then."}],"ID":26323},{"Watched":false,"Name":"Exercise 2 parts A-C","Duration":"7m 16s","ChapterTopicVideoID":25509,"CourseChapterTopicPlaylistID":237671,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.760","Text":"Welcome back, everyone. In this next question,"},{"Start":"00:02.760 ","End":"00:05.610","Text":"we have been told to use 12 bits to"},{"Start":"00:05.610 ","End":"00:09.825","Text":"generate a bit pattern for the following decimal numbers."},{"Start":"00:09.825 ","End":"00:13.500","Text":"We haven\u0027t actually been told how many bits to use for the fractional part."},{"Start":"00:13.500 ","End":"00:16.470","Text":"So let\u0027s have a look at how we would go about doing that."},{"Start":"00:16.470 ","End":"00:20.670","Text":"Really, what you need to do is to work out how many bits you need for the range of"},{"Start":"00:20.670 ","End":"00:25.665","Text":"the integer part and how many bits you\u0027d need to re-express the fractional part."},{"Start":"00:25.665 ","End":"00:27.390","Text":"The first one is very straightforward."},{"Start":"00:27.390 ","End":"00:29.250","Text":"It\u0027s a very small integer,"},{"Start":"00:29.250 ","End":"00:34.050","Text":"and it\u0027s not going to require many columns for the fractional part either."},{"Start":"00:34.050 ","End":"00:37.905","Text":"I can just see that I\u0027ll only need 1 bit to express 1/2."},{"Start":"00:37.905 ","End":"00:43.740","Text":"I can pretty much choose to put my binary point anywhere in the number."},{"Start":"00:43.740 ","End":"00:45.240","Text":"But what I\u0027ll do is I\u0027ll stick to"},{"Start":"00:45.240 ","End":"00:48.375","Text":"the format we used in the previous part of the question."},{"Start":"00:48.375 ","End":"00:53.325","Text":"We\u0027ll use 3 bits for the fractional part. There we go."},{"Start":"00:53.325 ","End":"00:55.515","Text":"Then the rest of it will be the integer part."},{"Start":"00:55.515 ","End":"00:57.945","Text":"I\u0027m going to use 1, 2,"},{"Start":"00:57.945 ","End":"01:00.690","Text":"4, 8, 16,"},{"Start":"01:00.690 ","End":"01:02.940","Text":"32, 64,"},{"Start":"01:02.940 ","End":"01:06.705","Text":"128, and 256."},{"Start":"01:06.705 ","End":"01:10.415","Text":"There\u0027s 9 bits for the integer,"},{"Start":"01:10.415 ","End":"01:11.930","Text":"3 bits for the fraction."},{"Start":"01:11.930 ","End":"01:16.055","Text":"17.5 is very easy to work out."},{"Start":"01:16.055 ","End":"01:18.980","Text":"It\u0027s 16 plus 1 plus 1/2."},{"Start":"01:18.980 ","End":"01:23.025","Text":"Everything else is going to be a 0."},{"Start":"01:23.025 ","End":"01:26.880","Text":"I should really put the leading 0s in here as well because I\u0027ve been"},{"Start":"01:26.880 ","End":"01:31.140","Text":"asked to express it as a 12-bit representation."},{"Start":"01:31.140 ","End":"01:33.420","Text":"There\u0027s my 12-bit representation."},{"Start":"01:33.420 ","End":"01:35.265","Text":"I should say in the answer,"},{"Start":"01:35.265 ","End":"01:39.585","Text":"how many bits I\u0027ve used for the fractional part."},{"Start":"01:39.585 ","End":"01:42.128","Text":"That\u0027s straightforward. Now,"},{"Start":"01:42.128 ","End":"01:46.605","Text":"the next one is trickier because it\u0027s actually a negative number,"},{"Start":"01:46.605 ","End":"01:52.515","Text":"so we\u0027re now needing to use a signed representation and it\u0027s also got a fractional part."},{"Start":"01:52.515 ","End":"01:58.200","Text":"The easiest way to do this question is to actually ignore the sign for the moment,"},{"Start":"01:58.200 ","End":"02:01.695","Text":"make it 37.75 as a positive number,"},{"Start":"02:01.695 ","End":"02:05.175","Text":"and then turn that into a two\u0027s complement representation."},{"Start":"02:05.175 ","End":"02:06.360","Text":"I\u0027m going to assume we\u0027ve got"},{"Start":"02:06.360 ","End":"02:08.880","Text":"the same column headings as we\u0027ve done for the previous one,"},{"Start":"02:08.880 ","End":"02:11.655","Text":"because again, we\u0027ve got a small number and a small fractional part."},{"Start":"02:11.655 ","End":"02:16.350","Text":"Now I can make 0.75 fairly easily using just 2 fractional columns."},{"Start":"02:16.350 ","End":"02:18.593","Text":"I\u0027m going to use the same headings, but obviously,"},{"Start":"02:18.593 ","End":"02:24.615","Text":"the first column is going to be minus 256 rather than just 256."},{"Start":"02:24.615 ","End":"02:26.700","Text":"Let\u0027s just write out those column headings."},{"Start":"02:26.700 ","End":"02:28.590","Text":"The first one is minus 256."},{"Start":"02:28.590 ","End":"02:30.480","Text":"Everything else is a positive number,"},{"Start":"02:30.480 ","End":"02:32.445","Text":"so positive 128,"},{"Start":"02:32.445 ","End":"02:34.815","Text":"positive 64, and so on."},{"Start":"02:34.815 ","End":"02:39.600","Text":"Then our fractional parts are also positive numbers as well."},{"Start":"02:39.600 ","End":"02:43.560","Text":"To make 37.75 as a positive number,"},{"Start":"02:43.560 ","End":"02:46.605","Text":"I\u0027m going to write that in black because it\u0027s not my final answer."},{"Start":"02:46.605 ","End":"02:49.395","Text":"Let\u0027s do 32 plus 5,"},{"Start":"02:49.395 ","End":"02:51.240","Text":"that will give us a 37,"},{"Start":"02:51.240 ","End":"02:54.735","Text":"and 0.75 is going to be 1/2 and 1/4."},{"Start":"02:54.735 ","End":"02:57.660","Text":"Everything else is a 0."},{"Start":"02:57.660 ","End":"02:58.830","Text":"Again, really important,"},{"Start":"02:58.830 ","End":"03:00.675","Text":"I put all my 0s in here."},{"Start":"03:00.675 ","End":"03:02.670","Text":"I got 4 bits there,"},{"Start":"03:02.670 ","End":"03:04.920","Text":"5 bits there, and 3 bits there."},{"Start":"03:04.920 ","End":"03:07.890","Text":"Now, this is just to make it clear,"},{"Start":"03:07.890 ","End":"03:14.220","Text":"positive 37.75, but I\u0027ve been asked to make minus 37.75."},{"Start":"03:14.220 ","End":"03:18.015","Text":"Let\u0027s take the one\u0027s complement of that number."},{"Start":"03:18.015 ","End":"03:22.905","Text":"Remember one\u0027s compliment is just to flip all the bits to the opposite. There we go."},{"Start":"03:22.905 ","End":"03:25.770","Text":"I\u0027ve taken the one\u0027s complement and then I\u0027m going"},{"Start":"03:25.770 ","End":"03:28.680","Text":"to add 1 to that to turn it into the two\u0027s compliment,"},{"Start":"03:28.680 ","End":"03:30.405","Text":"and I\u0027ll have my final answer."},{"Start":"03:30.405 ","End":"03:33.960","Text":"Just looking at it, I can see I\u0027ve got a 1 in this column here."},{"Start":"03:33.960 ","End":"03:35.895","Text":"If I add 1 to 1,"},{"Start":"03:35.895 ","End":"03:39.330","Text":"it\u0027s going to be 2, so I need a 2."},{"Start":"03:39.330 ","End":"03:41.520","Text":"I\u0027ll put 1 there and a 0 there,"},{"Start":"03:41.520 ","End":"03:44.175","Text":"otherwise the rest of the numbers is going to be exactly the same."},{"Start":"03:44.175 ","End":"03:45.975","Text":"Let\u0027s write that out."},{"Start":"03:45.975 ","End":"03:48.030","Text":"If I add 1 to here,"},{"Start":"03:48.030 ","End":"03:54.000","Text":"this 1 becomes a 0 and I get 1 over here because 1 plus 1,"},{"Start":"03:54.000 ","End":"03:56.265","Text":"remember is 1, 0."},{"Start":"03:56.265 ","End":"04:00.480","Text":"The rest of it is going to be exactly the same as above."},{"Start":"04:00.480 ","End":"04:03.225","Text":"There\u0027s my final answer."},{"Start":"04:03.225 ","End":"04:08.310","Text":"I would need to indicate how many bits I\u0027ve used for the fractional part and"},{"Start":"04:08.310 ","End":"04:14.670","Text":"that it\u0027s a signed number with 9 bits for the integer part."},{"Start":"04:14.670 ","End":"04:17.580","Text":"Great, we\u0027ve done the first 2 parts."},{"Start":"04:17.580 ","End":"04:18.810","Text":"The final part,"},{"Start":"04:18.810 ","End":"04:21.930","Text":"we need to really work out how many bits I need for the fractional part."},{"Start":"04:21.930 ","End":"04:24.150","Text":"I\u0027m just going to guess because I can see by"},{"Start":"04:24.150 ","End":"04:27.885","Text":"sight that I only need 2 bits or 3 bits here."},{"Start":"04:27.885 ","End":"04:29.580","Text":"I\u0027m not sure about this one."},{"Start":"04:29.580 ","End":"04:32.040","Text":"So what you need to do is you need to take the"},{"Start":"04:32.040 ","End":"04:34.020","Text":"reciprocal of the fractional part and"},{"Start":"04:34.020 ","End":"04:36.750","Text":"from that you should be able to work out what you need."},{"Start":"04:36.750 ","End":"04:42.200","Text":"If I take the reciprocal of 0.0625,"},{"Start":"04:42.200 ","End":"04:46.425","Text":"reciprocal is obviously 1 over the number,"},{"Start":"04:46.425 ","End":"04:49.905","Text":"and you actually will find it\u0027s 16."},{"Start":"04:49.905 ","End":"04:53.760","Text":"The column I\u0027m looking for is 1/16 column."},{"Start":"04:53.760 ","End":"04:56.190","Text":"I had 1/2,1/4 and 1/8,"},{"Start":"04:56.190 ","End":"04:57.720","Text":"I\u0027ll now need 1/16 column."},{"Start":"04:57.720 ","End":"05:01.110","Text":"That means I\u0027ll need 4 bits for the fractional part."},{"Start":"05:01.110 ","End":"05:05.850","Text":"Let\u0027s revise what we had previously as 2 bits,"},{"Start":"05:05.850 ","End":"05:09.450","Text":"a third bit and now here\u0027s my fourth bit."},{"Start":"05:09.450 ","End":"05:15.345","Text":"That means now I\u0027ve only got 8 bits left for the integer part."},{"Start":"05:15.345 ","End":"05:17.325","Text":"I\u0027ll write those out."},{"Start":"05:17.325 ","End":"05:20.970","Text":"It\u0027s 4 bits and here\u0027s the rest of it."},{"Start":"05:20.970 ","End":"05:24.090","Text":"8 bits in total and 4 bits are fractional."},{"Start":"05:24.090 ","End":"05:25.940","Text":"I\u0027ve got my 12 bits used up."},{"Start":"05:25.940 ","End":"05:30.140","Text":"I\u0027m going to assume now that this is a unsigned number otherwise,"},{"Start":"05:30.140 ","End":"05:31.415","Text":"this is not possible."},{"Start":"05:31.415 ","End":"05:33.935","Text":"It would have to be an unsigned number."},{"Start":"05:33.935 ","End":"05:40.685","Text":"253, I can make using all of the columns except for the 2,"},{"Start":"05:40.685 ","End":"05:44.450","Text":"because if I have 1s in every place here it would be 255,"},{"Start":"05:44.450 ","End":"05:47.255","Text":"2 less than that is 253."},{"Start":"05:47.255 ","End":"05:50.090","Text":"You can use whatever method you like to work that out."},{"Start":"05:50.090 ","End":"05:51.575","Text":"I\u0027ll just tell you right now,"},{"Start":"05:51.575 ","End":"05:57.365","Text":"it\u0027s 253 is all of the columns except for the 2 column."},{"Start":"05:57.365 ","End":"06:00.670","Text":"Then to make a 0.0625,"},{"Start":"06:00.670 ","End":"06:04.980","Text":"everything else is a 0 apart from the 1/16th column."},{"Start":"06:04.980 ","End":"06:07.620","Text":"We\u0027ve got part C now."},{"Start":"06:07.620 ","End":"06:12.560","Text":"Just to summarize, we need to work out how many bits we"},{"Start":"06:12.560 ","End":"06:15.080","Text":"need for the integer part of"},{"Start":"06:15.080 ","End":"06:18.665","Text":"the number and then how many bits we need for the fractional part of the number."},{"Start":"06:18.665 ","End":"06:24.165","Text":"We also need to say whether it\u0027s a signed number or an unsigned number."},{"Start":"06:24.165 ","End":"06:25.955","Text":"In this final answer,"},{"Start":"06:25.955 ","End":"06:34.120","Text":"it was unsigned and assuming 4-bits for fractional part."},{"Start":"06:34.120 ","End":"06:36.335","Text":"In the second one,"},{"Start":"06:36.335 ","End":"06:43.815","Text":"it was a signed number using 3 bits for fractional part."},{"Start":"06:43.815 ","End":"06:45.650","Text":"The first one we could have done a number of"},{"Start":"06:45.650 ","End":"06:48.110","Text":"ways to be honest because it\u0027s such a simple number."},{"Start":"06:48.110 ","End":"06:51.320","Text":"But just does go to show that choose a format"},{"Start":"06:51.320 ","End":"06:54.650","Text":"as in how many bits should I use for the fractional part?"},{"Start":"06:54.650 ","End":"06:57.095","Text":"How many bits should I use for the integer part?"},{"Start":"06:57.095 ","End":"07:00.350","Text":"Should I assume that it\u0027s a signed number or an unsigned number?"},{"Start":"07:00.350 ","End":"07:04.760","Text":"All of those factors would affect your choice of format."},{"Start":"07:04.760 ","End":"07:08.840","Text":"In this question, because they didn\u0027t give us the format,"},{"Start":"07:08.840 ","End":"07:10.490","Text":"we had to make a choice."},{"Start":"07:10.490 ","End":"07:14.060","Text":"That\u0027s what made this question a little bit trickier than the first one."},{"Start":"07:14.060 ","End":"07:17.040","Text":"There we go. I\u0027ll see you in the next one."}],"ID":26324},{"Watched":false,"Name":"Exercise 3 parts A-B","Duration":"5m 50s","ChapterTopicVideoID":25510,"CourseChapterTopicPlaylistID":237671,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.295","Text":"Hello everyone. Welcome back."},{"Start":"00:02.295 ","End":"00:05.295","Text":"In this question we\u0027ve been asked to take"},{"Start":"00:05.295 ","End":"00:10.800","Text":"a binary number in 2\u0027s complement and convert it into a denary number."},{"Start":"00:10.800 ","End":"00:16.154","Text":"We\u0027ve been told that the number has a 5-bit mantissa and a 3-bit exponent."},{"Start":"00:16.154 ","End":"00:18.615","Text":"Let\u0027s have a look at what that means."},{"Start":"00:18.615 ","End":"00:23.130","Text":"Hopefully, the question has been written out so that the mantissa has"},{"Start":"00:23.130 ","End":"00:27.750","Text":"actually got the 5-bits and a gap and the 3-bits to make it easy for us to work out."},{"Start":"00:27.750 ","End":"00:30.765","Text":"They might tell us in the question"},{"Start":"00:30.765 ","End":"00:34.830","Text":"whether it\u0027s the most significant 5-bits or the least significant 3-bits."},{"Start":"00:34.830 ","End":"00:37.005","Text":"But here they\u0027ve actually drawn it with a gap."},{"Start":"00:37.005 ","End":"00:39.659","Text":"Let\u0027s draw out the mantissa."},{"Start":"00:39.659 ","End":"00:40.980","Text":"First of all, it\u0027s 0,"},{"Start":"00:40.980 ","End":"00:43.260","Text":"1, 0, 1,"},{"Start":"00:43.260 ","End":"00:47.460","Text":"1, and then the exponent is 0, 0, 1."},{"Start":"00:47.460 ","End":"00:50.235","Text":"We need to know what the bit values are,"},{"Start":"00:50.235 ","End":"00:51.435","Text":"and it\u0027s going to be,"},{"Start":"00:51.435 ","End":"00:53.850","Text":"let\u0027s start with the exponent 1, 2,"},{"Start":"00:53.850 ","End":"00:58.860","Text":"and this is a signed number because these 2\u0027s complement it\u0027s minus 4,"},{"Start":"00:58.860 ","End":"01:00.885","Text":"is that final column."},{"Start":"01:00.885 ","End":"01:05.045","Text":"The exponent\u0027s value is 1, nice and easy."},{"Start":"01:05.045 ","End":"01:07.250","Text":"We won\u0027t work out what the column values are yet."},{"Start":"01:07.250 ","End":"01:10.415","Text":"There\u0027s no point for the mantissa until we\u0027ve shifted it."},{"Start":"01:10.415 ","End":"01:13.520","Text":"But what we should draw in is the binary point."},{"Start":"01:13.520 ","End":"01:16.130","Text":"The binary point is always going to be after"},{"Start":"01:16.130 ","End":"01:20.270","Text":"the first binary digit by standard and convention."},{"Start":"01:20.270 ","End":"01:23.660","Text":"Let\u0027s now shift our binary point by 1 place."},{"Start":"01:23.660 ","End":"01:27.125","Text":"I\u0027m going to write out exactly the same number again,"},{"Start":"01:27.125 ","End":"01:30.110","Text":"but without the binary point this time and we\u0027re going to shift it"},{"Start":"01:30.110 ","End":"01:34.430","Text":"1 place to the right because this is a positive number and therefore,"},{"Start":"01:34.430 ","End":"01:39.410","Text":"we\u0027re making a bigger number and therefore we shift it to the right."},{"Start":"01:39.410 ","End":"01:43.190","Text":"That\u0027s what I need to do and I\u0027ve got my answer now."},{"Start":"01:43.190 ","End":"01:48.260","Text":"To translate that into binary what I\u0027ll need to do is to write the column values,"},{"Start":"01:48.260 ","End":"01:49.835","Text":"so that\u0027s going to be 1,"},{"Start":"01:49.835 ","End":"01:53.340","Text":"and this is going to be not 2 but minus 2,"},{"Start":"01:53.340 ","End":"01:57.450","Text":"and this will be a 1/2,"},{"Start":"01:57.450 ","End":"02:00.360","Text":"1/4, and an 1/8,"},{"Start":"02:00.360 ","End":"02:07.189","Text":"so what we end up with as our final answer which is going to be 1"},{"Start":"02:07.189 ","End":"02:15.705","Text":"plus 1/4 plus an 1/8, which is 1.375."},{"Start":"02:15.705 ","End":"02:18.105","Text":"That\u0027s it. We\u0027re done for the first part."},{"Start":"02:18.105 ","End":"02:21.625","Text":"There\u0027s our answer in decimal."},{"Start":"02:21.625 ","End":"02:26.360","Text":"If we wanted to check whether what we\u0027ve done is correct we could look at"},{"Start":"02:26.360 ","End":"02:31.485","Text":"this number here and work that out in binary."},{"Start":"02:31.485 ","End":"02:37.020","Text":"This would actually be 0.1011."},{"Start":"02:37.260 ","End":"02:45.140","Text":"If you look at the column values for each of these digits you\u0027d be looking at 1/2 here,"},{"Start":"02:45.140 ","End":"02:47.780","Text":"1/4 here, 1/8 here,"},{"Start":"02:47.780 ","End":"02:50.840","Text":"and 1/16 for that final bit."},{"Start":"02:50.840 ","End":"02:54.320","Text":"What you\u0027d end up with is"},{"Start":"02:54.320 ","End":"03:03.180","Text":"11/16 and 11/16 is actually as a decimal,"},{"Start":"03:03.180 ","End":"03:08.630","Text":"0.6875 and the exponent is 2."},{"Start":"03:08.630 ","End":"03:13.900","Text":"But remember what we have to do with that is we have to say 2^1,"},{"Start":"03:13.900 ","End":"03:15.600","Text":"so the exponent is 1,"},{"Start":"03:15.600 ","End":"03:18.330","Text":"and we take 2^1 which gives us 2."},{"Start":"03:18.330 ","End":"03:24.555","Text":"If you multiply 0.6875 by 2 you will actually get 1.375,"},{"Start":"03:24.555 ","End":"03:28.965","Text":"so we know we\u0027ve done the correct thing for this first part of the question."},{"Start":"03:28.965 ","End":"03:35.585","Text":"Let\u0027s follow that up with the second question then see another example of how this works."},{"Start":"03:35.585 ","End":"03:38.165","Text":"Again, we write out our mantissa."},{"Start":"03:38.165 ","End":"03:40.115","Text":"Our mantissa is 1,"},{"Start":"03:40.115 ","End":"03:42.370","Text":"0, 1, 0, 1,"},{"Start":"03:42.370 ","End":"03:50.825","Text":"and we imply that the binary point is here and our exponent is 0, 1, 0."},{"Start":"03:50.825 ","End":"03:52.835","Text":"Now let\u0027s work out what that is."},{"Start":"03:52.835 ","End":"03:56.670","Text":"Again, 1 2 minus 4 here,"},{"Start":"03:56.670 ","End":"04:02.345","Text":"so its 2 is going to be the number of places we\u0027re going to shift our binary point by."},{"Start":"04:02.345 ","End":"04:07.670","Text":"Let\u0027s write our number out again with no binary point and we\u0027re going to shift it."},{"Start":"04:07.670 ","End":"04:10.830","Text":"We\u0027re going to shift it 2 places this time,"},{"Start":"04:10.830 ","End":"04:12.630","Text":"so it\u0027s going to end up here."},{"Start":"04:12.630 ","End":"04:16.640","Text":"Now when we write in our column values we\u0027ll find that"},{"Start":"04:16.640 ","End":"04:22.070","Text":"this number is a negative number because that most significant bit is set."},{"Start":"04:22.070 ","End":"04:24.755","Text":"We\u0027ve got minus 4 plus 1,"},{"Start":"04:24.755 ","End":"04:27.440","Text":"so obviously minus 3,"},{"Start":"04:27.440 ","End":"04:33.410","Text":"and we\u0027re going to add to that the fractional part which is just 1/4 because that\u0027s what"},{"Start":"04:33.410 ","End":"04:36.410","Text":"this final column is representing and"},{"Start":"04:36.410 ","End":"04:42.110","Text":"that obviously gives us the final result minus 2.75."},{"Start":"04:42.110 ","End":"04:44.765","Text":"Once again, we are done."},{"Start":"04:44.765 ","End":"04:48.250","Text":"We could check this once again here."},{"Start":"04:48.250 ","End":"04:52.130","Text":"If we were to work out what the column values were for there,"},{"Start":"04:52.130 ","End":"04:58.880","Text":"you get minus 1 first and then you got 1/4 there and 1/16 there,"},{"Start":"04:58.880 ","End":"05:04.330","Text":"so that works out to be minus 1 plus"},{"Start":"05:04.330 ","End":"05:11.470","Text":"5/16 and that will give you minus 0.6875."},{"Start":"05:11.470 ","End":"05:18.650","Text":"But the exponent here is 2 to the power 2 because this value is 2."},{"Start":"05:18.650 ","End":"05:21.725","Text":"That will be the same as multiplying it by 4."},{"Start":"05:21.725 ","End":"05:29.015","Text":"If you take minus 0.6875 and multiply it by 4 you will find that it\u0027s minus 2.75."},{"Start":"05:29.015 ","End":"05:32.075","Text":"Once again, we\u0027ve got the right answer."},{"Start":"05:32.075 ","End":"05:37.695","Text":"Our final answer for part a was 1.375,"},{"Start":"05:37.695 ","End":"05:43.020","Text":"final answer for part b was minus 2.75,"},{"Start":"05:43.020 ","End":"05:46.745","Text":"and in the next video we\u0027ll see the same thing again,"},{"Start":"05:46.745 ","End":"05:51.550","Text":"but with 12-bit number. See you then."}],"ID":26325},{"Watched":false,"Name":"Exercise 4 parts A-C","Duration":"8m 37s","ChapterTopicVideoID":25511,"CourseChapterTopicPlaylistID":237671,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.805","Text":"Hello, again, everyone. In this question,"},{"Start":"00:02.805 ","End":"00:06.180","Text":"we\u0027ve been asked to take a number which is in"},{"Start":"00:06.180 ","End":"00:11.543","Text":"2\u0027s complement encoding and it\u0027s got an 8-bit mantissa and a 4-bit exponent,"},{"Start":"00:11.543 ","End":"00:14.310","Text":"and to convert it into denary."},{"Start":"00:14.310 ","End":"00:22.193","Text":"Just as before, let\u0027s start out by writing out the mantissa 00100000,"},{"Start":"00:22.193 ","End":"00:25.845","Text":"and then the exponent which is 1011."},{"Start":"00:25.845 ","End":"00:30.560","Text":"Now let\u0027s work out what the exponent is."},{"Start":"00:30.560 ","End":"00:34.700","Text":"This is a 2\u0027s complement signed number,"},{"Start":"00:34.700 ","End":"00:37.790","Text":"so it\u0027s actually minus 8 plus 3,"},{"Start":"00:37.790 ","End":"00:40.168","Text":"which is minus 5,"},{"Start":"00:40.168 ","End":"00:49.655","Text":"and we\u0027ve got to now take our mantissa and shift the binary point, 5 places."},{"Start":"00:49.655 ","End":"00:55.999","Text":"But this time, it\u0027s in the left-hand direction because we\u0027ve got a negative exponent."},{"Start":"00:55.999 ","End":"00:59.105","Text":"Let\u0027s write the number out again,"},{"Start":"00:59.105 ","End":"01:00.590","Text":"and in front of it,"},{"Start":"01:00.590 ","End":"01:07.020","Text":"let\u0027s write 5 0s because we\u0027ve got 5 places to shift, and there we go."},{"Start":"01:07.020 ","End":"01:11.015","Text":"You\u0027ll recall that the implied binary point is always here."},{"Start":"01:11.015 ","End":"01:12.935","Text":"We\u0027re going to shift from there,"},{"Start":"01:12.935 ","End":"01:15.093","Text":"5 places to the left, 1,"},{"Start":"01:15.093 ","End":"01:17.450","Text":"2, 3, 4, 5,"},{"Start":"01:17.450 ","End":"01:19.738","Text":"so it\u0027s going to end up over here,"},{"Start":"01:19.738 ","End":"01:21.695","Text":"and there\u0027s our number in binary now,"},{"Start":"01:21.695 ","End":"01:26.210","Text":"and it\u0027s a simple case of taking that and converting it into decimal."},{"Start":"01:26.210 ","End":"01:29.345","Text":"We can do that by taking negative powers,"},{"Start":"01:29.345 ","End":"01:31.925","Text":"or we can do our old friend, the column values."},{"Start":"01:31.925 ","End":"01:34.175","Text":"I\u0027ll just show you the column values."},{"Start":"01:34.175 ","End":"01:38.000","Text":"We know that this is 1 and this is going to be a"},{"Start":"01:38.000 ","End":"01:42.320","Text":"1/2 because it\u0027s to the right of the decimal of the binary point,"},{"Start":"01:42.320 ","End":"01:45.130","Text":"then it\u0027s going to be halving each time,"},{"Start":"01:45.130 ","End":"01:48.110","Text":"so we get an 1/8,"},{"Start":"01:48.110 ","End":"01:51.755","Text":"1/16, 1/32, 1/64,"},{"Start":"01:51.755 ","End":"01:54.650","Text":"and 1/128, and that\u0027s the moment where we\u0027ve actually got"},{"Start":"01:54.650 ","End":"01:59.210","Text":"a value so our answer is, for part a,"},{"Start":"01:59.210 ","End":"02:08.590","Text":"1/128, which as a decimal number, is 0.0078125."},{"Start":"02:08.590 ","End":"02:12.485","Text":"There we go. That\u0027s the answer for part a."},{"Start":"02:12.485 ","End":"02:16.250","Text":"For part b, we\u0027re going to do it in exactly the same way."},{"Start":"02:16.250 ","End":"02:19.970","Text":"This time, we\u0027ve got a negative mantissa."},{"Start":"02:19.970 ","End":"02:23.375","Text":"You can spot that because the first digit is a 1,"},{"Start":"02:23.375 ","End":"02:26.230","Text":"and this is a signed number, remember."},{"Start":"02:26.230 ","End":"02:30.665","Text":"There\u0027s our mantissa, and there is our exponent."},{"Start":"02:30.665 ","End":"02:34.680","Text":"We have to work out the value of the exponent first."},{"Start":"02:34.680 ","End":"02:37.445","Text":"Just writing those values out for you."},{"Start":"02:37.445 ","End":"02:41.015","Text":"You\u0027ve got 6 and that\u0027s a positive number."},{"Start":"02:41.015 ","End":"02:42.695","Text":"This is a straightforward one."},{"Start":"02:42.695 ","End":"02:47.675","Text":"We\u0027re shifting the binary point 6 places to the right,"},{"Start":"02:47.675 ","End":"02:52.325","Text":"and we just simply write out a number again and move the binary point."},{"Start":"02:52.325 ","End":"02:54.685","Text":"The implied binary point was here,"},{"Start":"02:54.685 ","End":"02:56.908","Text":"and we\u0027re going to shift 1,"},{"Start":"02:56.908 ","End":"02:58.822","Text":"2, 3, 4,"},{"Start":"02:58.822 ","End":"03:01.604","Text":"5, 6 places,"},{"Start":"03:01.604 ","End":"03:03.795","Text":"so it ends up there,"},{"Start":"03:03.795 ","End":"03:07.040","Text":"and what we\u0027re looking for now is to make up"},{"Start":"03:07.040 ","End":"03:13.320","Text":"binary columns and add them all together and produce a decimal end of it,"},{"Start":"03:13.730 ","End":"03:16.024","Text":"1, 2, 4, 8, 16,"},{"Start":"03:16.024 ","End":"03:26.285","Text":"32 and this last column is minus 64 because we\u0027re dealing with a 2\u0027s complement number."},{"Start":"03:26.285 ","End":"03:29.090","Text":"If we add all these together,"},{"Start":"03:29.090 ","End":"03:35.390","Text":"we will get minus 10 plus a fractional part,"},{"Start":"03:35.390 ","End":"03:36.860","Text":"which I\u0027ve written out here,"},{"Start":"03:36.860 ","End":"03:39.410","Text":"which is a 1/2,"},{"Start":"03:39.410 ","End":"03:43.340","Text":"so minus 10 plus a 1/2 is our final result,"},{"Start":"03:43.340 ","End":"03:47.475","Text":"which is obviously minus 9.5."},{"Start":"03:47.475 ","End":"03:49.640","Text":"Another fairly straightforward one,"},{"Start":"03:49.640 ","End":"03:53.030","Text":"but this time we had a negative mantissa"},{"Start":"03:53.030 ","End":"03:56.800","Text":"and a positive exponent which made a negative number,"},{"Start":"03:56.800 ","End":"04:00.410","Text":"but the negative number was getting larger because we were"},{"Start":"04:00.410 ","End":"04:04.670","Text":"shifting it in the rightward direction of the binary point,"},{"Start":"04:04.670 ","End":"04:06.095","Text":"so we\u0027re making a bigger number."},{"Start":"04:06.095 ","End":"04:10.085","Text":"The final one is slightly different, slightly trickier."},{"Start":"04:10.085 ","End":"04:12.065","Text":"Let\u0027s approach that one then."},{"Start":"04:12.065 ","End":"04:13.585","Text":"Let\u0027s write it now again,"},{"Start":"04:13.585 ","End":"04:23.300","Text":"10110000 and the exponent is 1100."},{"Start":"04:23.300 ","End":"04:31.305","Text":"This time we\u0027re dealing with an exponent of minus 4 because minus 8 plus 4,"},{"Start":"04:31.305 ","End":"04:37.310","Text":"so we\u0027ve got to shift our binary point 4 places to the left."},{"Start":"04:37.310 ","End":"04:41.150","Text":"Now because we\u0027ve got a negative number here and we"},{"Start":"04:41.150 ","End":"04:45.475","Text":"can tell that because the left-most bit is a 1,"},{"Start":"04:45.475 ","End":"04:47.715","Text":"we\u0027ve got to preserve the sign."},{"Start":"04:47.715 ","End":"04:52.166","Text":"This time, whereas we were out 4 0s or 5 0s in part a,"},{"Start":"04:52.166 ","End":"04:54.410","Text":"this time we\u0027re going to write out 4,"},{"Start":"04:54.410 ","End":"04:56.765","Text":"1s in front of the number."},{"Start":"04:56.765 ","End":"05:01.440","Text":"If we start with the original mantissa 1, 0, 1, 1, 0, 0, 0, 0,"},{"Start":"05:01.520 ","End":"05:07.670","Text":"and this time put 4 1s in front because we\u0027re recognizing that this"},{"Start":"05:07.670 ","End":"05:13.190","Text":"is a negative number from the first binary digit and we\u0027re going to preserve the sign."},{"Start":"05:13.190 ","End":"05:18.850","Text":"Therefore, we shift in 1s rather than 0s as we did with a positive number."},{"Start":"05:18.850 ","End":"05:23.246","Text":"The implied binary point was there shifting it 1,"},{"Start":"05:23.246 ","End":"05:26.630","Text":"2, 3, 4 places, puts it there."},{"Start":"05:26.630 ","End":"05:28.220","Text":"Now we\u0027ve got our number,"},{"Start":"05:28.220 ","End":"05:31.955","Text":"and it\u0027s just a case of converting that into decimal,"},{"Start":"05:31.955 ","End":"05:39.257","Text":"and it might be easier in this case to use powers."},{"Start":"05:39.257 ","End":"05:41.945","Text":"It\u0027s up to you how you do this."},{"Start":"05:41.945 ","End":"05:43.280","Text":"You could do it the previous method."},{"Start":"05:43.280 ","End":"05:49.010","Text":"This first binary digit is going to be 2^minus 1."},{"Start":"05:49.010 ","End":"05:51.980","Text":"Actually, let\u0027s get the colors consistent."},{"Start":"05:51.980 ","End":"05:55.160","Text":"Let me use red here, 2^minus 1."},{"Start":"05:55.160 ","End":"05:58.480","Text":"This next one is 2^minus 2,"},{"Start":"05:58.480 ","End":"06:01.495","Text":"2^minus 3, and so on."},{"Start":"06:01.495 ","End":"06:04.925","Text":"Then we\u0027re going to get finally to 2^minus 7."},{"Start":"06:04.925 ","End":"06:08.180","Text":"It\u0027s exactly the same as doing what we did before."},{"Start":"06:08.180 ","End":"06:09.680","Text":"If you have access to a calculator,"},{"Start":"06:09.680 ","End":"06:11.266","Text":"you can do that,"},{"Start":"06:11.266 ","End":"06:14.840","Text":"or if you prefer the previous method, it\u0027s 1/2,"},{"Start":"06:14.840 ","End":"06:19.085","Text":"1/4, 1/8, 1/16,"},{"Start":"06:19.085 ","End":"06:24.580","Text":"1/32, 1/64, and 1/128."},{"Start":"06:24.580 ","End":"06:27.740","Text":"If we add all those fractions together,"},{"Start":"06:27.740 ","End":"06:35.580","Text":"what you\u0027ll find you\u0027ll get is a 109/128."},{"Start":"06:35.580 ","End":"06:37.095","Text":"That\u0027s the positive part,"},{"Start":"06:37.095 ","End":"06:43.055","Text":"but we\u0027re going to add minus 1 to that because we\u0027ve got this minus 1 over here."},{"Start":"06:43.055 ","End":"06:47.115","Text":"That\u0027s the most significant bit here."},{"Start":"06:47.115 ","End":"06:49.950","Text":"If you work that out,"},{"Start":"06:49.950 ","End":"06:53.615","Text":"and we can put this to a fraction form again,"},{"Start":"06:53.615 ","End":"06:58.270","Text":"you\u0027ll find that that\u0027s minus 19/128,"},{"Start":"06:58.630 ","End":"07:03.410","Text":"which in decimal would give you minus"},{"Start":"07:03.410 ","End":"07:12.255","Text":"0.0390625 and that\u0027s our final answer."},{"Start":"07:12.255 ","End":"07:17.215","Text":"If you wanted to write this out in slightly different way as we\u0027ve done previously,"},{"Start":"07:17.215 ","End":"07:20.720","Text":"you could take this number here and you can"},{"Start":"07:20.720 ","End":"07:25.100","Text":"multiply it by 2 to the power whatever the exponent is,"},{"Start":"07:25.100 ","End":"07:28.255","Text":"which in this case was minus 4."},{"Start":"07:28.255 ","End":"07:31.040","Text":"If you\u0027d taken minus 5/8,"},{"Start":"07:31.040 ","End":"07:36.520","Text":"which is what this is giving you here and multiplied it by 2^minus 4,"},{"Start":"07:36.520 ","End":"07:39.643","Text":"you would find you get exactly the same number as you get here,"},{"Start":"07:39.643 ","End":"07:41.360","Text":"so we know we\u0027ve done the right thing."},{"Start":"07:41.360 ","End":"07:46.280","Text":"There we go. This is quite long question, 3 part question."},{"Start":"07:46.280 ","End":"07:47.945","Text":"What we\u0027ve seen is,"},{"Start":"07:47.945 ","End":"07:50.390","Text":"when you have a number that is"},{"Start":"07:50.390 ","End":"07:55.340","Text":"a positive mantissa and you\u0027re shifting it in a negative direction,"},{"Start":"07:55.340 ","End":"07:59.590","Text":"you\u0027re making a smaller positive number and you put zeros in front of it."},{"Start":"07:59.590 ","End":"08:03.950","Text":"In part b, we had a negative number,"},{"Start":"08:03.950 ","End":"08:08.375","Text":"but we were shifting it in the right hand direction because we had a positive exponent,"},{"Start":"08:08.375 ","End":"08:10.940","Text":"we\u0027re just making a bigger negative number,"},{"Start":"08:10.940 ","End":"08:13.085","Text":"and that\u0027s why we ended up with the answer."},{"Start":"08:13.085 ","End":"08:14.225","Text":"But the final one,"},{"Start":"08:14.225 ","End":"08:21.049","Text":"we had a negative mantissa and a negative exponent which is making a negative number,"},{"Start":"08:21.049 ","End":"08:23.390","Text":"preserve its sign, it\u0027s still going to be negative,"},{"Start":"08:23.390 ","End":"08:24.950","Text":"but it\u0027s going to be a smaller number,"},{"Start":"08:24.950 ","End":"08:27.305","Text":"meaning it\u0027s going to be closer to 0"},{"Start":"08:27.305 ","End":"08:30.440","Text":"because of the way that we\u0027re shifting the binary point."},{"Start":"08:30.440 ","End":"08:33.800","Text":"That\u0027s why we ended up with very small number here."},{"Start":"08:33.800 ","End":"08:38.490","Text":"That\u0027s us done for this exercise. I\u0027ll see you in the next one."}],"ID":26326},{"Watched":false,"Name":"Exercise 5 parts A-C","Duration":"7m 43s","ChapterTopicVideoID":25506,"CourseChapterTopicPlaylistID":237671,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.775","Text":"Hi again everyone. In this question,"},{"Start":"00:02.775 ","End":"00:06.930","Text":"we\u0027ve been asked to take our set of decimal numbers,"},{"Start":"00:06.930 ","End":"00:10.840","Text":"and they\u0027re to be expressed using sign and magnitude this time"},{"Start":"00:10.840 ","End":"00:15.100","Text":"for the mantissa and two\u0027s complement for the exponent,"},{"Start":"00:15.100 ","End":"00:18.625","Text":"and then we will have to have a sign bit right at the beginning,"},{"Start":"00:18.625 ","End":"00:20.480","Text":"because this is a sign and magnitude,"},{"Start":"00:20.480 ","End":"00:25.030","Text":"this followed by the exponent and followed by 11-bits for the mantissa,"},{"Start":"00:25.030 ","End":"00:28.030","Text":"so let\u0027s go ahead and do this."},{"Start":"00:28.030 ","End":"00:31.955","Text":"I\u0027ll start with trying to convert this number into a binary number,"},{"Start":"00:31.955 ","End":"00:34.120","Text":"and that\u0027s pretty straightforward,"},{"Start":"00:34.120 ","End":"00:35.800","Text":"is a fixed point binary number."},{"Start":"00:35.800 ","End":"00:39.945","Text":"I keep going until I get to a column that\u0027s bigger than what I need,"},{"Start":"00:39.945 ","End":"00:41.140","Text":"so 16 will be bigger,"},{"Start":"00:41.140 ","End":"00:42.745","Text":"so I don\u0027t need to go that far."},{"Start":"00:42.745 ","End":"00:48.370","Text":"Then I\u0027ll go in this direction and I can see from this number,"},{"Start":"00:48.370 ","End":"00:50.995","Text":"I don\u0027t need to go beyond 1/8,"},{"Start":"00:50.995 ","End":"00:54.250","Text":"so 13 is what I need to make up."},{"Start":"00:54.250 ","End":"00:56.260","Text":"To get to 13,"},{"Start":"00:56.260 ","End":"00:59.510","Text":"I need 8 plus 4 will give me 12,"},{"Start":"00:59.510 ","End":"01:00.840","Text":"I don\u0027t need the 2,"},{"Start":"01:00.840 ","End":"01:02.685","Text":"but I need the one that\u0027s 13,"},{"Start":"01:02.685 ","End":"01:04.245","Text":"8 plus 4 plus 1,"},{"Start":"01:04.245 ","End":"01:07.715","Text":"and then 0.375 is actually 3/8."},{"Start":"01:07.715 ","End":"01:12.715","Text":"I can work that out by multiplying this by 8 and I should get 3."},{"Start":"01:12.715 ","End":"01:15.735","Text":"3/8 would mean nothing there,"},{"Start":"01:15.735 ","End":"01:18.085","Text":"but 1 there and 1 there."},{"Start":"01:18.085 ","End":"01:20.270","Text":"I\u0027ve got my mantissa now,"},{"Start":"01:20.270 ","End":"01:22.825","Text":"but as you will remember,"},{"Start":"01:22.825 ","End":"01:25.225","Text":"we always have a binary point here."},{"Start":"01:25.225 ","End":"01:28.460","Text":"That\u0027s where the binary point when we store binary numbers."},{"Start":"01:28.460 ","End":"01:30.860","Text":"We\u0027re implying that the binary point is there."},{"Start":"01:30.860 ","End":"01:35.375","Text":"I have to shift my binary point from where it is to over here,"},{"Start":"01:35.375 ","End":"01:37.442","Text":"and that would involve me shifting at 1,"},{"Start":"01:37.442 ","End":"01:39.650","Text":"2, 3 places."},{"Start":"01:39.650 ","End":"01:44.480","Text":"That is what I\u0027m looking to make my exponent, is 3,"},{"Start":"01:44.480 ","End":"01:51.935","Text":"and to get an exponent of 3 using my exponent stored in two\u0027s complement,"},{"Start":"01:51.935 ","End":"01:54.950","Text":"I would have the following column headings,"},{"Start":"01:54.950 ","End":"02:00.645","Text":"and so 3 would be the 2 and the 1 column and 0s elsewhere."},{"Start":"02:00.645 ","End":"02:02.370","Text":"I\u0027ve done the experiment,"},{"Start":"02:02.370 ","End":"02:04.050","Text":"I\u0027ve got my mantissa,"},{"Start":"02:04.050 ","End":"02:06.110","Text":"all I need to do is inspect the sign bit,"},{"Start":"02:06.110 ","End":"02:07.565","Text":"this is a positive number,"},{"Start":"02:07.565 ","End":"02:11.014","Text":"so the sign bit stays as 0,"},{"Start":"02:11.014 ","End":"02:13.250","Text":"but I do need to include it in this format,"},{"Start":"02:13.250 ","End":"02:18.136","Text":"so 0 for the sign bit, 0, 0, 1,"},{"Start":"02:18.136 ","End":"02:19.650","Text":"1 for the exponent,"},{"Start":"02:19.650 ","End":"02:22.368","Text":"and then 1, 1, 0, 1, 0, 1,"},{"Start":"02:22.368 ","End":"02:26.990","Text":"1 for the mantissa."},{"Start":"02:26.990 ","End":"02:29.192","Text":"However, my mantissa is only 1, 2,"},{"Start":"02:29.192 ","End":"02:31.735","Text":"3, 4, 5, 6,7-bits,"},{"Start":"02:31.735 ","End":"02:34.105","Text":"so it was supposed to be 11-bits,"},{"Start":"02:34.105 ","End":"02:39.035","Text":"so I need to pad it out with 4 more zeros at the end."},{"Start":"02:39.035 ","End":"02:43.505","Text":"I now have my final answer in this format here with a sign bit,"},{"Start":"02:43.505 ","End":"02:48.125","Text":"4-bits for the exponent and 11-bits for the mantissa."},{"Start":"02:48.125 ","End":"02:50.435","Text":"Let\u0027s have a go at part b then,"},{"Start":"02:50.435 ","End":"02:51.950","Text":"going to be similar,"},{"Start":"02:51.950 ","End":"02:54.259","Text":"but this time we\u0027ve got a negative mantissa."},{"Start":"02:54.259 ","End":"02:57.455","Text":"But for the moment we\u0027ll just work out the binary value"},{"Start":"02:57.455 ","End":"03:01.625","Text":"of the mantissa and then worry about the sign later."},{"Start":"03:01.625 ","End":"03:03.710","Text":"If I go to 16, that\u0027s fine,"},{"Start":"03:03.710 ","End":"03:05.480","Text":"but if I go to 32 it\u0027s bigger than this,"},{"Start":"03:05.480 ","End":"03:06.950","Text":"so I don\u0027t need to go any further."},{"Start":"03:06.950 ","End":"03:09.440","Text":"0.25 is obviously a quarter,"},{"Start":"03:09.440 ","End":"03:13.820","Text":"so I only need 2 columns over here and write out my number"},{"Start":"03:13.820 ","End":"03:19.605","Text":"then 31.25,16 plus 8 would give me 24,"},{"Start":"03:19.605 ","End":"03:22.410","Text":"plus 4 is 28, plus 2 is 30,"},{"Start":"03:22.410 ","End":"03:23.700","Text":"plus 1 is 31,"},{"Start":"03:23.700 ","End":"03:25.515","Text":"so I need all the ones there,"},{"Start":"03:25.515 ","End":"03:27.525","Text":"a 0 here,"},{"Start":"03:27.525 ","End":"03:29.790","Text":"and I\u0027ll need a 1 for my quarter."},{"Start":"03:29.790 ","End":"03:32.155","Text":"I\u0027ve got my mantissa again."},{"Start":"03:32.155 ","End":"03:34.250","Text":"I need to shift"},{"Start":"03:34.250 ","End":"03:38.765","Text":"the binary point to here because that\u0027s where we always imply the binary point is,"},{"Start":"03:38.765 ","End":"03:40.635","Text":"to do that I\u0027d have to go 1, 2, 3,"},{"Start":"03:40.635 ","End":"03:47.120","Text":"4 places, so my exponent is 4 this time,"},{"Start":"03:47.120 ","End":"03:52.830","Text":"and in binary, using 4-bits two\u0027s complement,"},{"Start":"03:52.830 ","End":"03:55.815","Text":"that would be just as far as."},{"Start":"03:55.815 ","End":"03:57.630","Text":"There\u0027s my exponent,"},{"Start":"03:57.630 ","End":"03:59.535","Text":"so that part is done again,"},{"Start":"03:59.535 ","End":"04:04.040","Text":"and now the only difference with the previous one is I\u0027ve got a negative number,"},{"Start":"04:04.040 ","End":"04:10.280","Text":"so I need to have a sign bit that\u0027s a 1 to indicate a negative number."},{"Start":"04:10.280 ","End":"04:13.625","Text":"Then I have my exponent,"},{"Start":"04:13.625 ","End":"04:17.090","Text":"which is 0, 1, 0,"},{"Start":"04:17.090 ","End":"04:21.800","Text":"0 and then I have my mantissa."},{"Start":"04:21.800 ","End":"04:23.500","Text":"Again, I\u0027ve got 1, 2,"},{"Start":"04:23.500 ","End":"04:25.635","Text":"3, 4,5, 6,"},{"Start":"04:25.635 ","End":"04:29.020","Text":"7 here, and I need to write that in 3,"},{"Start":"04:29.020 ","End":"04:32.720","Text":"4, 5, 1, 0, 1, there\u0027s my 7-bits."},{"Start":"04:32.720 ","End":"04:34.580","Text":"But I\u0027m supposed to have 11,"},{"Start":"04:34.580 ","End":"04:39.185","Text":"so I have to pad it by putting 4 zeros at the end,"},{"Start":"04:39.185 ","End":"04:41.705","Text":"and so there is part b done."},{"Start":"04:41.705 ","End":"04:43.780","Text":"Moving on to the final one,"},{"Start":"04:43.780 ","End":"04:48.915","Text":"Part C. This time we got minus 92.9375,"},{"Start":"04:48.915 ","End":"04:52.270","Text":"so just go with our columns,"},{"Start":"04:54.860 ","End":"04:57.070","Text":"1, 2, 4, 8, 16, 32,"},{"Start":"04:57.070 ","End":"04:58.130","Text":"64, if I carried on,"},{"Start":"04:58.130 ","End":"05:01.775","Text":"it would be a 128, but that\u0027s bigger, so I don\u0027t need that."},{"Start":"05:01.775 ","End":"05:04.775","Text":"To make 92,"},{"Start":"05:04.775 ","End":"05:09.570","Text":"I\u0027ll need 64, don\u0027t need the 32 that make it too big,"},{"Start":"05:09.570 ","End":"05:13.635","Text":"16 would make it 80 plus 8 will make it 88,"},{"Start":"05:13.635 ","End":"05:17.570","Text":"plus 4 would make it 92 exactly so I don\u0027t need anything else."},{"Start":"05:17.570 ","End":"05:19.345","Text":"There\u0027s my 92,"},{"Start":"05:19.345 ","End":"05:22.780","Text":"and then the 9.9375,"},{"Start":"05:22.780 ","End":"05:26.660","Text":"I don\u0027t know how many columns I need to go over,"},{"Start":"05:26.660 ","End":"05:28.610","Text":"but let\u0027s write out."},{"Start":"05:28.610 ","End":"05:32.000","Text":"That set, and let\u0027s stop say at 16."},{"Start":"05:32.000 ","End":"05:33.725","Text":"Let\u0027s try out 16."},{"Start":"05:33.725 ","End":"05:38.750","Text":"If we were to multiply this number by 16 and get a whole number,"},{"Start":"05:38.750 ","End":"05:40.685","Text":"then we know that we don\u0027t need to go any further."},{"Start":"05:40.685 ","End":"05:41.840","Text":"If we don\u0027t get a whole number,"},{"Start":"05:41.840 ","End":"05:43.160","Text":"then we need some more columns,"},{"Start":"05:43.160 ","End":"05:46.130","Text":"but I can just tell you that actually 16 will do it."},{"Start":"05:46.130 ","End":"05:48.320","Text":"If you multiply 16 by this,"},{"Start":"05:48.320 ","End":"05:49.700","Text":"you\u0027ll get 15,"},{"Start":"05:49.700 ","End":"05:53.960","Text":"so what we\u0027re trying to make up here is 15 sixteenths,"},{"Start":"05:53.960 ","End":"05:57.200","Text":"so that will be, these 3 columns will need a 1,"},{"Start":"05:57.200 ","End":"06:00.345","Text":"and I don\u0027t need the last one."},{"Start":"06:00.345 ","End":"06:03.120","Text":"Let\u0027s put our 1\u0027s in here,"},{"Start":"06:03.120 ","End":"06:05.430","Text":"then there\u0027ll be 15 sixteenths,"},{"Start":"06:05.430 ","End":"06:10.925","Text":"and I\u0027ve got my number now and that\u0027s me done with my mantissa,"},{"Start":"06:10.925 ","End":"06:14.940","Text":"I now need to work out where do I put my binary point,"},{"Start":"06:14.940 ","End":"06:17.165","Text":"and it\u0027s obviously going to be here."},{"Start":"06:17.165 ","End":"06:18.710","Text":"How many places do I have to shift it?"},{"Start":"06:18.710 ","End":"06:21.456","Text":"By 1, 2, 3, 4, 5,"},{"Start":"06:21.456 ","End":"06:26.640","Text":"6 places, so my exponent is 6,"},{"Start":"06:26.640 ","End":"06:32.160","Text":"and with my columns I need 4 and 2,"},{"Start":"06:32.160 ","End":"06:33.525","Text":"and I think there,"},{"Start":"06:33.525 ","End":"06:35.670","Text":"that\u0027s the exponent,"},{"Start":"06:35.670 ","End":"06:37.810","Text":"so I\u0027m done now,"},{"Start":"06:37.810 ","End":"06:39.695","Text":"I\u0027ve got a negative number,"},{"Start":"06:39.695 ","End":"06:41.900","Text":"so I need a sign bit of 1."},{"Start":"06:41.900 ","End":"06:44.420","Text":"I\u0027ve got an exponent of that,"},{"Start":"06:44.420 ","End":"06:52.646","Text":"0,1,1,0 and I\u0027ve got my mantissa of 1,"},{"Start":"06:52.646 ","End":"06:53.777","Text":"0, 1, 1, 1, 0, 0, 1, 1, 1,"},{"Start":"06:53.777 ","End":"07:00.785","Text":"0 and actually this time around,"},{"Start":"07:00.785 ","End":"07:02.465","Text":"I\u0027ve got 1, 2, 3, 4, 5,"},{"Start":"07:02.465 ","End":"07:04.810","Text":"6, 7, 8, 9, 10, 11."},{"Start":"07:04.810 ","End":"07:06.770","Text":"Magically I\u0027ve got 11,"},{"Start":"07:06.770 ","End":"07:08.750","Text":"so there\u0027s no padding necessary."},{"Start":"07:08.750 ","End":"07:11.530","Text":"This is a 16-bit number,"},{"Start":"07:11.530 ","End":"07:15.665","Text":"and just the format that we\u0027ve been asked for at the beginning."},{"Start":"07:15.665 ","End":"07:18.110","Text":"We\u0027re done with all 3 parts,"},{"Start":"07:18.110 ","End":"07:24.230","Text":"and this is a format you do see actually this is the closest to the real way"},{"Start":"07:24.230 ","End":"07:27.410","Text":"that floating point numbers are stored in a format"},{"Start":"07:27.410 ","End":"07:31.250","Text":"called I triple E that uses 32-bits not 16,"},{"Start":"07:31.250 ","End":"07:33.365","Text":"but it\u0027s a very similar principle,"},{"Start":"07:33.365 ","End":"07:36.680","Text":"so that\u0027s why it was worth doing this exercise to"},{"Start":"07:36.680 ","End":"07:40.880","Text":"understand how it would be stored for real on a real system."},{"Start":"07:40.880 ","End":"07:44.550","Text":"Great, so I\u0027ll see you in the next exercise."}],"ID":26327},{"Watched":false,"Name":"Exercise 6 parts A-C","Duration":"7m 56s","ChapterTopicVideoID":25507,"CourseChapterTopicPlaylistID":237671,"HasSubtitles":true,"ThumbnailPath":null,"UploadDate":null,"DurationForVideoObject":null,"Description":null,"MetaTitle":null,"MetaDescription":null,"Canonical":null,"VideoComments":[],"Subtitles":[{"Start":"00:00.000 ","End":"00:02.175","Text":"Hello, welcome back everyone."},{"Start":"00:02.175 ","End":"00:05.370","Text":"In this question, we\u0027ve been asked to normalize"},{"Start":"00:05.370 ","End":"00:09.510","Text":"a binary number which is in 2\u0027s complement,"},{"Start":"00:09.510 ","End":"00:15.825","Text":"and uses 16 bits with the least significant 4 bits representing the exponent."},{"Start":"00:15.825 ","End":"00:22.050","Text":"The first thing I\u0027m going to do is mark-off the exponent which is there."},{"Start":"00:22.050 ","End":"00:23.625","Text":"If I work this out,"},{"Start":"00:23.625 ","End":"00:30.200","Text":"the 2\u0027s complement values for the column headings will be minus 8,"},{"Start":"00:30.200 ","End":"00:32.265","Text":"4, 2, and 1,"},{"Start":"00:32.265 ","End":"00:37.785","Text":"and so therefore my exponent will be 5."},{"Start":"00:37.785 ","End":"00:39.870","Text":"There\u0027s my exponent to start with."},{"Start":"00:39.870 ","End":"00:42.200","Text":"Now, to do normalization,"},{"Start":"00:42.200 ","End":"00:46.490","Text":"what you\u0027re looking for is you\u0027re looking for a particular pattern at the beginning."},{"Start":"00:46.490 ","End":"00:48.380","Text":"If you see a 0,"},{"Start":"00:48.380 ","End":"00:52.950","Text":"0 as the first 2 bits or a 1,"},{"Start":"00:52.950 ","End":"00:55.561","Text":"1 as the first 2 bits,"},{"Start":"00:55.561 ","End":"00:58.850","Text":"you know that the number has not been normalized."},{"Start":"00:58.850 ","End":"01:02.370","Text":"What we\u0027re looking to find I should say,"},{"Start":"01:02.370 ","End":"01:06.370","Text":"is either 0 and a 1 or a 1 and a 0,"},{"Start":"01:06.370 ","End":"01:10.655","Text":"that would indicate that it has been stored in normalized format."},{"Start":"01:10.655 ","End":"01:12.580","Text":"Coming back to question a,"},{"Start":"01:12.580 ","End":"01:14.990","Text":"we can see that this is not normalized,"},{"Start":"01:14.990 ","End":"01:19.790","Text":"there\u0027s 2 consecutive 0s at the beginning and the next 2 numbers happen to be 0 as well."},{"Start":"01:19.790 ","End":"01:25.580","Text":"We\u0027re looking for the first occurrence of a 0 and a 1 and the first place we find it."},{"Start":"01:25.580 ","End":"01:30.350","Text":"In this number, implied binary point would be here."},{"Start":"01:30.350 ","End":"01:33.260","Text":"But where we find the first 0,"},{"Start":"01:33.260 ","End":"01:35.830","Text":"1, which is where we\u0027d want it to be."},{"Start":"01:35.830 ","End":"01:39.375","Text":"What we\u0027d like to do is to shift the mantissa."},{"Start":"01:39.375 ","End":"01:46.675","Text":"Shift the mantissa so that the binary point is 2 places over from the beginning."},{"Start":"01:46.675 ","End":"01:49.795","Text":"That would give us a mantissa that would look like this."},{"Start":"01:49.795 ","End":"01:51.540","Text":"It\u0027s the same number,"},{"Start":"01:51.540 ","End":"01:54.870","Text":"but 2 of the leading 0s have been removed."},{"Start":"01:54.870 ","End":"01:57.530","Text":"I can do that, that\u0027s absolutely fine,"},{"Start":"01:57.530 ","End":"02:05.105","Text":"but I\u0027ll now need to adjust my exponent by the amount of places I shifted by which was 2."},{"Start":"02:05.105 ","End":"02:12.570","Text":"I\u0027m going to need to take 2 of my exponent and so I\u0027m now looking to make 3,"},{"Start":"02:12.570 ","End":"02:16.210","Text":"and that would be 0011."},{"Start":"02:16.210 ","End":"02:22.790","Text":"I now have my adjusted mantissa and my adjusted exponent,"},{"Start":"02:22.790 ","End":"02:27.658","Text":"and I can write those down in the final answer,"},{"Start":"02:27.658 ","End":"02:34.190","Text":"0101010111."},{"Start":"02:34.190 ","End":"02:35.900","Text":"However, looking at this,"},{"Start":"02:35.900 ","End":"02:38.050","Text":"I\u0027ve only got 2,"},{"Start":"02:38.050 ","End":"02:40.850","Text":"4, 6, 8, 10 bits."},{"Start":"02:40.850 ","End":"02:44.300","Text":"The answer is to be in a 16-bit encoding,"},{"Start":"02:44.300 ","End":"02:47.840","Text":"so I need to pad it by having 2 bits at the end before I add"},{"Start":"02:47.840 ","End":"02:51.440","Text":"my 4 bits worth of exponent and so I\u0027ve done that."},{"Start":"02:51.440 ","End":"02:55.700","Text":"There\u0027s my 2 zeros and then I can add the exponent onto the end."},{"Start":"02:55.700 ","End":"02:58.420","Text":"Now I have completed Part a,"},{"Start":"02:58.420 ","End":"03:04.445","Text":"that is the normalized version of the original number that we were given."},{"Start":"03:04.445 ","End":"03:09.395","Text":"If you were to work this out by converting this to binary,"},{"Start":"03:09.395 ","End":"03:11.785","Text":"multiplying it by 2^5,"},{"Start":"03:11.785 ","End":"03:17.630","Text":"you\u0027d find it\u0027s exactly the same number as this mantissa value multiplied by"},{"Start":"03:17.630 ","End":"03:21.920","Text":"2^3 and so very straightforward calculation"},{"Start":"03:21.920 ","End":"03:25.355","Text":"to do that now that we\u0027ve done some exercises on it previously."},{"Start":"03:25.355 ","End":"03:27.920","Text":"Part B, let\u0027s have a look at Part B."},{"Start":"03:27.920 ","End":"03:29.930","Text":"It\u0027s going to be exactly the same thing again."},{"Start":"03:29.930 ","End":"03:39.170","Text":"Let\u0027s put a line here just to indicate what our exponent is and it\u0027s 0100,"},{"Start":"03:39.170 ","End":"03:46.009","Text":"which I can say straightaway is going to be 4 and now let\u0027s look at the mantissa."},{"Start":"03:46.009 ","End":"03:48.710","Text":"The mantissa has an implied binary point there."},{"Start":"03:48.710 ","End":"03:50.805","Text":"Of course, we don\u0027t like that,"},{"Start":"03:50.805 ","End":"03:53.055","Text":"that\u0027s not normalized 11."},{"Start":"03:53.055 ","End":"03:57.320","Text":"We\u0027re looking for the first occurrence where there is not 2 1s next to each other."},{"Start":"03:57.320 ","End":"04:03.020","Text":"The first place where we find it is here where we find a 10"},{"Start":"04:03.020 ","End":"04:09.065","Text":"and so we want to shift 1 to 3 places exponent."},{"Start":"04:09.065 ","End":"04:12.835","Text":"We want to take 3 off 4."},{"Start":"04:12.835 ","End":"04:21.090","Text":"Obviously that\u0027s going to give us 1 so our exponent is going to be that now."},{"Start":"04:21.090 ","End":"04:22.900","Text":"Got the exponent,"},{"Start":"04:22.900 ","End":"04:26.135","Text":"I\u0027ll just write out the mantissa again."},{"Start":"04:26.135 ","End":"04:27.950","Text":"This time shifted over,"},{"Start":"04:27.950 ","End":"04:33.335","Text":"so it\u0027s 101011 and 0, 0, 0."},{"Start":"04:33.335 ","End":"04:37.493","Text":"I\u0027ve taken it from this part of the number above."},{"Start":"04:37.493 ","End":"04:39.905","Text":"Great. I\u0027m pretty much done."},{"Start":"04:39.905 ","End":"04:43.335","Text":"What I need to do as obviously pad as well."},{"Start":"04:43.335 ","End":"04:45.233","Text":"Let\u0027s write the initial,"},{"Start":"04:45.233 ","End":"04:48.749","Text":"pad the number down and work out how much padding we need afterwards."},{"Start":"04:48.749 ","End":"04:53.670","Text":"It\u0027s 10101100."},{"Start":"04:53.670 ","End":"04:57.960","Text":"I need to add another 2 bits there, 2,"},{"Start":"04:57.960 ","End":"04:59.730","Text":"4, 6, 8,"},{"Start":"04:59.730 ","End":"05:02.280","Text":"10, another 4 zeros on the end,"},{"Start":"05:02.280 ","End":"05:09.470","Text":"and I\u0027ve got 12 bits now and then I add my exponent at the end and now I\u0027ve got 12 bits,"},{"Start":"05:09.470 ","End":"05:11.285","Text":"16 bits in total."},{"Start":"05:11.285 ","End":"05:12.995","Text":"Just check that again, 2,"},{"Start":"05:12.995 ","End":"05:14.795","Text":"4, 6, 8,"},{"Start":"05:14.795 ","End":"05:18.480","Text":"10, 12, 14, 16."},{"Start":"05:18.480 ","End":"05:20.970","Text":"I\u0027m done with Part b."},{"Start":"05:20.970 ","End":"05:24.105","Text":"The final one, Part c. Once again,"},{"Start":"05:24.105 ","End":"05:25.770","Text":"let\u0027s partition off our exponent."},{"Start":"05:25.770 ","End":"05:29.209","Text":"You might notice now that this is a negative exponent."},{"Start":"05:29.209 ","End":"05:32.925","Text":"If I write that down 1110,"},{"Start":"05:32.925 ","End":"05:36.450","Text":"the column headings for that would be 1, 2, 4,"},{"Start":"05:36.450 ","End":"05:43.050","Text":"minus 8 as the previous and what that would give us is minus 8 plus 6,"},{"Start":"05:43.050 ","End":"05:44.790","Text":"which is minus 2."},{"Start":"05:44.790 ","End":"05:48.040","Text":"We start off with minus 2 as our exponents."},{"Start":"05:48.040 ","End":"05:52.535","Text":"We\u0027re making a smaller number by this exponent."},{"Start":"05:52.535 ","End":"05:56.975","Text":"Let\u0027s now move on to what the mantissa would be."},{"Start":"05:56.975 ","End":"06:00.080","Text":"Once again, we\u0027re looking to take"},{"Start":"06:00.080 ","End":"06:04.625","Text":"the implied binary point and move it along to somewhere more acceptable."},{"Start":"06:04.625 ","End":"06:09.285","Text":"We\u0027re looking for the first occurrence of 10,"},{"Start":"06:09.285 ","End":"06:12.255","Text":"and we find it over here."},{"Start":"06:12.255 ","End":"06:16.170","Text":"We need to adjust by 1, 2 places."},{"Start":"06:16.170 ","End":"06:20.310","Text":"We started with minus 2 and we need to"},{"Start":"06:20.310 ","End":"06:24.560","Text":"take 2 off that and that will obviously give us minus 4,"},{"Start":"06:24.560 ","End":"06:31.365","Text":"so minus 4 is going to be minus 8 plus 4 and that\u0027s it."},{"Start":"06:31.365 ","End":"06:35.285","Text":"There is our experiment for this adjusted number."},{"Start":"06:35.285 ","End":"06:39.530","Text":"Let\u0027s just write down the mantissa underneath in red as we\u0027ve done for previous ones"},{"Start":"06:39.530 ","End":"06:47.115","Text":"1011100000, 1 missing."},{"Start":"06:47.115 ","End":"06:49.560","Text":"There we go. I\u0027ve got 1,"},{"Start":"06:49.560 ","End":"06:51.270","Text":"2, 3, 4, 5,"},{"Start":"06:51.270 ","End":"06:52.980","Text":"6, 7, 8, 9,"},{"Start":"06:52.980 ","End":"06:56.390","Text":"10, digits for my mantissa,"},{"Start":"06:56.390 ","End":"07:05.115","Text":"I need 12 so I\u0027m going to pad it with another 2 on the end there, so 101110,"},{"Start":"07:05.115 ","End":"07:15.660","Text":"2, 3, 4 and then 2 more and then I add my exponent at the end 1100."},{"Start":"07:15.660 ","End":"07:17.490","Text":"Just check that I\u0027ve got that right."},{"Start":"07:17.490 ","End":"07:19.695","Text":"2, 4, 6,"},{"Start":"07:19.695 ","End":"07:21.255","Text":"8, 10,"},{"Start":"07:21.255 ","End":"07:22.500","Text":"12, 14,"},{"Start":"07:22.500 ","End":"07:28.685","Text":"16 and I\u0027m done and I\u0027ve normalized all 3 numbers now."},{"Start":"07:28.685 ","End":"07:30.200","Text":"As I said earlier,"},{"Start":"07:30.200 ","End":"07:33.800","Text":"you could work out what the original number"},{"Start":"07:33.800 ","End":"07:38.119","Text":"was in the method that we\u0027ve used before by converting"},{"Start":"07:38.119 ","End":"07:42.530","Text":"this to its bits point binary equivalent and then multiplying"},{"Start":"07:42.530 ","End":"07:47.160","Text":"it by 2 to the exponent and then do the same thing for our new number."},{"Start":"07:47.160 ","End":"07:48.770","Text":"You should find they work out to be"},{"Start":"07:48.770 ","End":"07:51.955","Text":"exactly the same decimal value or you\u0027ve done something wrong."},{"Start":"07:51.955 ","End":"07:56.640","Text":"That\u0027s us done then with normalized numbers. Thank you very much."}],"ID":26328}],"Thumbnail":null,"ID":237671}]
[{"ID":217268,"Videos":[30071,30072,30073,30074,30075,30076,30077,30078,30079,30080,30081,30082,30083,30084,30085,30086,30087]},{"ID":237670,"Videos":[30244,30241,30242,30243,26329,26330,26331,26332,26333,26334,26335,26336,26337,26338,26339,26340]},{"ID":237671,"Videos":[26323,26324,26325,26326,26327,26328]}];
[30071,30072,30073,30074,30075,30076,30077,30078,30079,30080,30081,30082,30083,30084,30085,30086,30087];
1.2
11

Continue watching

Get unlimited access to 1500 subjects including personalised modules
Start your free trial
proprep
General Modules
  • Intermediate And Advanced Algebra
  • Linear Algebra
  • Calculus I
  • Calculus II
  • Calculus III
  • Complex Analysis
  • Ordinary Differential Equations
  • Partial Differential Equations
  • Probability
  • Statistics
  • Statistics Arabic
  • Physics 1 Mechanics Waves and Thermodynamics
  • Physics 2 Electricity and Magnetism
  • Physics Arabic Introduction
  • General Chemistry
  • General Chemistry Arabic
  • General Chemistry Spanish
  • Organic Chemistry
  • Organic Chemistry Arabic
  • Introduction to Biology
  • Biochemistry
  • Introduction to Financial Accounting and Reporting
  • Principles of Programming
  • Learn Parametric CAD and CAM Design with Fusion 360
Company
  • Blog
  • Press Room
  • For Educators
Contact us
  • Call us:+44-161-850-4375
  • Email us:[email protected]
Social
  • Facebook
  • Twitter
  • LinkedIn

  • Youtube
  • Instagram
  • Whatsapp
  • © 2023 Proprep. All rights reserved.
  • Terms of Service
  • Cookies Policy
  • Privacy Notice

Proprep is not endorsed by any college or university

  • © 2023 Proprep. All rights reserved.
All
Universities
Modules/Textbooks
Chapters
Topics
Close

Universities

Customised Modules

General Modules

Textbooks

Chapters

Topics

We couldn't find any results for

Can't find your subject or module?

Upload your syllabus now and our team will create a customised module especially for you!
Upload Syllabus

Announcement

Ok
Yes No
Alert

Upload your syllabus

and we will create a personalised module (just for you) in less than 48 hours...

Your file

Drag and drop files or browse Add file
Uploaded Image

Sign up to get your personalised module

See how it works

Now check your email for your code

Send code again

Verify code

What subjects are you looking for?

Subjects

Enter your email and will notify you when we add the subject

Upload syllabus

Drag and drop files or browse Add file
Uploaded Image
Cancel