System: You are ChatGPT, a large language model trained by OpenAI.
User: I will send you a body of text, I will then state what you do next.
User: 194 25The binary number system INTRODUCTIONIn the previous chapter we looked at the common number systems and bases. We use different number bases, as humans tend to work with decimals and computers can only process data in binary. As computer science students, we need to know how binary works and how the computer carries out calculations in binary. SPECIFICATION COVERAGE 3.5.4.1 Unsigned binary3.5.4.2 Unsigned binary arithmetic3.5.4.3 Signed binary using two’s complement3.5.4.4 Numbers with a fractional part3.5.4.5 Rounding errors (A level only)3.5.4.6 Absolute and relative errors (A level only)3.5.4.7 Range and precision (A level only)3.5.4.8 Normalisation and ﬂ  oating point form (A level only) 3.5.4.9 Underﬂ  ow and overﬂ  ow (A level only)LEARNING OBJECTIVES In this chapter you will learn: •how to add and multiply positive binary integers•how to work with signed binary numbers using two’s complement •how ﬁ  xed numbers are used to represent fractions.
 A-level students will learn: •how ﬂ  oating point numbers are used to represent fractions•what overﬂ  ow  and underﬂ  ow are •how to round binary numbers•what precision and normalisation are with reference to binary numbers. ●Adding unsigned binary integersIn the previous chapter we looked at converting between number bases. As computers can only process binary data, it is also important to understandhow they carry out basic calculations using binary.KEYWORDUnsigned binary: binary that represents positive numbers only.195TYPES OF NUMBERSTo add two numbers together in binary, first line up the numbers in the same way as you would do column addition in decimal: 00110010+101101011110011111 Now add the columns starting from the right-hand side, remembering that you can only use 0s and 1s: ●0 + 0 will equal 0 so put 0 on the answer line●0 + 1 or 1 + 0 will both equal 1 so put 1 in the answer line ●1 + 1 will equal 10 (one, zero) so you will put 0 in the answer line and carry the 1●1 + 1 + 1 will equal 11 (one, one) so you will put 1 in the answer line and carry the 1 You can check your answer back by converting all the numbers to decimal, carrying out the addition and then converting the answer back to binary. In this case, the first number is 50, the second number is 181, so the answer should be 231. ●Multiplying unsigned binary integersTo multiply in binary, you multiply the first number by each of the digitsof the second number in turn starting from the right-hand side (in thesame way that you would do multiplication in decimal). This means youare either multiplying each digit by 0 or by 1, which will give you either a0 or 1 as the answer. You then do the same for the next digit, shifting youranswers to the left as you would in decimal multiplication.
 You then carry out a binary addition to find the final answer. For example,to multiply 11011 by 11: 11011×11 11011 11011010001 1111Again you can work this out by converting the binary to decimal to check your answer. In this case the first number is 27 (twenty-seven), the second number is 3 (three), so the answer is 81 (eighty-one). ●Types of numbersIn computing terms it is important to distinguish between different types ofnumbers. So far in this chapter we have only looked at integers, which arewhole numbers. More specifically we have only looked at unsigned integers,which means that all the numbers have been positive. Computers also needto handle real numbers – positive and negative numbers which may beshown to several decimal places. Many computer applications will requirevery large or very small numbers to be handled to a high degree of accuracy.Note the  zero on the LSB as the numbers have been shifted to the left.25 The binary number system 196●Two’s complement  is a method used to represent signed integers in binary form. This means that it can be used to represent positive and negative integers. This method is very similar to the methods describedin Chapter 24 and so it is assumed that you already have a goodunderstanding of this before attempting this section. The purpose of thissection is to show how two’s complement can represent negative integers.
 Assume we want to convert the binary code 10011100 into decimal using two’s complement: ●Write out the denary equivalents as shown: 32 16 8 4 2 1 64 –128MSB LSB ●You will notice that with two’s complement, the most significantbit b ecomes negative. Using an 8-bit code, this means that the MSBrepresents a value of –128 ●Now write in the binary code: 32016 18 1412010640–128 1MSB LSB●Now add up the values: –1 28 + 16 + 8 + 4 = –100 Converting from denary to binary using two’s complement can be slightly more difficult for negative numbers as you will be starting from a negative number and working forward. Remember that with two’s complement, when the MSB is 1 it means that the number must be negative. You may find it easier to use the following method: ●To convert –102 into binary, ﬁrst write out the binary equivalent of +102as sh own: 32116 08 0412110641128 0MSB LSB●Starting at the LSB, write out the number again until you come to the first 1.
 ●Then reverse all the remaining bits, that is, 0 becomes 1 and 1 becomes 0. ●The number becomes 10011010.
 ●The number is now in two’s complement.32016 18140211064 0–1281MSB LSBTo check, add these up: –128 + 16 + 8 + 2 = –102 With 8 bits it is possible to represent 256 different numbers. These range from –128 to 127. For an arbitrary number of bits ( n), 2 n different values can be represented. If the n bits are used to store an unsigned binary value KEYWORD Two’s complement: a method of work ing with signed binary values.FIXED POINT NUMBERS 197then the highest value that could be represented would be 2 n – 1 as 0 is one of the values that can be represented. With two’s complement for 8 bits the range is –128 through to 127 and for n bits it would be –2 n–1 to 2 n–1 – 1.
 Adding and subtracting using two’s complementAdding numbers together using two’s complement is the same as adding numbers together in decimal: you add up the total and carry values across to the next column. For example, in decimal to add 48 to 83: 48 83+ 13111Binary addition is the same. To add 01101100 to 10001000: 0110110010001000+111101001 Remember that in binary 1 + 1 = 10 and that 1 + 1 + 1 = 11The only true arithmetic that the computer can carry out is addition. In order to carry out subtractions, the method used is to convert the number to be subtracted to a negative number, and then to add the negative number. For example 20 – 13 in denary would actually be performed by adding 20 to –13 giving the answer of 7. To do this in binary: ●Calculate the binary equivalent of 20 which equals 00010100●Calculate the binary equivalent of –13 which equals 11110011 ●Add 20 to –13 in binary form: 0001010011110011+00000111111 ●Check your answer back by converting it to denary and the answer is 7which is correct. ●You may notice that this calculation would have a final 1 to becar ried. This is called an ‘overflow bit’ and is handled separately to the calculation. There is more on this later in the chapter.
 ●Fixed point numbersIn order to represent real decimal numbers, that is, numbers with decimal places or a fractional part, fixed point representation can be used. In thesame way t hat decimal has a decimal point, binary has a binary point. The numbers after the binary point represent fractions. For example, if youhad an 8-bit binary code, you may place the binary point after the fourthbit as shown: 001100 0 1The binary point is not actually stored in the 8-bit code, its position is fixed by the programmer. It is shown here purely to aid understanding.KEYWORD Fixed point: where the decimal/binary  point is fixed within a number.25 The binary number system 198To convert this to a decimal number is a similar process to the other conversions we have done. This time, the digits after the binary point become fractions as follows: 2110011041801 214 18 116 The conversion of the bits before the binary point are handled in the same way as before with each value doubling as you move from right to left. The numbers after the binary point halve each time as you move from left to right as shown.
 Therefore the number above is4 + 2 + 14 + 18 giving a total of 6 38 or 6.375. The binary point can be placed anywhere within the byte but the position of the binary point restricts the size of the number that can be represented and also the accuracy of the number. With the binary point in the position shown in this example: ●The smallest number we could represent (apart from 0) is 0000.0001which is 1 16 or 0.0625.
 ●The next number we could represent is 0000.0010 which is 18, 216 or 0.125. It is not possible to represent any number between 0.0625 and 0.125 ●The largest number we could represent is 1111.1111 which is 151516 or 15.9375●Moving the binary point to the left means that we can have more accurate decimals but reduces the range of whole numbers available. ●Moving the binary point to the right increases the range of wholenumb ers but reduces the accuracy.
 ●It remains the case that with an 8-bit code, we can represent 256dif ferent combinations regardless of where we put the binary point.
 The same techniques can also be used to represent negative numbers: 2 110110041–81 214 18 116 This number would be: –8 + 4 + 2 + 1 2 + 14 = –114 ●Floating point numbersThe big problem with all the 8-bit systems we have investigated so far is that they can only store a very limited range of numbers. The biggest positive number we have been able to store so far is only 255 and the smallest positive number is 0.0625. There will be many scenarios when a program needs to cope with numbers that are larger or smaller than this. There are two ways round this problem: ●The first is to allocate more bits to store the number. For example, a16-bit unsigned code would allow you to store all the integers from 0 to 65 535; a 24-bit code would allow you to cope with 16 777 216 differentcombinations; and so on.A level onlyFLOATING POINT NUMBERS 199●If you wanted to store negative and positive numbers you would need touse the two’s complement system outlined above. Using 16 bits would allow you to store between –32 768 and 32 767. The problem with allocating an ever-increasing number of bits to store large numbers is knowing when to stop. The solution to this is to use a floating point  number representation.In float ing point, the binary point can be moved depending on the number that you are trying to represent. It ‘floats’ from left to right rather than being in a fixed position. In the previous example, the binary point was fixed after the fourth bit and this presented serious limitations on both the range and accuracy of numbers that can be represented. Floating point extends the fixed point technique described in the previous section and also involves two’s complement so you should not attempt this section until you are happy with these two concepts.A floating point number is made up of two parts – the mantissa and  the exponent. In decimal, we often have to calculate large numbers on our calculators. Most calculators have an eight- or ten-digit display and often the numbers we are calculating need more digits. When this happens, an exponent and mantissa are used. For example, the number 450 000 000 000, which is 45 and ten zeros, would be shown as 4.5 × 1011. 4.5 is the mantissa and 11  is the exponent meaning that the decimal place is moved 11 places to the right.In binary, the exponent and mantissa are used to allow the binary point to float as in the previous example. Remember that the mantissa and/or the exponent may be negative as the two’s complement method is also used on each part. Consider the following 12-bit code: 000011000011. The code can be broken down as follows: ●the first eight bits are the mantissa which can be broken down further as: – the MSB is 0 which means that the number is positive – the next seven bits are the rest of the mantissa: 0001100 ●the remaining four bits are the exponent: 0011.It is co mmon to show the mantissa and exponent more clearly as follows: 00 00 11 0Mantissa0 011Exponent 0 ●First, work out the exponent in the usual way, remembering that two’scomp lement is being used.
 Therefore the exponent is +3.2 11140–80 This means that the binary point will ‘ﬂoat’ three places to the right.
 ●Now calculate the mantissa. The binary point is always placed after themost s ignificant bit as follows: 001100 0–101 214 18 1161321 641 128KEYWORDFloating point: where the decimal/binary point can move within a number.25 The binary number system200●The point now ﬂoats three places to the right. The values for the conversion have changed because the binary point has now moved.2 010110040801 214 18 116 ●Therefore, 00001100 0011 = 0.75 The following example shows the whole process of working out the floating point binary value of a decimal value. In this example, the value is 6.75: ●The ﬁrst stage is to calculate the binary value using ﬁxed point representation: 2 110110041801 214 18 116 ●The number needs to be normalised and there is more on this in a later section. At this stage, what this means is that for a positive number, the binary value must start with 01.
 This means that we need to move the ﬂoating point to the left 3 places aswe convert to ﬂoating point: 1011 1 0 ●We now need to use the exponent to indicate that the ﬂoating pointneeds to be moved three places back to the right: 1 0 11 1Mantissa0 1Exponent 1 ●In this case therefore we have used a 6-bit mantissa and a 2-bit exponentto rep resent the value. It is possible to increase the number of bits usedto both increase the accuracy and range of values. For example, a 3-bit exponent would enable the ﬂoating point to be moved up to six places.
 Two’s complement can also be used on the mantissa or exponent to represent negative values. The process of converting negatives is similar. A negative exponent would move the binary point to the left rather than the right. For the value –10.5: ●First calculate the ﬁxed point representation of the positive value, thatis 10.5: 4 0211010081–1601 214 18● Starting at the LSB, write out the number again until you come to the ﬁrst 1. ●Then reverse all the remaining bits, that is, 0 becomes 1 and 1 becomes 0.4 1201110080–161 1 214 18●The number is now in two’s complement.FLOATING POINT NUMBERS 201●Normalise the number, which for a negative value means you need topos ition the binary point so that the ﬁrst bit of the mantissa after thebinary point is the ﬁrst 0 in the number. This means ﬂoating (moving) it four places to the left: 101100 0 1●We now need to use the exponent to indicate that the ﬂoating point needs to be moved four places back to the right: 11 10 0 0 0Mantissa 1Exponent1 0 0 ●In this case therefore we have used an 8-bit mantissa and a 3-bitexp onent to represent the value.
 This is a simplified example to show the concept. The real power of floating point is that the binary point can be moved several hundred places to the left or right as necessary to represent either very large or very small numbers.An alternative way of representing the values is to use the same method  that is also used to represent very large or very small numbers in base 10. For example, the value 3.345 × 103 means that the decimal point should be moved 3 places to the right. The value therefore is 3345. You can do the same in binary. For example with a 6-bit mantissa of 010011 and a 3-bit exponent of 100 this would be 19 × 2 4.
 Fixed point compared to floating pointAs you have seen, fixed point and floating point are two methods for representing values. Both systems have their advantages. The advantages of using floating point are: ●a much wider range of numbers can be produced with the same numberof bi ts as the fixed point system ●consequently, floating point lends itself to applications where a widerange of values may need to be represented. The advantages of using fixed point are: ●The values are handled in the same way as decimal values so anyhard ware configured to work with integers, can be used on reals.
 This also makes the processing of ﬁxed point numbers faster thanﬂoating point values as there is no processing required to move thebinary point. ●The absolute error will always be the same, whereas with floating pointnumb ers the absolute error could vary. This means that precisionis retained albeit within a more limited range than floating pointrepresentation.
 ●It is suited to applications where speed is more important that precision,e.g . some aspects of gaming or digital signal processing.
 ●It is suited to applications where an absolute level of precision is required,e.g . currency, where the number of places after the binary point does not need to change.25 The binary number system202●Underflow and overflowIt is possible when using signed binary that you will generate a number that is  either too large or too small to be represented by the number ofbits that are available to store it. When the number is too large, we get an overflow  and when it is too small we get an underflow .
 Looking at an overflow first, as we have seen, the most significant bit (MSB)is used to indicate whether the number is positive or negative. 0 meanspositive and 1 means negative. To take a simple example, using two’s complement with just 8-bits, we could represent the numbers –128 to +127. What would happen thereforeif we asked the computer to calculate a number that returned the value of+128. If it used the MSB, we would actually get the answer –128.
 For example, if 00000001 (1 in decimal) was added to 0 1111111 (127 in decimal), it would generate the answer 1000000 (128 in decimal). However, using two’s complement, we would actually get the answer –128 as shown below: 32016 08 0402010640–1281 As another example, if we added 78 to 75 we would expect to get 163. In  binary with 8 bits this would be 128 + 32 + 2 + 1: 32116 08 04021116401281 In two’s complement we would actually get the answer –128 + 32 + 2 + 1 = 93: 32116 08040211164 0–1281 Underflow is a similar concept but occurs when the number is too small to be represented with the number of bits allocated.If a calculation generated a small positive or negative number (i.e. one that is close to zero), then there may not be enough bits to represent it. The example below has 6 bits and a fixed point. If we tried to represent the value 164 or 0.015625 it would create an underflow error as the smallest number we can represent with 6 bits and a fixed point is 132 or 0.03125. 0001 0101 214 18 116132 As you can see, an underflow or overflow could cause serious errors in a  program. It could generate erroneous results or even cause the program to crash. There are various methods for dealing with overflows and underflows. A common method is the use of a flag to indicate where an overflow or underflow has occurred and to ‘carry’ the additional bits in the same way that you carry digits when adding up in decimal. Overflow can also be represented as ∞.KEYWORDSigned binary: binary with a positive or negative sign.
 Overflow: when a number is too large to be represented with the  number of bits allocated.
 Underflow: when a number is too small to be represented with the number of bits allocated.NORMALISATION AND PRECISION 203●Normalisation and precisionNormalisation  is a technique used to ensure that when numbers are represented they are as precise as possible in relation to how many bits are being used. Another benefit is that normalisation ensures that only onerepresentation of a number is possible. The easiest way to think about thisis to consider how many decimal places you would choose to use whenrepresenting a decimal number. Assume that you are creating a system to record the results of variousathletics events: 100 m, 400 m and 1500 m, and that you allow six digits tostore the time taken for each race. ●The winner of the 100 m event ran it in 10.4357 s. Four numbers havebeen u sed after the decimal place to provide a precise number.
 ●The winner of the 400 m event took 47.3453 s. Again four numbers areused a fter the decimal place.
 ●The winner of the 1500 m race took 150.435 s. This time, the numberis o nly precise to three decimal places as three digits are needed for theinteger. The decimal point has floated here in order to represent thenumber. However, the result is not as precise as the results for the 100 mand 400 m races. ●The result of the 100 m race could be stored as 010.436. However thiswould not be sensible as the number is not as precise as it could be with six digits available. The same thing happens when using a mantissa and exponent. With a fixed number of bits that can be used to represent the mantissa, the precision  of the n umber can be affected by where the binary point is positioned. The exponent is used to ensure that the floating point is placed to optimise the precision of the number. For example 234 000 can be represented as: ●23 400 × 10 1 ●2.34 × 10 5●0.00000234 × 10 11 The second option is the best way to represent the number as it uses the least number of digits yet provides a precise result. This number is referred to as being in ‘normal form’ or ‘normalised’. With binary codes, normalisation is equally important. In order to be ‘normalised’ the first bit of the mantissa, after the binary point, should always be a 1 for positive numbers, or a 0 for negative numbers and the bit before the binary point should be the opposite. So a normalised positive floating point number must start 0.1 and a normalised negative floating point number must start 1.0. For example, the binary equivalent of 108 in decimal using an 8-bit code would be 01101100: ●The normalised mantissa would be 0.1101100●The binary point will have to be moved seven places to the right in orderto co nvert it back to the original number ●Therefore the exponent must be 7●Two’s complement for 7 is 0111. ●Therefore the normalised representation of 108 is 0.11011000111.KEYWORDSNormalisation: a process for adjusting numbers onto a common scale.
 Precision: how accurate a number is.25 The binary number system 204You might be wondering why it is worth showing 108 in this way when it could be shown more simply as 01101100. The reason for this is that with an 8-bit mantissa and a 4-bit exponent it is possible to represent a much wider range of positive and negative numbers than using eight bits alone. For example, if you had 8 bits and a fixed point you could represent: ● Lowest positive value: 16 or 0.0625 2 010000140801 214 18 116 ●Highest value: 15.9375 or 1515162 111111141811 214 18 116 With a floating point and 8 bits for the mantissa and 4 bits for the exponent and assuming that two’s complement is being used on both, the range of values would be: ●+127 for the mantissa and +7 for the exponent●–128 for the mantissa and –8 for the exponent ●Rounding errorsWhen working with decimal numbers, we are used to the idea of rounding numbers up or down. As a consequence, we will get rounding errors. For example, 13 in decimal is 0.3 recurring. Consequently we are comfortable with using 0.33 or perhaps 0.333 to represent 13. Obviously there is a degree of error in this calculation. Whether it is acceptable or not depends on what our program was doing. If it was taking exact scientific measurements we might want a greater degree of accuracy.A similar phenomenon occurs with binary representation. For example, if  you try to convert 0.1 in decimal into binary you will find that you get a recurring number, so it is not possible to exactly represent it. If we continue the binary examples we used before, if you try to represent 1.95 with 8-bits and a fixed point: 1.1111010 would give us 1.953125: 101011 1111 214 18 1161321 64128 1.1111001 would give us 1.9453125: 100111 1111 214 18 1161321 64128 With 8 bits the nearest we can get is 0.003125 out. We could extend the number of bits that we use to try and get an answer that is closer to 1.95.It is the job of the programmer to decide on what is an accurate enough  number and to allocate an appropriate number of bits to store the data to the required level of precision.ABSOLUTE AND RELATIVE ERRORS205●Absolute and relative errors There are two main methods for calculating the degree of error in numbersthat we use within a program. The absolute error is the actual mathematicaldifference between the answer and the approximation of it that you canstore. For example, if a calculation requires 8 decimal places, but we onlyallocate 8 digits, we would have to either round or truncate the number. Sothe number 1.65746552 would become 1.6574655. In this case, to work outthe absolute error we would subtract the two values and that would give usan absolute error of 0.00000002. Note that the absolute error is always apositive number. You could apply a margin of error when deciding whether a number isaccurate enough. For example, you could apply an absolute measure. Inthe example above you could identify ±0.00005 as an acceptable marginof error. You can see that for a number that is around 1, this degree of accuracy isprobably sufficient. If the number we were storing was larger, for example111 001.65746552, you would probably not need to store it to eight decimalplaces anyway. Perhaps one or two decimal places would be sufficient. However, if the number was much smaller, e.g. a microscopic measurement,you might need a much larger number of decimal places. This is where the idea of a relative error comes in. Rather than applying arigid margin of error, you would look at the value that was being stored andthen decide on a relative margin of error. In this way you are comparing theactual result to the expected result. For example you might decide that ±5%would be sufficient. This would mean that for a number in the thousands,you would not need any decimal places and you could store it as an integer.With very small numbers, you might need to allocate 10 decimal places withno whole number at all in order to record the result as accurately as needed. Relative error can be calculated using the formula: Relative error = Absolute error / Number intended to be storedFor example, if trying to represent the value 6.95 using floating point with an 8-bit mantissa  and a 3-bit exponent , it could be shown as0.11011110 11. This works out to be 6.9375. Therefore: Absolute error = 6.95 – 6.9375 = 0.0125Relative error = 0.0125 / 6.95 = 0.001798561151 Practice questions can be found at the end of the section onpage 228. KEYWORDSMantissa: the significant digits that make up a number.
 Exponent: the ‘power of’ part of a number indicating how far a binary point should be shifted left or right.25 The binary number system 206TASKS1 Explain the term ‘unsigned integer’.
 2 Show how an 8-bit two’s complement integer would be used to store: a) +64 b)–64 c)+10 0 d)–1003 Add the binary numbers 1001 and 1100. Leave your answer as a binary number.4 Use two’s complement to carry out the following calculations. a)12 + 8 b)25 – 1 75 Describe the benefits of using a fixed point number system over floating point.6 Convert 31 4 into a binary number.
 7 Convert the binary number 10.11 into its decimal equivalent.
 8 A computer uses 12 bits to store numbers in floating point format.  Seven bits are used to store the mantissa and the other five bits the exponent. Both parts use two’s complement. The following numbers are stored using this system. Work out their decimal equivalents.
 a)01110000 1111 b)101 0000 111119 Represent the following decimal values as floating point binary values.
 a)13.5 b)–3.7 510 Explain why floating point numbers should always be normalised. 11 011.111010000 is used to represent the decimal value 3.9.  a)What is actual decimal value represented?b)Calculate the relative and absolute error. c)Explain how the ﬂoating point system could create a more accuraterepresentation of 3.9.KEY POINTS •Binary addition andmultiplication of positive integers use the samemethodology as decimaladdition and multiplication.
 •Two’s complement is amethodused to represent signed integers in binary form.
 •Fixed point binary numbersare used to represent fractions. The binary point isin a fixed position.
 •Floating point binary numbersare used to represent fractions. The binary point canmove position.•A floating point number ismade up of two parts – the mantissa and the exponent. •It is possible that when usingsigned binary you will generatea number that is either too largeor too small to be representedby the number of bits that areavailable to store it. •Normalisation is a techniqueused to ensure that when numbers are represented theyare as precise as possible inrelation to how many bits arebeing used. •When working with decimalnumbers, we are used to the idea of rounding numbers upor down. As a consequence,we will get rounding errors,which can be quantified asabsolute or relative.
 •Precision refers to howaccurate the number needsto be in the context that it isbeing used.
