A) Express The Number 113 (Denary) in
A) Express The Number 113 (Denary) in
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.
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. 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 Joh
Marks:
-Root node
-Eda and Joh correctly positioned in relation to Feddi
-Eda’s subtree
-Joh’s subtree
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.
5. 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.
b) State one type of instruction that would cause the pipeline system to be reset,
explaining why such a reset is necessary. (3)
A. a)
-All instructions have three phases…
-which are treated separately, by different parts of the processor…
-so that more than one instruction can be being dealt with simultaneously.
b)
-Jump instruction
-The instructions in the pipeline are no longer the ones to be dealt with next…
-so the pipeline has to be reset.
8. Explain why the size of the memory available is particularly relevant to the process of
compilation. (4)
10. Explain how an interrupt is handled by a processor which is working on another task.
(4)
A. -At some point in the cycle/at the end of an instruction
-the processor will check to see if there are any outstanding interrupts.
-If there are, the current job is suspended and…
-the contents of the special registers are stored so that it can be restarted later
-interrupts are then serviced until all have been dealt with…
-Control is returned to the original job.
Explain how the computer should prioritise the two types of job if it is going to make
maximum use of the system. (4)
A. -I/O jobs are those that require relatively little processing but do need to use the
peripheral devices substantially
-Processor bound jobs require a large amount of processor time and very little use of
the various peripheral devices.
-I/O jobs are given the highest priority…
-in order to keep the peripherals working as much as possible…
-and because they would be blocked and ‘never see’ the processor if the others had
priority.
12. a) Explain the difference between paging and segmenting when referring to memory
management techniques. (2)
b) Describe how virtual memory can allow a word processor and a spreadsheet to run
simultaneously in the memory of a computer even though both pieces of software are
too large to fit into the computer’s memory. (3)
A. a)
-They are both methods of dividing up the available memory space into more
manageable pieces.
-Paging involves memory being divided into equal size areas.
-Segmenting involves areas of different size dependent upon the contents needing to
be stored.
b)
-The software code is divided up into parts that have some level of equivalence.
-Those most commonly used routines are kept together
-These are loaded into memory and other routines are
-only loaded when the user calls upon them.
-Thus they give the impression of being permanently available.
13. Describe how a PC operating system uses a file allocation table to find files when
necessary. (4)
A. -The disk surface must be divided up into small areas
-Files are stored in these small areas
-Each file will normally use more than one area
-The table of files has an entry pointing to the first area on the disk surface used by
that file and
-a pointer to the next area.
-Each subsequent area has a pointer to the next area, as in a linked list with…
-a null value to signify the end of the file.
(Total: 70)