In the COSC 243 exam, some students lost marks because of faulty exam technique rather than ignorance. Unfortunately, you can only be awarded marks on the basis of what you did write in the exam, not on the basis of what you might have written.
This note was written in the hope that it might help students to understand their next lot of exam questions a bit better, and therefore get marks that better reflect their understanding of the topic.
During the semester and study time (from Alistair Knott):
This section is based on my rather vague recollection of an excellent talk by Bob Parslow. It relates to just before the exam.
Suppose you have a 3-hour exam. That's 3×60 = 180 minutes. Suppose you have 15 minutes to read it. Leave yourself some spare time for going back and checking, maybe another 15 minutes. That leaves you 150 minutes for answering questions.
Suppose the questions in the paper add up to 100 marks. That means you have 150÷100 = 1·5 minutes per mark.
If you are working on a question with m marks, give yourself 1·5m minutes. If you are still working on that question when that time runs out, stop, leave some space in your answer book, and go on to another question. Continuing on a question when you've already spent the time budget for that question just takes time away from answering other questions you can answer.
Make sure you read the entire paper through carefully before you start to write anything. Make sure you have seen all the instructions, located all the supplementary material, and noticed every question.
Be particularly careful to notice how many questions you have to answer. One of your lecturers once got 19/20 for every question he answered in a certain exam, but discovered too late that he was supposed to answer 5 questions, not 4.
When you have choices to make, be careful to see whether it is “do 1 of the following” or “do 2 of the following”, or whatever.
When the reading time is up, go through the paper again, indicating on the question book which choices you have made.
Read the cover of the answer book carefully. You can do this during reading time. Make sure you follow all the instructions.
People who think they are sophisticated air travellers ignore the safety instructions; they've heard it all before. Really sophisticated air travellers listen carefully, study the safety card, and note the location of exits. In a crash, really sophisticated air travellers survive.
Start every question on a new page.
We really mean this. Every answer book is checked to make sure that the markers have got their sums right. Having more than one top-level question on a page makes this checking much harder, which makes it take longer, which delays examiners' meetings, which delays your marks coming out.
You don't have to start sub-questions on a new page. For example, in COMP201, the short answers section consisted of a top-level question with 15 parts: 21a–21o. Some students mistook each of these as a separate question and started their answers for 21a, 21b, 21c, and so on at the top of a new page. It takes longer to mark these answers.
Write in ink, not pencil.
We really mean this. Pencil is harder to read and smudges easily. If you think that giving an examiner eye-strain is going to improve your marks, think again.
I'm told that sometimes people write in pencil because the invigilators give pencils to people who forget to bring any writing tools of their own. Come prepared. Bring a pen which you have tested and still has plenty of ink. Bring a short ruler. You may need to draw a diagram, or to cross something out.
Marks may be deducted for bad handwriting.
We really really mean this. On occasion I have had to struggle longer to read an answer book than it took the student to write it. In a class of 12, I might do that again. In a class of 120, forget it. An examiner who cannot read your writing is under no obligation to assume that what you have concealed is correct. Keep your answers brief and to the point. When in doubt, print.
Unless the question book explicitly says otherwise, you may answer the questions in any order you like. Even when a question has subquestions, you may answer the subquestions in any order you like, as long as you clearly label in the margin what question you are answering.
Do the easy ones first.
There are two reasons for this: time management and psychology.
Time management: The easy ones are ones you can answer quickly, in less time per mark. That gives you more time per mark for the hard ones.
Psychology: If you start with an easy one, you will know for the rest of the exam that this is an exam you can succeed in.
Note down which questions you intend to do and in what order. Cross them off as you do them. Mark in some way any questions you have left unfinished and need to come back to.
Underline keywords (verbs, maybe nouns or “wh-word” phrases) that tell you what the question is asking. For example,
Draw a circuit that will accomplish this.
Draw a circuit that will accomplish this.
with a balloon around what “this” refers to, and a line connecting “this” to that balloon.
Circle numbers and variables.
Go through your answer, and on the question book, tick off every highlighted item that you have used in your answer.
Pause. Calm down.
Look at the question again. Have you used all of the information in the question? Is it possible that you have misunderstood the question?
Look again at the rest of the exam. If nothing else, it will tell you what this question isn't asking. You are likely to find a more positive clue.
Pay attention to the order of the questions in the exam. If you can see a pattern in the order, that may give you a clue about the answer.
If none of that helps, stop and go on to the next question.
If a question requires a diagram, draw a diagram. Sometimes a diagram is helpful anyway.
If a question requires a number, or a formula, or a reason, provide a number, or a formula, or a reason. You may add other material to your answer if you wish, but make sure that the examiner can easily determine which part of your answer is a direct answer to the question and in the form required.
If you are not sure what a question means, say so in your answer book and write down your interpretation of the question. Then answer what you think the question means. We are looking for evidence that you understand the subject. The examiner may decide that your interpretation is a reasonable one (even if it is not the one s/he intended) and award you full marks. The examiner may decide that your interpretation is not a reasonable one, but award partial marks because your answer demonstrates understanding of the topic. If you don't do this, the examiner will assume that you understood the question, but could not answer it correctly.
This is a hard one. Unfortunately, some examiners want terse answers, and some want prolix ones.
At a minimum, what you write for a question must include a complete answer to the question. I still remember asking “How many 4-byte entries does an 8 kilobyte block hold?” and a student writing ``No'' as his answer. (The right answer was 2048.)
If you have to do some “calculation” to find the answer, show your working. This is very important. Sometimes you misunderstand the question, but from your working we can see what question you thought you were answering, and give you some marks for being able to do the rest correctly. Sometimes you make a tiny slip part way through a calculation. Then we can give you some marks for knowing what the question is and what kind of calculations to do.
“Calculation” should be understood in quite a wide sense here. It can be any kind of reason or justification for your answer.
Saying too much can be bad. Above all, writing takes time. You can write clearly up to a certain number of words per minute, no more. If you try to write more than that, your answer may become unreadable. Some people can write clearly faster than others. If you can't write fast, keep your answers brief but informative.
Sometimes when people write a lot they lose marks because some of the things they wrote are wrong. Yes, you can lose marks for saying too much. Sometimes when people are not sure of the answer they give a “brain dump”, they write everything they can think of that mentions the same keywords. That is not a good idea. Brain dumps tend to contain a lot that is clearly off topic or wrong, and will cost you marks.
Let's see if we can put some numbers on this. An exam answer book has 10 pages. Each page has 30 lines. On a line you can write 10, maybe 12 words. Call it 10. That's 3000 words per answer book. A 3-hour exam is generally designed so that you can answer it more than adequately in one answer book. At 100 marks, that's a maximum of 30 words per mark. This is only a guideline, but it's actually a pretty good one.
I have taken the first four questions of the 2001 COSC 243 exam. My concern here is not so much what the answers are (although some answers are provided and some are outlined), but with the process of understanding what the question is asking for.
Describe two different ways to represent (bounded) whole numbers in
a computer. Say what range of numbers can be represented in n bits,
and how to decode an n-bit word to get a number.
What is integer overflow?
Since this is a 4 mark question, an answer up to 4×30=120 words or 12 lines would be appropriate. Well spread out, that could be up to a page; written compactly, half a page.
We'd expect an answer like
One way to represent bounded whole numbers is ...
The range of numbers it can represent is lb1(n) to ub1(n).
You decode an n-bit word by doing ...
A different way to represent bounded whole numbers is ...
The range of numbers it can represent is lb2(n) to ub2(n).
You decode an n-bit word by doing ...
Integer overflow is ...
Two different representations are called for. Since the question stresses “whole” numbers, floating-point is ruled out. In the last lecture of COSC 43, students were told not to worry about excess or negative-base representations, leaving sign-and-magnitude, ones-complement, and twos-complement as the alternatives. It is definitely worth paying attention to review lectures and/or handouts. If a lecturer tells you something is examinable, it might or might not be in the exam. If a lecturer tells you something is not in the exam, then it won't be required in any question.
A range is called for. That means an upper bound and a lower bound; any answer giving only one number or formula has to be wrong.
Since the question involves n, your answer should depend on n; giving the bounds for 8-bit, 16-bit, or 32-bit arithmetic is wrong (even if the numbers are right, which they often weren't), because that's not an answer to the question that was asked.
Since the number of bit patterns using n bits is 2n, ub1(n)-lb1(n)+1 should equal 2n, and so should ub2(n)-lb2(n)+1.
An answer that says how to encode a number is wrong.
Let's look at the last part for an idea of how much to write.
Integer overflow is when a computed integer result is too big to fit the encoding.
I would have given that full marks. However, you might want to make
sure, and write just a little bit more.
Integer overflow is when a computed integer result is bigger than the upper bound for the encoding or smaller than the lower bound for the encoding. See my answers above for the bounds in two encodings. In sign-and-magnitude, overflow is detected when there is a carry into the sign bit. In twos complement, overflow is detected when the carry out is not equal to the sign bit.
This question was worth 1 mark (at most 30 words). The short answer
above is 15 words. The long answer is 69 words. That is definitely
too long. It gives information that was not called for, and could easily
be wrong. (Are the detection rules given above correct for all
operations? What about multiplication?)
Taking the first two sentences of the long answer would give
you 36 words. Let's try for something a bit shorter:
Integer overflow is when a computed integer result is outside the range of numbers that the encoding can represent. See above for some typical ranges.
At 25 words, that's about as long as you should consider writing for one mark.
How many different characters could an 8-bit byte represent?
This expects an answer that is a single number. The obvious answer is 28 = 256, if you thought the answer was something different you would have needed a justification for that.
Why does Unicode have a lot more characters than that?
The question asks why Unicode has many more characters than 256. It doesn't ask “how come Unicode can represent more characters than that”. There are several 8-bit encodings for Unicode (obviously a single character may need more than one byte) and even a 7-bit encoding, so simply saying that it uses 16 bits mistakes effect for cause.
One strategy for a question like this is to state your assumption.
I assume this means “how can Unicode represent more characters”. Because it uses 16-bit codes.
wasn't the intended answer, but would probably have got at least half marks, instead of 0.
A better strategy for a short question with short answers is to give
both of them:
Unicode HAS more characters because there ARE more characters in the world, such as Chinese. It CAN have that many characters because it uses more bits, I think 16.
How would you represent a character in a computer, then?
This question has to be read in the light of the previous two questions.
The first tells you that a byte can only hold (one of) 256 characters;
the second tells you that there are a lot more characters that need
representations. So one byte for a character
will not do. Any answer along the lines of
Use more than one byte.
got full marks. The “, then” is the clue that the previous questions provide essential context.
People who read this as “how would you personally represent a character in a computer” should bear in mind that Science exams almost never ask personal questions. Since you were taught Java in 103, and since Java uses 16-bit characters, even then the right answer would not have been “use one byte”.
Some characters can be
represented more than one way in Unicode; why is that a problem?
Many people were unclear on the difference between redundancy (more than one code represents the same character) and ambiguity (one code may represent more than one character). Neither word appeared: you were told that some characters are represented more than one way. Yet many people answered as if it said that “some codes represent more than one character”. They don't, and no-one ever told you they do. It is important to read questions carefully and answer the question that is actually asked.
Why is floating-point arithmetic only an approximation to
A “why” question often asks about a cause. In the Metaphysics, Aristotle identified four types of cause. This is copied from a Web page:
The actual vs potential state of things is explained in terms of the causes which act on things. There are four causes:
- Material cause, or the elements out of which an object is created;
- Efficient cause, or the means by which it is created;
- Formal cause, or the expression of what it is;
- Final cause, or the end for which it is.
Take, for example, a bronze statue. Its material cause is the bronze itself. Its efficient cause is the sculptor, insofar as he forces the bronze into shape. The formal cause is the idea of the completed statue. The final cause is the idea of the statue as it prompts the sculptor to act on the bronze. The final cause tends to be the same as the formal cause, and both of these can be subsumed by the efficient cause.
What has this got to do with exams? In this question, “why” might be asking
It pays to look around to see if there are any similar questions; an exam probably won't ask the same question twice. Sub-question iii asks about the final cause, which rules it out here. We didn't discuss how floating-point arithmetic works, only how floating-point numbers are represented, so that rules out the efficient cause. The whole question is about data representation, which is a pretty serious clue that the right kind of answer here concerns the Material cause: what is it about computers, or about the IEEE 754 representation, which forces floating-point arithmetic to be inexact?
Any answer like “Because of roundoff” is simply saying that “floating-point arithmetic is approximate because it is approximate”, so can't be an answer to anything.
What determines how good an approximation it is?
Several people read this question as “What is the definition of ‘approximation’” or “when is one number a better approximation than another”. If we'd meant that, we'd have written that. This question is about material cause again. What is it about the structure of the IEEE representation that affects how good an approximation to real arithmetic we get? And the answer is “the number of bits”. If you move from single precision (32-bit) to double precision (64-bit) you get a better approximation. End of story.
Suppose you are worried that “the number of bits” is too
short an answer. It's only a 1 mark question, so we don't want more than
30 words. Try this:
Within a certain range (determined by exponent field width) the precision is determined by the number of bits in the significand.
Or if you'd like to give a formula, try this:
If the significand is n bits, the relative error is about 2-n. For better approximations, increase n.
At 17 words, that answer is hard to improve on.
Why don't we insist on exact real arithmetic?
This one is asking about what people do. Is floating-point the only possible choice? Is it the only affordable choice? Is it the cheapest choice? Is it better for some other reason, such as speed? Questions about why people choose this or that or the other in computing generally have to do with
An IEEE 754 single
precision floating-point number has sign, exponent, and significand
fields. What is the significand field for?
A straight memory question, I'm afraid. However, since the question mentions sign and significand as different things, “the sign of the number” can't possibly be the right answer.
Exponent is a general mathematical term referring to e in ab. You are expected to know that from high school or first year. It bears its standard meaning here, so “the number to which 2 is raised to scale the number” can't be the right answer either.
That really only leaves one thing for the significand to be, the only difficulty being whether you remembered about the hidden bit.
Write truth tables showing how the output of a NOT gate, an AND
gate, an OR gate, and an XOR gate depend on their inputs.
Four types of gate are mentioned, so four truth tables are required.
Inputs are mentioned: do all of these gates have the same inputs? AND gates, OR gates, and XOR gates may have 2 or more inputs; since the number of inputs is not mentioned, and since n-ary ones can be synthesised from binary ones, assume 2-input gates. Does a NOT gate have 2 inputs?
Some people used 0/1 for false/true; some used F/T. Some switched, the inputs might be 0/1 and the outputs F/T. It helps to be consistent.
Is the order of the rows 00 01 10 11 or 11 10 01 00? You're not told, so maybe it doesn't matter. Or maybe you need to state an assumption.
An answer might look like
x y NOT(x) AND(x,y) OR(x,y) XOR(x,y) --------------------------------------- 1 1 0 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 0 1 0 0 0
Our rule of thumb for length (3 lines per mark) suggests a little under half a page for the answer. As you see, that's ample.
A video recorder controller has three inputs:
It has one output:
We want the recorder to record when the time is right, unless someone
is watching a channel other than channel 2. Draw a circuit that will
“Draw a circuit”. A logic circuit is made up of gates. The answer must be a diagram containing gates connected by wires. At least the input wires must be labelled. Labels are mentioned in the question, so n, c, and t should be used as labels for input wires and r should be used as label for the output wire.
There are three inputs. If your answer doesn't use all of them, something strange has happened, and you need to comment on it, saying why it is right to ignore one of the inputs.
An amazing number of people tried to write down a state diagram. But there is no sequence of events described here, so it wasn't surprising that you couldn't do it. Note that the output is “if the recorder should be recording”, not “if the recorder should start recording”.
Aside from the fact that the question explicitly asked for something completely different from a state diagram, was there any clue that such an answer might not be appropriate here? Yes: the order of the questions here (logic, gates, PLAs, flip-flops, sequential circuits) corresponds to the order in which these topics were covered in lectures. In fact, the order of questions 1--4 corresponds to the lecture order as well.
This correlation between question order in exam and topic order in lectures may well hold in other papers. Especially within a single question, order of subquestions may provide useful clues.
There was an unintentional ambiguity in the question: is it possible for the VCR to record if the TV is off (in that case the right answer is based on AND(t,NOT(AND(n,NOT(c))))) or must the TV be on for the VCR to record (in that case the right answer is based on AND(t,AND(n,c))). Both answers were given full marks, although the double negation in the question should have hinted at a double negation in the answer.
What is a PLA?
Read the question carefully. It does not say “what does PLA mean?” or “what does PLA stand for?”. It's not a question about the letters! It says “What is a PLA?” and is a question about the kind of circuit that the letters stand for. Expanding the acronym was entirely irrelevant to the question.
Questions about “what is a thing” are questions about material and efficient causes. What is the thing made of? How are its parts arranged? So a PLA is a circuit made up of NOT gates, AND gates, and OR gates, cascaded in that order, which can be “programmed” by making or breaking connections in a preconfigured array.
What are D-type flip-flops?
Another is question. They are circuits with certain inputs and certain outputs made up of gates in a particular pattern that is bistable. You didn't need a lot of detail about which gates or what pattern.
Question ii asks about what D-type flip-flops do, so it should be clear that this question isn't asking that.
What if you didn't remember anything about these devices? Pause, and look at the rest of the question. Evidently, they do something in sequential circuits. A sequential circuit contains a “logic” part and a “memory” part. But an earlier question asked about logic gates. So maybe D-type flip-flips have something to do with memory. If you wrote “A device with a data input, a control input, and a data output; it can be in two states, and the control input says when to remember the data input” you would have described the simplest possible memory device, and you'd have had a full-marks answer without actually remembering about D-type flip-flops (as opposed to, say, J-K flip-flips).
What do they do?
This could be read as “what is their behaviour?” or “what do they accomplish for us?” (Formal and final causes respectively.) However, question iii asks “what are they used for”, which is a final cause question, so a formal cause answer (how do they behave when poked in various ways) is probably the right one. (Final cause answers were also accepted.)
What are they used for in sequential circuits?
This is a final cause question. What purpose do they serve?
Draw a block diagram of a sequential circuit.
This required a block diagram of a sequential circuit, not a block diagram of a flip-flop. This was actually intended to prompt your memory for the previous question. The block diagram has two blocks. The “combinatory logic” (material cause) or “next state calculation” (final cause) block on top, with an “input” connection from outside and a “current state” connection from the other block, an “output” connection to the outside and a “next state” connection to the other block. The other block is “flip-flops” (material cause) or “current state storage” (final cause).
Note that the blocks in the diagram can be labelled according to what they are made of, or what they are used for. You are expected to wonder which to use.
Structure of a Computer
Explain the following parts of a computer and how they are connected:
The first line has two questions: “explain the parts” and
“how are they connected”. These questions are applied to four things.
There will be five answers, because “how are they connected” applies to
all of them collectively. So the answer looks like
A central processing unit is made up of ... and is used for ...
A memory is made up of ... and is used for ...
The input/output part is made up of ... and is used for ...
A bus is made up of ... and is used for ...
These parts are connected (text or a diagram).
Is the question asking about material cause (what these parts are made of), efficient cause (how they are built), formal cause (the description they satisfy), or final cause (what purpose they serve)?
We didn't tell you how computers are built, which rules out efficient cause. “Material” in this context includes things like gates and flip-flops and wires and other functional parts. Since the question doesn't say precisely, some combination of material cause and final cause would be a good answer.
A bus is a little bit more than just wires. It also includes logic to determine which functional unit can control it and when. It's important not to forget the control logic.
What are the following parts of a computer? What do they do?
“What do they do” could be read as “what do they all do together”, but the answer “be a computer” isn't terribly interesting. The only interesting reading is “what do they each do considered separately”. So we have two questions applied to four parts, and the answer must look like
ALU It is ... It does ... Registers They are ... They do ... Control unit It is ... It does ... Processor status word It is ... It does ...
There's another is question, so this is asking about what these things are made up (an ALU is a bunch of combinatory logic with two input ports and an output port and some control wires) and what their function is (it performs arithmetic and logical calculations on its inputs, the operation such as ADD, XOR, CMP being selected by the control wires, and puts the result on its output port).
Memory and I/O
What are the levels in the memory hierarchy?
This could mean “what are the names of the levels”, or it could mean “what are the levels (and to answer that you will need to mention the names).
The reading “what are the names” was not available for other questions because they provided all the relevant names.
The reading “what are the names” was not the intended reading, but it was a reasonable reading, and answers of that kind were accepted.
This time, “what are” just means “list”.
The levels are memories differing in capacity, bandwidth, and latency. That's what the intended reading is asking for (as well as the names). Quite a few people did draw labelled arrows showing the directions of “faster” and “bigger” or the like. Good on you!
Drawing a pyramid diagram of the levels was cute, and if you did it, rest assured it did you no harm at all. Since the question did not say “draw the memory hierarchy”, it wasn't required.
Which levels are handled by hardware and which by the operating system?
A truly amazing number of people got this back to front. The point is that some of these levels are fully supported by the hardware (registers, cache, main memory) while some of them are not available as part of the memory hierarchy unless software intervenes. There is some hardware support for virtual memory, but the operating system has to choose which pages to throw out and where to find the pages that it brings in, and it has to tell the disc to do the reads and writes because the disc hardware won't act by itself.
What problem does the memory hierarchy solve?
The answer has to be a description of a problem (something bad). It has to be a problem that the memory hierarchy solves, that is, something bad that would happen if we didn't have the hierarchy, but wouldn't happen if we did.
A problem that is caused by the existence of the memory hierarchy is an answer to question iv, not question iii.
What problems does it create?
This time, the answer must be something bad that does happen if you have a memory hierarchy and doesn't if you don't. The basic problem is that the information has to move around the hierarchy and be kept consistent, but that doesn't happen by itself: part of the system resources have to be dedicated to managing the memory hierarchy. Other possible answers can be derived from this.
A problem that is solved by the existence of the memory hierarchy is an answer to question iii, not question iv.
Define and then explain the advantages and disadvantages of the following input/output methods:
This was swiped directly from last year's exam and simplified (it does not ask about DMA).
The question asks for (definition, advantages, disadvantages) for
(polling, interrupt-driven) I/O. So the answer has to look like
Polling means ...
It is better than interrupt-driven I/O because ...
It is worse than interrupt-driven I/O because ...
Interrupt-driven I/O means ...
It is better than polling because ...
It is worse than polling because ...
Many people confused “polling” with “polling excessively often”. In polled I/O, each device has to be checked at a rate that is consistent with the rate at which the device operates. People can't type more than a few tens of characters per second, so checking the keyboard every 10ms is ample. You don't have to do it after every application instruction.
As usual, advantages and disadvantages have to do with
If you are fortunate enough to be in one of the courses that Nathan Rountree teaches, he has some excellent advice about exam technique. This note was inspired by his advice, but he bears no responsibility for its form or content. Similar considerations apply to assignments and projects, although there you have more time to deal with difficulties of interpretation. The one thing you must do for assignments is read them carefully and ask questions as soon as possible. Even if you put off the work, don't put off asking for clarification.