User: Make the following text more clear.
Format it properly.
Do NOT change the meaning of the words or methods used to obtain the answer or anything like that.
This is for AQA A(S)-Level Computer Science. I repeat, do not alter the words as it could have an effect on the marks acquired from the marking scheme.
However, remove any redundant information or USELESS examples that are not needed for a student to know, or simplify unnecessary information (if it has a definition or keywords, it is not unnecessary).
If you can, use different values for the examples.
For things that will not score a mark or are generally useless, for example, "we will cover" or a fun fact, change the wording. This is for AS Level, do not include information about topics that are ONLY A-Level Content (if it says it is)
Link the 'sections' of your answer to the following spec-points (by title):
e.g. "**Topic** (Spec Points: a.b.c. Whatever)
3.5.4.3 Signed binary using two’s complement
Content
Additional information
Know that signed binary can be used to represent negative integers and that one possible coding scheme is two’s complement.
This is the only representation of negative integers that will be examined. Students are expected to be able to convert between signed binary and decimal and vice versa.
Know how to:
represent negative and positive integers in two’s complement
perform subtraction using two’s complement
calculate the range of a given number of bits,
n
.

3.5.4.5 Rounding errors (A level only)
None

3.5.4.7 Range and precision (A level only)
None

3.5.4.2 Unsigned binary arithmetic
Content
Additional information
Be able to:
add two unsigned binary integers
multiply two unsigned binary integers.

