0% found this document useful (0 votes)
133 views9 pages

mip-exam-mip-test2

Exemination

Uploaded by

mchunukwanda41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views9 pages

mip-exam-mip-test2

Exemination

Uploaded by

mchunukwanda41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

lOMoARcPSD|39623635

MIP exam - MIP Test2

Information Technology (Tshwane University of Technology)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Kwanda Mchunu ([email protected])
lOMoARcPSD|39623635

MIP exam

Question 2

You are required to carry out a sequence of instructions as set out below. The object of the exercise is to
determine the final contents of boxes A and D. follow the instruction carefully until a clear pattern
emerges. At that stage you should look for a means of reducing the number of repetitive steps i.e. find a
way of calculating or reasoning out, what the final answers will be. Then write these answers in boxes A
and D, any method, step or formula can be used in order to obtain the correct answer

Instructions 1
Add the last two numbers in box A together and enter the result as the next number in box A

Instruction 2
Subtract 1 from the number in box B and enter the result as the next number in box B

Instruction 3
If the number in box B is greater than the number in Box A, go to instruction 1

If the number in box B is less than number in box A, go to instruction 4

Instruction 4
Subtract the third number in box A from the fourth number in box A and enter the result number in box
C
Do not add any previous number in box C

Instruction 5
Subtract the number in box C from the last number in box A, entering the result as the next number in
box A.

Instruction 6

Downloaded by Kwanda Mchunu ([email protected])


lOMoARcPSD|39623635

Subtract the second number in box A from the third number in box A and enter the result in box C.
Do not add to any previous number in box C

Instruction 7
Add the last number in box C to the number in box D

Instruction 8
If the number in box A is greater than the number in box D, go to instruction 4

If the number in box A is equal to the number in box D go to instruction 9

Instruction 9
Stop. You have completed the problem

Question 3

This algorithm simulates the addressing system on a computer disc file. The diagram represents a disc
divided into 4 quadrants, each quadrant divided into 3 tracks and each track divided into a number of
locations

In these locations are alphabetic characters. These represents the contents of the location not the
addresses of the locations. The addresses are given by the formula

QUADRANT / TRACK / LOCATION

The quadrants are ‘A’ ‘B’ ‘C’ ‘D’ in a clockwise direction. The tracks are ‘A’ ‘B’ ‘C’ from outside to inside

Thus, the expression of

QUADRANT / TRACK / LOCATION A A A

Refers to the first quadrant and within it to the first track abd within it to the first location.

Looking at the diagram you will see this contains the letter H.

In order to group the Q T L symbols into a coherent entry it will be represented as A (A,A)

First the Quadrant

Downloaded by Kwanda Mchunu ([email protected])


lOMoARcPSD|39623635

Then the Track

Then the location

Given the reference

D (C,E)

You will find the answer in

The fourth Quadrant

On the third Track

In the fifth Location moving clockwise

It is the letter D

WRAP-AROUND

The principle of wrap-around means returning to the beginning of a series when the end has been
reached and starting all over again

Using this we can refer to our quadrants are A-B-C-D and then starting at A re-name it E, B become F, C
becomes G, D becomes H, E which started as A now becomes I and so on through the alphabet.

A becoming synonymous with E, I, M, Q etc.

B becoming synonymous with F, J, N, R etc.

The same applies to the tracks

The outer track is A, but since there are 3 of them it is also D, G, J and so-on through the alphabet

The location within the track may be treated in the same way

The outside track, track A in any quadrant has 8 locations moving clockwise from A to H on the first
wrap-around, location A becomes re-named location I.

The expression T (O, I) therefor

Becomes D (C, A)

And the answer is: N

This is not clear, go back to the paragraph heading “WRAP_AROUND” and wrap-around

FUNCTUATION

The commas and brackets are of vital importance in this section. You will have noticed that in resolving

D (C, A) to N

Downloaded by Kwanda Mchunu ([email protected])


lOMoARcPSD|39623635

The brackets and the comma within the brackets disappear

In some of the following questions you will find that the letters produced as answer from the first level
of the problem form, yet another set of quadrant / tracks / locations referenced, and your task is to
follow the trail down to a final single letter answer

Should you encounter a single letter contained within the brackets like this (F) you are to replace it and
the brackets by the letter V and then carry on

The expression B ((B (A, A)), C)

Becomes B ((F), C)

Becomes B (V, C)

And the answer is C

Should you encounter brackets within other brackets, deal with the innermost set first and work
outwards until you solved the expression.

Question 4

Definitions and Specifications

The instruction ACCUMST is used in this problem. The purpose of this instruction is to accumulate the
content of two stores and place the result in a third store. When the instruction is specified, the
instruction name ACCUMST will be written followed by an opening bracket. Three locations will be
indicated within the square brackets, each of these being enclosed in parenthesis. The three numbers
within the parenthesis represent respectively the locations where the information is given about the two
numbers to be added and about where the sum should be played after the accumulation has been
performed.

e.g. ACCUMST [(X) (Y) (Z)]

The above statement means that information about the first number is provided beginning at location X,
in the same way, information about the second number is provided beginning at location Y, and
information about the sum of the two numbers should be stored, once they have been added together,
is provided at location Z

Note

(X), (Y) and (Z) are not themselves the numbers to be used in the calculation. They are referred to as

Downloaded by Kwanda Mchunu ([email protected])


lOMoARcPSD|39623635

The members of the expression

And their numeric value indicates the grid references that you must use in order to solve this problem.

The Grid

This Is a 10 x 10 matrix as shown below.

