3.4

Example Questions

1. a) Express the number 113 (denary) in (i) binary (ii) in BCD using an appropriate number of bytes in each case. (4) b) Using the answer obtained in part (a) show how 113 (denary) can be expressed in (i) octal (ii) hexadecimal. (4) A. a) (i) 128 64 32 16 8 4 2 1 0 1 1 1 0 0 0 1 =01110001. (ii) 1 = 0001 1 = 0001 3 = 0011 Therefore 113 = 0000000100010011 b) (i) 113 = 001 110 001 in binary = 1 6 1 in octal. (ii) 113 = 0111 0001 in binary = 7 1 in hexadecimal. Notice: (i) and (ii) It was necessary to show a method of working out. Many students have calculators that will automatically change from one number system to another, so it is necessary to show that you know what you are doing, even if you use a calculator to check the results. Also, the question stated that the appropriate number of bytes be used, in part (i) this is obviously 8 bits and is an easy mark, but in part (ii) it is necessary to add a set of zeros to the front of the answer to make it a whole number of bytes. (iii) and (iv) The question stated that the first answer had to be used, so one of the two marks is going to be given for showing the relationship between binary and each of these two representations. Notice that for the octal answer it was necessary to add a 0 to the front of the binary number to give 9 bits (3 lots of 3). 2.

Explain how the denary number –27 can be represented in binary in (i) sign and magnitude (ii) two’s complement notation, using a single byte for each answer. (4) A. (i) +/64 32 16 8 4 2 1 1 0 0 1 1 0 1 1 = 10011011 (ii) –27 = -128 + 101 = -128 + (+64 +32 +4 +1) -128 64 32 16 8 4 2 1 1 1 1 0 0 1 0 1 = 11100101 Notice that the question asked “Explain…”, so just writing the answer down is not acceptable. There will be a mark for showing the column headings, particularly the value of the MSB in each case.

3.

Add together the binary equivalents of 34 and 83, using single byte arithmetic, showing you working. (3) A. 34 = 0 0 1 0 0 0 1 0 83 = 0 1 0 1 0 0 1 1 + 0 1 1 1 0 1 0 1 = 117 1 Note that the question asked for the working. The part that shows that you are capable of doing the arithmetic is the carry, don’t miss it out. In a question like this try to ask yourself what evidence the examiner is expecting for the mark. The other marks are for using 8 bits for each value, and for the answer.

4.

Describe a floating point representation for real numbers using two bytes. (4) A. -Available bits divided into fraction part (mantissa) and… -exponent part (power of 2). -Both are stored as Two’s complement values… -the mantissa is stored as a normalised fraction… -the exponent as an integer. -Example.

(4)

Notes: There are plenty of marks here, this is not an easy question. The question used the word describe and there are 4 marks for the question so a little more is expected on top of the idea of two parts to the representation. The example could be a worked example of a real number, but it would be acceptable, in this question, to provide a description of the column headings because the question asks that the representation be described rather than the method. The concept of normalisation is a complicated one and not really relevant to the question beyond the mention.

5.

a) Explain how the fraction part of a real number can be normalised.

(2)

b) State the benefit obtained by storing real numbers using normalised form. (1) A. a) -Digits are moved so that the first two digits are different. -A positive number starts 01… and a negative number starts 10… b) -The accuracy of the representation is maximised.

(2) (1)

6.

a) A floating point number is represented in a certain computer system in a single 8 bit byte. 5 bits are used for the mantissa and 3 bits for the exponent. Both are stored in two’s complement form and the mantissa is normalised. (i) State the smallest positive value, (ii) state the most negative value that can be stored. Give each answer as an 8 bit binary value and as a decimal equivalent. (4) b) Explain the relationship between accuracy and range when storing floating point representations of real numbers. (4)

A. a) (i) 01000/100 or ½ * 2-4 = 1/32 (ii) 10000/011 or -1 * 23 = -8 b)-The larger the number of bits used for the mantissa, the better the accuracy -The larger the number of bits used for the exponent, the greater the range -There is always a finite number of bits. -Therefore the more bits used for one part of the representation, the fewer bits can be used for the other. (4) Notes: This is a difficult question. The answers to part (a) have been written with / between the two parts of the representation for clarity, this would not be expected in a student answer. The idea of using a single byte is ridiculous, but it keeps the arithmetic possible in an examination. In part (b) the idea is not difficult, but the explanation is very difficult to put into words. Students who are happy with the arithmetic may find it simpler to use the examples in part (a) and move the partition between the two parts to show the effect.