3.5.4.6 Absolute and relative errors (A level only)
None

3.5.4.4 Numbers with a fractional part
Content
Additional information
Know how numbers with a fractional part can be represented in:
fixed point form in binary in a given number of bits.
Be able to convert for each representation form:
decimal to binary of a given number of bits
binary to decimal of a given number of bits.

3.5.4.8 Normalisation and ﬂ oating point form (A level only)
None

3.5.4.1 Unsigned binary
Content
Additional information
Know the difference between unsigned binary and signed binary.
Students are expected to be able to convert between unsigned binary and decimal and vice versa.
Know that in unsigned binary the minimum and maximum values for a given number of bits,
n
, are 0 and 2
n
-1 respectively.

3.5.4.9 Underﬂ ow and overﬂ ow (A level only)
None


You MUST make sure they are ALL met. Everything it says on there you should meet.

I already provided the available exam questions you MAY choose to add on to the notes, with 'des' explaining what it's about, and 'fil' meaning the Question ID.
The content, too. Delivered in the form 'fil', JSON
Ignore exam questions that contain 'Skeleton Program'. Do not only put like 2 exam questions, try to put more!
For the exam questions, in the original text, there is a label named 'Tasks'. Those (usually) six questions are NOT the exa questions. The exam questions are the ones that were given in JSON form to you, do NOT do the 'Tasks'. Do the exam questions that contain HTML in JSON!