The grid reference point starts at line zero column zero and continues to line nine column nine. Note that
the line number is given first, then the column number. The grid should be considered to be a wrap-
around table. Thus grid reference 100, which would occur after 99, is actually position 00. Similarly, grid
reference 834 is 34 and you will find that the digit given at 34 Is 6

0 1 2 3 4 5 6 7 8 9
0 4 6 2 6 3 5 2 7 6 3
1 2 9 0 2 7 5 1 1 0 8
2 2 0 9 3 2 0 1 0 7 0
3 0 5 0 6 6 3 1 1 1 2
4 5 0 3 0 1 4 9 0 0 8
5 3 0 0 7 1 3 5 2 1 3
6 4 5 3 8 0 1 2 2 2 3
7 4 0 9 0 9 0 3 0 5 4
8 2 4 3 2 8 8 9 3 6 0
9 2 2 3 6 0 5 6 0 7 8

A series

A series will start at a given grid reference point and will consist of 8 digits. The first 2 of the eight should
be regarded as a two-digit number which we shall refer to as the major total. The third digit Is called the
bucket, the fourth digit is called the first operand and the fifth digit is called the second operand. The
following two, as a two-digit number, we shall call the number total. The final digit shall be called the
switch.

With the exception of the bucket, these may all be inserted as arithmetic values. The bucket contains a
number which designation a specific bucket that is to be referenced.

These are the buckets

They are to be referred to by these numbers

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Each bucket contains a 3-digit number as follows:

Downloaded by Kwanda Mchunu ([email protected])


lOMoARcPSD|39623635

0 100

1 125

2 160

3 167

4 251

5 276

6 305

7 312

8 400

9 576

When we write bucket, we mean the number of the bucket. When we write (bucket) we mean the three-
digit number contained in the bucket. In order to determine the value for any member of the expression
– (X) or (Y) or (Z) – locate the series given by the grid reference. Now add together the first and second
operands, the result is to be added to the minor total if the switch is greater than 5 or subtracted from it
if the switch is less than 6. To the sum you must now add (bucket) plus major total.

The result now gives a grid reference number which is the first digit of a two-digit number. This number
indicates how many digits there are in the answer which you require. The answer itself begin
immediately after two-digit number.

As an example, we shall show you how to work out the first member of the expression in

ACCUMST [(32) (77) (445)]

Locate the series indicated by 32. It is 06631112

Add the first and second operands = 4

Add the sum to the minor total if switch is >5

Switch is 2, therefore subtract 4 from 11, giving 7

Add (bucket) giving 312

Add major total given 318

Starting at grid reference 18 is a two-digit number giving the answer as an eight-digit number
immediately following i.e. 20932010

Downloaded by Kwanda Mchunu ([email protected])


lOMoARcPSD|39623635

Question 5

0 1 2 3 4 5 6 7 8 9
0 0 1 1 4 4 2 0 0 1 2
1 2 0 3 3 0 0 3 1 5 5
2 2 0 2 0 2 0 2 0 7 9
3 6 7 6 0 2 1 6 6 2 0
4 0 1 0 2 0 5 0 1 5 5
5 0 5 1 9 9 2 9 6 7 6
6 5 4 3 2 1 0 0 6 9 0
7 6 1 1 1 2 1 2 3 0 0
8 4 1 1 1 2 9 9 9 5 0
9 1 0 1 2 1 3 1 4 1 5

Within the given grid, there are a number of strings

A string has the following pattern

It’s the first two digits indicates the strings serial number

The next two digits, as a two-digit number, indicate the total number of digits in the entire string.

The next two digits, as two separate one-digit numbers, indicate the decimal places of Rand and two
decimal places of cents in a value. Thus 32 means that the value contains three places of Rand and two
places of cents. Following this will be the actual value itself, comprising as many digits as required to
hold the Rand and cents as indicated. If, as in the example, there are 3 places of Rand and two places of
cents, the value would thus be held in 5 digits.

Following the value will be a two-digit number which is the grid reference of the next string in the series.

We suggest you start attempting to answer the question which follow, by first indicating all the digits in
each of the strings clearly, on your answer sheet.

Answer sheet – Question 5


You are given that string 01 begins in grid reference 00

1. Where does string 02 begin? _________


2. How many strings are there in the grid? __________
3. What is the grid reference of the final digit in the final string? ______________
4. Give the sum of the total values in Rand and Cents for the two lowest and two highest strings.
_______

Downloaded by Kwanda Mchunu ([email protected])


lOMoARcPSD|39623635

5. On the grid itself, alter all strings serial number so that


 What was string 1. Becomes string 4
 What was string 2. Becomes string 3
 What was string 3. Becomes string 6
 What was string 4. Becomes string 5
 What was string 5. Becomes string 2
 What was string 6. Becomes string 1
6. Make sure the minimum changes to the other numbers in the grid that this alteration document.
Do not relocate the Rand and cents figures.

0 1 2 3 4 5 6 7 8 9
0 0 1 1 4 4 2 0 0 1 2
1 0 0 3 2 0 0 3 1 5 5
2 2 0 2 0 2 0 2 0 7 9
3 8 7 6 0 2 1 6 6 2 0
4 0 1 0 2 0 5 0 1 5 5
5 0 5 1 9 9 2 9 8 7 6
6 5 4 3 2 1 0 0 6 9 0
7 6 1 1 1 2 1 2 3 0 0
8 4 1 1 1 2 9 9 9 5 0
9 1 0 1 2 1 3 1 4 1 5

Downloaded by Kwanda Mchunu ([email protected])

You might also like