7.

State the difference between dynamic and static data structures giving an example of each. (3) A. -A dynamic data structure can change in size during a program run, while a static data structure maintains a fixed size. -Dynamic List/Tree. -Static Array.

(3)

Notes: An array may be able to change size in certain circumstances, but it is the only example we’ve got, so don’t labour the point!

8. a) Show how a binary tree can be used to store the data items Feddi, Eda, Joh, Sean, Dav, Gali in alphabetic order. (4) b) Explain why problems may arise if Joh is deleted from the tree and how such problems may be overcome. (4) A. a)

Feddi Eda

Dav

Joh

Gali

Sean

Marks: -Root node -Eda and Joh correctly positioned in relation to Feddi -Eda’s subtree -Joh’s subtree

(4)

b) -Data in a tree serves two purposes (one is to be the data itself) the other is to act as a reference for the creation of the subtree below it -If Joh is deleted there is no way of knowing which direction to take at that node to find the details of the data beneath it. -Solution 1 is to store Joh’s subtree in temporary storage and then rewrite it to the tree after Joh is deleted. (The effect is that one member of the subtree will take over from Joh as the root of that subtree). -The data, Joh, can be marked as deleted so that the data no longer exists but it can maintain its action as an index for that part of the tree so that the subtree can be correctly negotiated. (4) Notes: The tree can be reflected in a vertical mirror quite justifiably. For this reason it is probably worthwhile making a note on the diagram of what rule has been used, just in case it does not match the examiner’s version.

9.

Describe two types of search routine, giving an indication of when it would be advisable to use each. (6) A. -Serial search carried out on data list by… -comparing each key with the desired one in turn… -until found or error message issued. -Useful if data keys are not in order or if the number of items of data is small. -Binary search carried out by… -continually comparing the middle key in the list with the required key… -and hence repeatedly splitting the list into two equal halves until…

10.

-middle value = required key or error if new list is empty. -Fast method of searching if the data list is large and the data is sorted on the key. (4) Describe the steps in sorting a list of numbers into order using an insertion sort. (4)

A. -Each value in turn is compared with the values already in the list and is… - inserted in the correct location. -Once a value has been inserted the algorithm is repeated by comparing all the values in the list, in turn… -with the next value in the list. -This continues until all the values have been inserted. -Example. (4) Notes: A difficult topic to ask a question about because the examination is relatively short. Consequently there is little time for each of the questions. If the question does not look like this it will almost certainly consist of a number of data items, numerical or alphabetic, and the candidate will be asked to explain a sort technique by showing how the data items are affected by a particular sorting method. There is nothing in the syllabus to say that sort algorithms will not be asked for, however, with the time pressure in the examination such a question would be most unlikely. 11.

Given two sorted lists describe an algorithm for merging them into one sorted list. (6)

A. -Select one value from each list -While neither list is empty -Compare the values in the lists -Copy the smaller value to the new list -Read the next value in the list that has had a value copied. -End while loop -When one list is empty copy the remainder… -of the other list to the new list.

(6)

Notes: The solution takes no notice of what would happen if the two original lists contained duplicate values. Neither does the solution consider the case when one of the original lists is empty. Both of these points are worth consideration and would earn credit if mentioned. The “algorithm” is not in any formal style. The syllabus states that the candidate should be able to describe an algorithm, not reproduce one in a particular form. These are mark points in the solution and not a rigid form of solution, a prose solution would be equally acceptable.

Back

3.4 Example Questions

try to ask yourself what evidence the examiner is expecting for the mark. The other marks are for using 8 bits for each value, and for the answer. 4. Describe a ...

125KB Sizes 4 Downloads 184 Views

Recommend Documents

Questions and answers on Article 34 veterinary referral procedures
Nov 21, 2017 - (including Icelandic and Norwegian, if applicable1) of the following annexes ... the CVMP opinion in all EU languages will be published on the ...

Questions and answers on Article 34 veterinary referral procedures
Nov 21, 2017 - This guidance document addresses a number of questions which stakeholders, in particular the marketing authorisation holders (MAHs), may have on Article 34 referral procedures to the Committee for Medicinal Products for Veterinary Use

1200-34
Nov 1, 2017 - Related Boards, at which the Pain Management Clinic registry office for ...... consideration to or from a third party for the referral of a patient in ...