In the markscheme, a ';' typically means that a mark was gained.
When mentioning exam questions, you *must* answer them, according to the markscheme, scoring full marks. No 'do it yourself'.

Include ALL definitions (KEYWORDS) from the original text I sent in your notes. When I mean all, I mean ALL.

If necessary for scoring marks, try to embed the exam-questions into your notes, sometimes without even referencing the fact that it is an exam question. For example, if an exam question is a definition or benefits, use the answer in your notes.
Remember. DO NOT ADD USELESS STUFF. Your task is to create the MOST EFFICIENT (SHORTEST [for an explanation] BUT STILL SCORES ALL MARKS) possible notes resource, which will score all marks easily, so its wording has to be mostly like that of the exam questions. By any means, if necessary, please include examples and exam questions! At the end you can have a 'try these exam questions' thing.
At the end of your answer, you will give a 'breakdown'/'summary' of each thing you covered which will tell the most concise FULLY MARK-SCORING explanation possible.

In summary, your answer must:

* Be efficient, useful
* For topics in an exam that may require some form of mathematical working, always show an example of a question.
* Be clear – provide clear, step-by-step examples/instructions when needed.
* Follow the entire specification and everything it says.
* Link your section to a spec point. E.g. **Topic** (Spec Points: a.b.c Whatever)
* Score ALL marks.
* Include ALL exam questions S at the end (except ones that contain 'Skeleton Program'), with the same wording as the original ones in the JSONs sent to you – and INCLUDE THE QUESTION CONTENT, AND THE ANSWERS/MARK SCHEME. Only the ones that I provided to you, include Question IDs.
* Remove redundant, unnecessary and useless information that would not be brought up in an exam answer.
* Be helpful to the reader
* Provide the full notes, covering ALL spec-points (and showing the spec-points covered in each section).
* Include ALL definitions (KEYWORDS, usually represented explicitly and specifically in the original text as Keyword: Definition), do not change the wording (unless that definition is an exam question). MAKE ALL THE DEFINITIONS FULL (yet consice, as they can sometimes even be 2 marks). Incorporate the definitons into the notes.
* Include a seperate section named 'Definitions' that covers the keywords and their simplest definition that scores all marks. These are (usually) found in the original text.
* Include a summary at the end (after definitions) that goes through everything you need to score all marks.

At the end of the formatted text, after everything is done, fill out the JSON:
Remove the type clarification.
{
"chapter": (int),
"page": (int),
"chapter_name": (str),
"topics": (list)
}

User: And these are the available exam questions, with 'des' explaining what it's about, and 'fil' meaning the Question ID.
{'S5$.4.c': [{'index1': '|B.B$|', 'index2': '|2$|', 'index3': '2$', 'index4': 'S5$.4.c', 'index5': '|', 'index6': 'Q23S203p3', 'qid': 'Q23S203p3', 'des': "Binary subtraction; two's complement", 'index7': '', 'marks': '2 marks', 'time': '2', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'Q23S203P3', 'year': 2023, 'res': '', 'flag1': 0}, {'index1': '|B.B$|', 'index2': '|2$|', 'index3': '2$', 'index4': 'S5$.4.c', 'index5': '|', 'index6': 'Q23S203p4', 'qid': 'Q23S203p4', 'des': "Two's complement; range; highest value; lowest value", 'index7': '', 'marks': '1 marks', 'time': '1', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'Q23S203P4', 'year': 2023, 'res': '', 'flag1': 0}, {'index1': '|B.B$|', 'index2': '|2$|', 'index3': '2$', 'index4': 'S5$.4.c', 'index5': '|', 'index6': 'QS19S22p04', 'qid': 'QS19S22p04', 'des': "Two's complement subtraction", 'index7': '', 'marks': '2 marks', 'time': '2', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'QS19S22P04', 'year': 2019, 'res': '', 'flag1': 1}, {'index1': '|B.B$|', 'index2': '|1$|', 'index3': '2$', 'index4': 'S5$.4.c', 'index5': '|', 'index6': 'QS18S22p03', 'qid': 'QS18S22p03', 'des': "Two's complement most negative number", 'index7': '', 'marks': '1 marks', 'time': '1', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'QS18S22P03', 'year': 2018, 'res': '', 'flag1': 1}], 'L5$.4.e': [{'index1': '|B.B$|', 'index2': '|3$|', 'index3': '2$', 'index4': 'L5$.4.e', 'index5': '|', 'index6': 'Q20L202p5', 'qid': 'Q20L202p5', 'des': 'Rounding Errors', 'index7': '', 'marks': '2 marks', 'time': '3', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'Q20L202P5', 'year': 2020, 'res': '', 'flag1': None}], 'L5$.4.g': [], 'S5$.4.b': [{'index1': '|B.B$|', 'index2': '|2$|', 'index3': '2$', 'index4': 'S5$.4.b', 'index5': '|', 'index6': 'Q22S203p2', 'qid': 'Q22S203p2', 'des': 'Multiply together two unsigned binary integers', 'index7': '', 'marks': '2 marks', 'time': '2', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'Q22S203P2', 'year': 2023, 'res': '', 'flag1': None}, {'index1': '|B.B$|', 'index2': '|2$|', 'index3': '2$', 'index4': 'S5$.4.b', 'index5': '|', 'index6': 'Q20S202p1', 'qid': 'Q20S202p1', 'des': 'Multiply two binary numbers together', 'index7': '', 'marks': '2 marks', 'time': '2', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'Q20S202P1', 'year': 2020, 'res': '', 'flag1': None}], 'L5$.4.f': [{'index1': '|B.B$|', 'index2': '|3$|', 'index3': '2$', 'index4': 'L5$.4.f', 'index5': '|', 'index6': 'Q22L205p5', 'qid': 'Q22L205p5', 'des': 'Calculate relative error of number represented using floating point', 'index7': '', 'marks': '2 marks', 'time': '3', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'Q22L205P5', 'year': 2023, 'res': '', 'flag1': None}], 'S5$.4.d': [{'index1': '|B.B$|', 'index2': '|2$|', 'index3': '2$', 'index4': 'S5$.4.d', 'index5': '|', 'index6': 'Q23S203p5', 'qid': 'Q23S203p5', 'des': 'Fixed point binary; conversion', 'index7': '', 'marks': '2 marks', 'time': '2', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'Q23S203P5', 'year': 2023, 'res': '', 'flag1': 0}, {'index1': '|B.B$|', 'index2': '|2$|', 'index3': '2$', 'index4': 'S5$.4.d', 'index5': '|', 'index6': 'Q20S202p2', 'qid': 'Q20S202p2', 'des': 'Convert decimal number to fixed point binary; unsigned', 'index7': '', 'marks': '2 marks', 'time': '2', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'Q20S202P2', 'year': 2020, 'res': '', 'flag1': None}, {'index1': '|B.B$|', 'index2': '|2$|', 'index3': '2$', 'index4': 'S5$.4.d', 'index5': '|', 'index6': 'QS19S22p03', 'qid': 'QS19S22p03', 'des': 'Fixed point to decimal conversion', 'index7': '', 'marks': '2 marks', 'time': '2', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'QS19S22P03', 'year': 2019, 'res': '', 'flag1': 1}, {'index1': '|B.B$|', 'index2': '|2$|', 'index3': '2$', 'index4': 'S5$.4.d', 'index5': '|', 'index6': 'QS17S22D', 'qid': 'QS17S22D', 'des': 'Fixed point', 'index7': '', 'marks': '1 marks', 'time': '1', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'QS17S22D', 'year': 2017, 'res': '', 'flag1': 1}], 'L5$.4.h': [{'index1': '|B.B$|', 'index2': '|3$|', 'index3': '2$', 'index4': 'L5$.4.h', 'index5': '|', 'index6': 'Q22L205p2', 'qid': 'Q22L205p2', 'des': 'State two reasons for normalising floating point numbers', 'index7': '', 'marks': '2 marks', 'time': '3', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'Q22L205P2', 'year': 2023, 'res': '', 'flag1': None}], 'S5$.4.a': [{'index1': '|B.B$|', 'index2': '|2$|', 'index3': '2$', 'index4': 'S5$.4.a', 'index5': '|', 'index6': 'Q22S203p1', 'qid': 'Q22S203p1', 'des': 'State the highest and lowest values that can be represented in 16-bit unsigned binary; range', 'index7': '', 'marks': '2 marks', 'time': '2', 'ttext': 'Number representation', 'fld': 'AA_COM', 'fil': 'Q22S203P1', 'year': 2023, 'res': '', 'flag1': None}], None: []}