1200-34
Nov 1, 2017 - registered nurses, and physician assistants who serve in the clinic, facility, .... that any practice act or any requirement of these rules has been ...

1200-34
Nov 26, 2017 - unrestricted, unencumbered license, who was issued a pain management clinic certificate prior to July 1, 2017, ..... (a) A notification of the denial shall be sent from the Administrative Office by certified mail, ..... (10) hours in c

34-tts-voices-serial-34-tts-voices-mediafire-34-tts ...
Page 2 of 2. Touch iPad with zero. Page 2 of 2. 34-tts-voices-serial-34-tts-voices-mediafire-34-tts-voices-crack-full-version-download.pdf.

34.PDF
This is generally related to a lower level of systematic. data gathering or statistical analysis. However, owner-managers are strategically aware and realize the. consequences of their decision [12]. The lack of formal business planning has been attr

1200-08-34
May 9, 2017 - been freed from the care, custody and control of the minor's parents. .... program accredited by the Accreditation Review Commission on .... Corporate stock transfers or sales, even when a controlling interest. .... accounting system. .

34/? 35/? Du
The down link 26 can comprise different channels D1, . . . , DN. Each .... data from a telephone 1 are A/D-conver'ted 2, voice coded 3 and then supplied to a ...

I' 34
varying the focus of the major lens due to the higher cost and lower resolution of .... illumination does not decrease too much in the domain of the spot, any of the ...

34.pdf
ufi ohfl n a q u rtl u rn6 o r fr olu n r : ufltt fl rgraT fr'c n u riu ... nrro-oa?-afinr:drnr r.J:v,t'rtl todbo :ruasrduorrj:rngnrudrdeilurd:u u1nuil?u.r'rufin':ruil:varri ... u r d, t v rl^ d t 1,. 5'r. hJailuaqutuunlnlnfufl vl9lu a{noa:1{. d s d

34.pdf
corporate environment or who was resentful of the supervision and control of a .... if not most, U.S. women were strongly. Page 3 of 10. 34.pdf. 34.pdf. Open.

34.pdf
Essav Writing: http://members.tripod. ... http: www.english.upenn.edu ... ext 266 o a [email protected]. Su distribución es gratuita. Page 2 of 2. 34.pdf.

1200-08-34
May 9, 2017 - A home care organization providing professional support services. ...... shall make the decision in accordance with the consumer's best interest.

of 34
bsigroup.com. © BSI BSI/UK/872/ST/0616/EN/HL. Page 3 of 34. WP12_How_to_prepare_for_and_implement_the_upcoming_IVDR___Dos_and_Don___ts.pdf.

1200-08-34
May 1, 2017 - decision for the individual granting the power. (7) Board. .... availability shall include, but not be limited to, availability by telephone.

AFC'34 Paastoernooi.pdf
In totaal zullen 2x 16 elftallen strijden om de hoogste eer, oftewel ca. 500 talentvolle voetballers bij AFC'34 op het complex! Verdeeld over twee. dagen zullen in ...

34-2558.pdf
ila z fi o ri r ra u pr ufi fl 'r rir 1 u n rir-r rn r4u n r r fi n :n rv du rirufi n fi n rgr. 2.1 nruv .... q d4Jcr ! y ---le-ga= l^- -- -4'q-U--.-.-lElo aa el ... 34-2558.pdf. 34-2558.pdf.

PDF 34.pdf
Since 2010 Circle of Blue. ○ Why do water and energy providers set their prices and pricing structures differently? What are. the consequences of those different ...

CAT News 34 - Semantic Scholar
year cycle of high and low numbers of the snowshoe ..... tigers by selling them over the Internet. According ..... Colorado. Samsudin, A.R., and S. Elagupillay. 1996. A review of the ..... length. To speed up screening, the preparation of contracts,.

Despierta 34-web.pdf
de la Catedral. Página 2. Cambio. Rodrigo López Estrada. Página 4. El cuidado de la Casa Común, un resumen de la Encí-. clica del Papa Francisco. Página 5.

30-34.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. 30-34.pdf.

SCO-34-bhopal.pdf
(d) Health Record Card. (e) White colour shirt/T shirt, shorts, socks and PT/sports shoes. 3. Common call up instructions for SSB interviews are available on the ...

CAT News 34 - Semantic Scholar
Disclaimer: Material and geographic designations in Cat News do not represent any opinion .... house in Muri, a town on the outskirts of. Bern, close to the ..... tigers by selling them over the Internet. .... data will be analyzed using program CAP-