User: These are the content of said exam questions, these are the ONLY exam questions, you will use these later, delivered in form 'fil', JSON: {'Q23S203P3': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">What is the result of subtracting the two&#x2019;s complement binary number <span class="comp">00100100</span> from the two&#x2019;s complement binary number <span class="comp">00011011</span>?</p>\r\n<p class="indent1new">You should give your answer in two&#x2019;s complement binary.</p>\r\n<p class="indent1new">You <b>must</b> show all your working in binary.</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>Marks are for AO2 (application)</b></p>\r\n<p class="indent1new"><b>1 mark</b> for correct conversion of <span class="comp">00100100</span> (36) to <span class="comp">11011100</span> (&#x2013;36);</p>\r\n<p class="indent1new"><b>1 mark</b> for binary addition of <span class="comp-top">00011011</span> and <span class="comp-top">11011100</span> producing <span class="comp-top">11110111;</span></p>\r\n<p class="indent1new m-t-0"><b>A.</b> Follow through of incorrect representation of &#x2013;36 for second mark.</p>\r\n<p class="indent1new">//</p>\r\n<p class="indent1new"><b>2 marks</b> if correct answer and any relevant working shown which indicates an attempt at using two&#x2019;s complement to solve the problem.</p>\r\n<p class="indent1new"><b>R.</b> Reject both marks if only decimal subtraction has been used.</p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">It was pleasing to see many students attempting subtraction by performing two&#x2019;s complement on 00100100 (36) and adding it to 00011011 (27). However, only half the students managed to score at least one mark. Common incorrect methods included making 27 negative (&minus;27 + 36) or making both numbers negative before adding them together.</p></h5>', 'notes': '', 'resources': ''}, 'Q23S203P4': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">In <b>decimal</b>, what are the lowest and highest values that can be represented by an <b>8-bit two&#x2019;s complement</b> binary integer?</p>\r\n<p class="indent1new answer-toggle">Lowest:&nbsp;&nbsp;_______________&emsp;&emsp;&emsp;Highest:&nbsp;&nbsp;_______________</p>\r\n<p class="mark">(Total 1 mark)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>Mark is for AO1 (understanding)</b></p>\r\n<p class="indent1new">Lowest: &#x2013;128</p>\r\n<p class="indent1new m-t-0">Highest: (+)127</p>\r\n<p class="indent1new"><b>Note:</b> Both answers must be correct to award mark.</p>\r\n<p class="mark">[1]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">Over half the students correctly identified the lowest and highest values possible with 8-bit two&#x2019;s complement. The most common incorrect answer was &minus;256 and 255 due to students not reading the question carefully to see that, as this is a two&#x2019;s complement number, the leftmost bit represents a weighting of &minus;128.</p></h5>', 'notes': '', 'resources': ''}, 'QS19S22P04': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">Explain how the <b>two’s complement binary integer</b> <span class="comp">00100111 </span> can be subtracted from the <b>two’s complement binary integer</b> <span class="comp">01001001</span> without converting the numbers into decimal.</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>Marks are for AO2 (apply)</b></p>\r\n<p class="indent1new indentright">The (positive number) 00100111 must be converted to its negative equivalent/11011001;</p>\r\n<p class="indent1new indentright3 m-t-0">The (negative number) 11011001/result must then be added to the second number/01001001 (equalling 00100010);</p>\r\n<p class="indent1new"><b>Note:</b> Award 1 mark if both working <b>and</b> correct answer shown but no explanation</p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">A number of students demonstrated the procedure without explaining the process, converted the first number from positive to negative wrongly or subtracted the second number from the first rather than the correct way around. When referencing two’s complement there was a misconception that one ‘performs’ two’s complement to convert a positive bit pattern to a negative bit pattern. This did, on occasion, fail to gain a mark when phrasing such as ‘perform two’s complement on the bit pattern’ was used.</p></h5>', 'notes': '', 'resources': ''}, 'QS18S22P03': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">In <b>decimal</b>, what is the most negative number that can be represented using a <b>12-bit two’s complement binary integer</b>?</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="mark">(Total 1 mark)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question indentright"><b>Mark is for AO2 (apply)</b></p>\r\n<p class="indent1new indentright">&minus;2048;</p>\r\n<p class="mark">[1]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">A large number of students got this question correct. Of those who didn’t, most forgot the negative sign, calculated an extra digit, or made both errors.</p></h5>', 'notes': '', 'resources': ''}, 'Q20L202P5': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">This question uses a normalised floating point representation with a 7-bit mantissa and a 5-bit exponent, both stored using <b>two&#x2019;s complement</b>.</p>\r\n<p class="indent1new">When the decimal value 28.25 is converted into binary using this floating point system, a rounding error occurs.</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1new">Explain:</p>\r\n<p class="indent1">&#8226;&emsp;&emsp;&nbsp;why a rounding error has occurred, <b>and</b></p>\r\n<p class="indent1 m-t-0">&#8226;&emsp;&emsp;&nbsp;what the system might do when the value 28.25 is converted into binary.</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>2 marks for AO2 (analysis)</b> </p>\r\n<p class="indent1new m-b-0">There are not enough bits <u>in the mantissa</u> (to represent 28.25 exactly) // <u>7 bits</u> is not enough to represent 28.25 exactly // the binary representation of 28.25 has more than 7 significant digits // the binary representation of 28.25 has more significant digits than there are bits in the mantissa // binary representation of 28.25 needs 8 bits (in mantissa) / has 8 significant digits // insufficient (bits) of precision available;</p>\r\n<p class="indent1new m-t-0"><b>R.</b> 28.25/some numbers can never be represented exactly in binary</p>\r\n<p class="indent1new m-b-0">It could be rounded to the nearest representable value // it may be truncated // represent as 28 // represent as 28.5;</p>\r\n<p class="indent1new m-t-0"><b>R.</b> an error would be generated</p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">The majority of students achieved some marks for explaining that the number would be rounded in some way as it could not be represented exactly. Responses which suggested redesigning the system used to represent the number were not awarded marks.</p></h5>', 'notes': '', 'resources': ''}, 'Q22S203P2': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>Figure 1</b> and <b>Figure 2</b> show the bit patterns of two <b>unsigned binary integers</b>.</p>\r\n<p class="bottom">&nbsp;</p>\r\n<table class="data-table left4">\r\n\t<tr>\r\n\t\t<td colspan="8" class="no-border"><p class="padded"><b>Figure 1</b><br/>&nbsp;</p></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t</tr>\r\n</table>\r\n<p class="bottom">&nbsp;</p>\r\n<table class="data-table left4">\r\n\t<tr>\r\n\t\t<td colspan="8" class="no-border"><p class="padded"><b>Figure 2</b><br/>&nbsp;</p></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t</tr>\r\n</table></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1new">Calculate the result of multiplying these two numbers together using <b>binary multiplication</b>.</p>\r\n<p class="indent1new">You <b>must</b> show your working in binary.</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">Answer ________________________________________________________________</p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>Marks are for AO2 (application)</b></p>\r\n<p class="indent1new indentright"><b>1 mark</b> for showing three correct products</p>\r\n<p class="indent1new indentright comp m-t-1">00010101</p>\r\n<p class="indent1new indentright comp">00101010</p>\r\n<p class="indent1new indentright comp">01010100;</p>\r\n<p class="indent1new indentright comp-top">//</p>\r\n<p class="indent1new indentright comp-top">00000111</p>\r\n<p class="indent1new indentright comp">00011100</p>\r\n<p class="indent1new indentright comp">01110000;</p>\r\n<p class="indent1new indentright"><b>A.</b> Omitted leading zeros.</p>\r\n<p class="indent1new indentright"><b>1 mark</b> for the correct answer if some relevant working is shown.</p>\r\n<p class="indent1new indentright comp m-t-1">10010011;</p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">It was very encouraging to see many students attempting the full binary multiplication. There were no marks for the correct answer without relevant working as we were assessing their application of the process. Some students did not fill in the 0s at the end of each partial product which was not penalised this time but this may not be the case in the future (10101__ is not the same number as 1010100.)</p></h5>', 'notes': '', 'resources': ''}, 'Q20S202P1': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">The diagram below shows two unsigned binary integers.</p>\r\n<p class="graph"><img src="AA_COM/Q20S202P1_files_Q/img01.jpg"/></p>\r\n<p class="indent1new">What is the result <b>in binary</b> of multiplying the two numbers shown in the diagram?</p>\r\n<p class="indent1new">You <b>must</b> show all your working in binary.</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">Answer&nbsp;&nbsp;________________________________________________________________</p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>2 marks are for AO2 (apply)</b></p>\r\n<p class="indent1new">Mark as follows:</p>\r\n<p class="indent1new"><b>1 mark</b> for any relevant working out such as multiplying one number on a bit-wise basis by the other <b>or</b> summing the results of (incorrect) bitwise multiplications:</p>\r\n<p class="indent1new comp">10110100</p>\r\n<p class="indent1new comp">&emsp;&thinsp;101101</p>\r\n<p class="indent1new indentright m-b-0"><b>1 mark</b> for final answer:</p>\r\n<p class="indent1new indentright m-t-0 comp">11100001</p></h5><h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="indent1new indentright m-b-0"><b>Alternative Method</b></p>\r\n<p class="indent1new indentright comp m-t-0 m-b-0">10100000</p>\r\n<p class="indent1new indentright comp m-t-0 m-b-0">&emsp;&thinsp;101000</p>\r\n<p class="indent1new indentright comp m-t-0 m-b-0">&emsp;&ensp;&thinsp;10100</p>\r\n<p class="indent1new indentright comp m-t-0">&emsp;&emsp;&ensp;&thinsp;&thinsp;101</p>\r\n<p class="indent1new indentright m-b-0"><b>MAX 2</b></p>\r\n<p class="indent1new indentright m-t-0"><b>MAX 1 if no working is shown</b></p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '', 'notes': '', 'resources': ''}, 'Q22L205P5': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">Use a <b>normalised</b> floating point representation with an <b>8-bit</b> mantissa and a <b>4-bit</b> exponent, both stored using <b>two&#x2019;s complement</b>.</p>\r\n<p class="indent1new">The figure below shows the closest possible representation of the decimal number &#x2013;0.22558594 in this floating point system.</p>\r\n<p class="graph"><img src="AA_COM/Q22L205P5_files_Q/img01.jpg"/>&nbsp;</p>\r\n<p class="indent1new">By converting this number back to decimal it can be seen that the actual value stored is &#x2013;0.2265625</p>\r\n<p class="indent1new">Calculate the <b>relative error</b> that has occurred when representing &#x2013;0.22558594</p>\r\n<p class="indent1new">You should show your working.</p>\r\n<p class="indent1new">Express your answer as a percentage to 2 decimal places.</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">Answer ________________________________________________________________</p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>All marks AO2 (apply)</b></p>\r\n<p class="indent1new">Award <b>2 marks</b> for correct answer:</p>\r\n<p class="indent1new">0.43(%);</p>\r\n<p class="indent1new m-t-0"><b>A.</b> 0.0043</p>\r\n<p class="indent1new m-t-0"><b>A.</b> answers expressed to a higher precision (0.4328993199 to 10dp)</p>\r\n<p class="indent1new m-t-0"><b>A.</b> mathematically equivalent values, with at least as many significant figures eg 4.3 &#215; 10<sup class="xsmall">&minus;3</sup></p>\r\n<p class="indent1new m-t-0"><b>R.</b> 0.0043%</p>\r\n<p class="indent1new">If answer is incorrect then award <b>1 method mark</b> for any one of:</p>\r\n<p class="indent1">&#8226;&emsp;&emsp;&nbsp;calculating the difference between &#x2013;0.22558594 &minus; &#x2013;0.2265625 // 0.00097656 shown in working <b>R.</b> &minus;0.00097656</p>\r\n<p class="indent1 m-t-0">&#8226;&emsp;&emsp;&nbsp;division by 0.22558594 or &#x2013;0.22558594</p>\r\n<p class="indent1 m-t-0">&#8226;&emsp;&emsp;&nbsp;giving final answer as &#x2013;0.43(%) or (&#x2013;0.0043)</p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">This question was about floating point numbers.</p>\r\n<p class="indent1new">It was the best answered part of question 5; the vast majority of students correctly calculated that the absolute error, to 2 decimal places, was 0.43&#x0025;. Common mistakes were to calculate the absolute error to be a negative value, resulting in a relative error of &minus;0.43&#x0025; or dividing the absolute error by 0.2265625 instead of 0.22558594. Students who arrived at incorrect final answers often did the correct calculation but made a calculating error at some point.</p>\r\n<p class="indent1new">There was an error in this question. The question stated that the value provided in the figure was a normalised binary representation, however, the value provided was not normalised. This error did not have any impact on students answers or the marks awarded.</p></h5>', 'notes': '', 'resources': ''}, 'Q23S203P5': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">What is the <b>decimal</b> equivalent of the bit pattern shown in the figure below if it represents an <b>unsigned fixed-point binary</b> value with two bits before the binary point and six bits after the binary point?</p>\r\n<p class="bottom">&nbsp;</p>\r\n<table class="data-table left5">\r\n\t<tr>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">0</p></td>\r\n\t\t<td class="col-label"><p class="padded comp-top">1</p></td>\r\n\t</tr>\r\n</table>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>Marks are for AO2 (application)</b></p>\r\n<p class="indent1new"><img src="AA_COM/M23S203P5_files_M/img01.jpg"/>&nbsp;</p>\r\n<p class="indent1new"><b>Mark as follows:</b></p>\r\n<p class="indent1new"><b>1 mark</b> for correct integer part (3)</p>\r\n<p class="indent1new m-t-0"><b>1 mark</b> for correct fractional part (<img class="vert-middle" src="AA_COM/M23S203P5_files_M/img02.jpg"/> or .453125)</p>\r\n<p class="indent1new">//</p>\r\n<p class="indent1new"><b>2 marks</b> for <img class="vert-middle" src="AA_COM/M23S203P5_files_M/img03.jpg"/></p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">Over three-quarters of pupils gained at least one of the two marks for this question converting fixed point binary to decimal. The most common incorrect answers were 221 (ignoring any fixed point) or 55.25 (incorrectly placing two bits after the binary point, instead of before).</p></h5>', 'notes': '', 'resources': ''}, 'Q20S202P2': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">Convert the decimal number 6.34375 into an <b>unsigned fixed point binary number</b> using 8 bits with 5 bits after the binary point.</p>\r\n<p class="indent1new">You may use the space below for working.</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new m-t-2 answer-toggle"><img src="AA_COM/Q20S202P2_files_Q/img01.jpg"/></p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>2 marks are for AO2 (apply)</b></p>\r\n<p class="indent1new indentright comp-top">110;01011;</p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '', 'notes': '', 'resources': ''}, 'QS19S22P03': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">The bit pattern below represents an <b>unsigned fixed-point binary</b> number with five bits before and five bits after the binary point.</p> \r\n<p class="indent1new">Convert the binary number into decimal.</p>\r\n<p class="graph"><img src="AA_COM/QS19S22P03_files_Q/img01.jpg"/>&nbsp;</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>Marks are for AO2 (apply)</b></p>\r\n<p class="indent1new"><b>1 mark</b> for whole number 19</p>\r\n<p class="indent1new"><b>1 mark</b> for decimal number: .53125 // 17/32</p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">This question was generally well answered. The most common mistake was miscounting / calculating rather than lack of understanding.</p></h5>', 'notes': '', 'resources': ''}, 'QS17S22D': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">Indicate clearly below where the binary point must be placed so that the value 19.375 is represented.</p>\r\n<p class="graph"><img src="AA_COM/QS17S22D_files_Q/img03.jpg"/>&nbsp;</p>\r\n<p class="mark">(Total 1 mark)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question indentright"><b>Mark is for AO2 (analyse)</b></p>\r\n<p class="indent1new indentright">10011.011;</p>\r\n<p class="indent1new indentright"><b>1 mark</b> for fixed point clearly between 5<sup class="xsmall">th</sup> and 6<sup class="xsmall">th</sup> digits.</p>\r\n<p class="mark">[1]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">The majority of students were successful in identifying the correct position for the binary point.</p></h5>', 'notes': '', 'resources': ''}, 'Q22L205P2': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">State <b>two</b> reasons why values stored using a <b>floating point</b> representation are usually stored in normalised form.</p>\r\n<p class="indent1new answer-toggle">Reason 1&nbsp;&nbsp;______________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">Reason 2&nbsp;&nbsp;______________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>All marks AO1 (understanding)</b></p>\r\n<p class="indent1new">Maximises precision / accuracy for given number of bits;</p>\r\n<p class="indent1new"><b>Note:</b> Must have concept of given number of bits or an example of this eg word length.</p>\r\n<p class="indent1new">Unique representation of each number // simpler to test for equality of numbers;</p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">This question was about floating point numbers.</p>\r\n<p class="indent1new">It was not answered well, with many students giving vague response such as &#x201C;increased accuracy&#x201D;, &#x201C;easier to tell if positive or negative&#x201D; or &#x201C;easier to understand&#x201D;. Good responses recognised that normalising floating point numbers maximises precision within a given number of bits and ensures that there is one unique representation for each number, which makes it simpler to test two numbers for equality.</p></h5>', 'notes': '', 'resources': ''}, 'Q22S203P1': {'question': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">State, <b>in decimal</b>, the lowest and highest values that could be represented in unsigned binary when using 16 bits.</p>\r\n<p class="indent1new answer-toggle">Lowest&nbsp;&nbsp;________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">Highest&nbsp;&nbsp;_______________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="indent1new answer-toggle">_______________________________________________________________________</p>\r\n<p class="mark">(Total 2 marks)</p></h5>', 'markscheme': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question"><b>Marks are for AO1 (understanding)</b></p>\r\n<p class="indent1new indentright">0;</p>\r\n<p class="indent1new indentright m-t-0">65535; <b>A.</b> 2<sup>16</sup> &#x2013;1</p>\r\n<p class="mark">[2]</p></h5>', 'examinerreport': '<h5 class=\'contentSeparator\' style=\'page-break-inside: avoid;\'><div class=\'qnumber-hidden\'></div><p class="question">Only half the students got both marks for this question. The most common incorrect answers were students giving 65536 (or 2<sup class="xsmall">16</sup>) as the highest and 1 as the lowest.</p></h5>', 'notes': '', 'resources': ''}}
User: Now, the user will ask questions after this message. Use everything I gave you and the knowledge you have acquired, and from the notes you made, to answer their question in a very concise way that WILL score ALL marks. Just like the notes. For this, your answer will not have the same structure as the revision notes. Think of it as answering an exam question: short, consice, useful, scores ALL marks. Just like the exam questions provided to you, you will not leave your response in a 'notes' manner. You are just answering an exam question: which means it has to be very short unless explicitly specified by the user that it must be long and detailed. So, keep it short, concise, and only a couple of sentences that score ALL marks. Remember, it is an A-Level exam question and you will style it as such: incredibly concise sentences (essentially like bullet points but without the bullet points) that score marks. Most sentences won't even have commas, this does not mean you can't use them. Also do not repeat the question in your answer, just do it. Score all marks, assume how many marks there are based on the question if it is not provided to you. Imagine that for every sentence you make, you score a mark (for simpler questions), for high (>5 mark) questions that may differ.
In summary, you must:
* Answer very concisely. Kind of like bullet points but as a short para. Most of the time, a sentence, or point, will be a mark.
* Do not repeat the question at the start.
* Don't over-do your answer. Please. 1 mark (e.g., usually, 'What' questions) is like one very short sentence usually. Remember the summary from the notes? Your answer will essentially be like that for most questions but a bit (a bit!) more developed. Remember, this is just A-Levels. Use some of the exam questions that I provided as an example of how you should model your answers.
* When you're listing examples, don't list every example in the universe.
* Score all marks. Be helpful.
User: Write the notes you made
Assistant: