0% found this document useful (0 votes)
13 views17 pages

CSIT103RegularDecember2018 1

Uploaded by

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

CSIT103RegularDecember2018 1

Uploaded by

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

UNIVERSITY OF GHANA

(All rights reserved)


B.A/BSc. COMPUTER SCIENCE, FIRST SEMESTER EXAMINATIONS
2018/2019
CSIT 103: INTRODUCTION TO COMPUTING (3 CREDITS)
TIME ALLOWED:
TWO AND A HALF (2½) HOURS
ATTEMPT ALL QUESTIONS - [100 MARKS]
Summary table for answers (Your answers must be provided on the table below)

1 18 35 52 69 86

2 19 36 53 70 87

3 20 37 54 71 88

4 21 38 55 72 89

5 22 39 56 73 90

6 23 40 57 74 91

7 24 41 58 75 92

8 25 42 59 76 93

9 26 43 60 77 94

10 27 44 61 78 95

11 28 45 62 79 96

12 29 46 63 80 97

13 30 47 64 81 98

14 31 48 65 82 99

15 32 49 66 83 100

16 33 50 67 84

17 34 51 68 85

EXAMINER: FERDINAND KATSRIKU (PHD) Page 1 of 20


Study the table below carefully and use it to answer questions 1-6. The last row in the table shows
a binary code.

24 21
4s 2s
1 0 1 0 0 1 1 0

1. Assuming that the code represents a binary number which of the following correctly shows the
representation of the middle row.
a.
24 21
128s 64s 32s 15s 8s 4s 2s 0s
1 0 1 0 0 1 1 0
b.
24 21
128s 64s 32s 16s 8s 4s 2s 1s
1 0 1 0 0 1 1 0
c.
24 21
128 0 32 0 8 4s 2s 1
1 0 1 0 0 1 1 0
d.
24 21
-1 0 32 16 8 4s 2s 1
1 0 1 0 0 1 1 0

2. Assuming that the code represents a binary number which of the following correctly shows the
representation of the top row.
a.
27 26 25 24 23 22 21 2
4s 2s
1 0 1 0 0 1 1 0
b.
27 26 25 24 23 22 21 20
4s 2s
1 0 1 0 0 1 1 0
c.
28 27 26 24 23 21 21 2
4s 2s
1 0 1 0 0 1 1 0
d.
27 26 25 24 23 22 21 2
4s 2s
1 0 1 0 0 1 1 0

3. If the binary code represents an unsigned integer, then the denary equivalent is an even number?
a. True
b. False

4. If the binary code represents an unsigned integer write down the denary equivalent of the binary
number in the last row ___________

EXAMINER: FERDINAND KATSRIKU (PHD) Page 2 of 20


5. If the last row is a two’s complement representation of a signed integer, then the number represented
is a negative number?
a. True
b. False
6. What is the denary equivalent of this two’s complement representation?
a. 166
b. -90
c. 90
d. -166
7. If the denary number 373 is to be converted to a binary representation, how many bits will be needed?
a. 2
b. 4
c. 9
d. 8
Use the following to answer questions 8 and 9.
A car has an odometer (milometer) which at the start of a journey shows 99940 and at the end shows
00230.
8. What is the result of subtracting 99940 from 00230?
a. undefined
b. -99710
c. 290
d. 99710
9. What is the total distance travelled by the car?
a. 99710
b. 230
c. 60
d. 290
10. A bitmap has an image stored that has resolution of 1024 x 768 and a colour depth of 8. Another file
contains a five-minute soundtrack stored using a sampling rate of 100 samples per second and a
sampling resolution of 16. What is the size of the bitmap image file?
a. 6,291,456
b. 60,000
c. 1024
d. 786432
11. Which of the following is an example for which lossless compression is essential?
a. Text document
b. Sound
c. Video
d. Image
A new company has been established. It has bought some new premises which consist of a number of
buildings on a single site. It has decided that all of the computer workstations in the different buildings
need to be networked. They are considering ways in which the network might be set up.
Use the above scenario to answer questions 12-15.
12. Which of the following are cable types they might use
a. Twisted pair / copper
b. Coaxial / copper
c. Fibre optic / twisted pair
d. Fibre optic / copper
13. Which wireless technology will be sensible to use
a. Radio / satellite
b. Microwave/infrared/radio
c. Satellite/microwave
d. Radio/satellite/microwave

EXAMINER: FERDINAND KATSRIKU (PHD) Page 3 of 20


14. Which of the following is not an advantage of using wireless technology
a. No drilling required
b. No need for infrastructure
c. No digging of tunnels
d. Not affected by weather
15. They could possibly use the services of PSTN. What does PSTN stand for?
a. Public Switched Telephone Network
b. Private Switched Telephone Network
c. Public Sales Telephone Network
d. Private Services Telephone Network
16. Which one of the following cables does not use copper?
a. Coaxial
b. Twisted pair
c. Unshielded twisted pair
d. Fibre
17. Which one of the following cables is typically not bundled?
a. Coaxial
b. Twisted pair
c. UTP
d. Fibre

A client server web application has been developed which uses a file containing the following
code. Use the code to answer questions 18-21

<!DOCTYPE html>
<html>
<body>
<h1> We can give you an estimate of how many you will need if you are tiling a floor with
our tiles.
You need to tell us the length and the width of the room
(in metres).</h1>
<script>
Var length = prompt (“enter the room length”, “ ”);
Var width = prompt (“enter the room width”, “ ”);
Var tilesSize = 0.25;
Var numberOfTiles = (length * width)/tileSize;
Alert (“the estimate for the number of tiles needed is “ + numberOfTiles);
</script>
</body>
</html>
18. The person who created this file is called
a. Server
b. Analyst
c. Developer
d. Creator
19. This file would be stored where?
a. Server
b. Cloud
c. Client computer
d. Network
20. The browser needed to run this application is stored where?
a. Cloud
b. Client PC
c. Server
d. Network

EXAMINER: FERDINAND KATSRIKU (PHD) Page 4 of 20


21. The JavaScript section of the file starts from where?
a. <!DOCTYPE html>
b. <html>
c. </script>
d. <script>
The following shows a sequence of actions (NOT in the correct order) performed when information is
requested from a web browser. Not all of the actions are required.
A The client computer processes the JavaScript code
B The page content is transmitted to the client Computer
C The page is displayed on the client computer
D The web server processes the JavaScript code
E User clicks on a hyperlink and the web page is requested from a web server
F The server finds the web page

Use the information above to answer questions 22 – 23

22. Which of the actions above is not required?


23. Which of the following is the correct sequence of actions?
a.

E F B A C

b.

D E F A B

c.

C F B A D

d.

E B F A C

Match the following device types to the definition given in the table

24 Floppy disk Magnetic storage with several platters, normally the


A built-in main secondary storage device but can be
attached as a peripheral, in which case it is portable
25 Hard disk Serial access medium used for backup in large computer
B
systems
26 CD Virtually obsolete, magnetic storage with one platter,
C
portable
27 Magnetic tape Optical storage, portable, may be read only (e.g. CD-
D
ROM) or re-writable, portable
28 DVD

EXAMINER: FERDINAND KATSRIKU (PHD) Page 5 of 20


The diagram below shows the architecture of a typical computer system. Use the diagram to answer
questions 29 – 32.

Main Memory

A B C

29. Which box represents the processor?


30. Which box represents secondary storage?
31. Which box represents output device?
32. Which box represents an input device?

The diagrams below (A-D) represent some logic gates . Questions 33 – 35 are based on these diagrams.
A
B

C
D

None of the above diagrams

33. Which diagram represents a NOT gate?


34. Which diagram represents a NAND gate?
35. Which diagram represents an AND gate?
36 Which diagram represents an OR gate?

Consider the following scenario and use it to answer the questions which follow (Q37 – 40):
A regular traveler travels by car if the travel is at the weekend. However, if the travel is on a
weekday the traveler takes a train unless the distance is greater than 200 miles. If the distance is
greater than 200 miles the traveler books a flight.

37. Which of the following is a logic proposition that may be used to describe the problem?
a. Travel at the weekend is by car
b. Travel at the weekday is by car

EXAMINER: FERDINAND KATSRIKU (PHD) Page 6 of 20


c. Travel at the weekend is not by car
d. All travel is by car

Individual problem statements can be extracted from this scenario and expressed using the
language of Boolean algebra. Each individual statement will contain a logic expression.
Complete the following using TRUE or FALSE where appropriate:
38. Car_travel = ________IF day = weekend
39. Train_travel = _______IF day = weekday AND distance ≤ 200
40. Air_travel = _________IF day = weekday AND distance > 200

Using the following representations for the outcomes


X = Car_travel
Y = Train_travel and
Z = Air_travel
Assigning A to represent weekday and B to represent distance ≤ 200
41. Which of the following is an expression representing Car_travel
a. X= A AND B
b. X= Not A
c. X= A AND NOT B
d. X = NOT A AND B
42. Which of the following is an expression representing Train_travel
a. Y= A AND B
b. Y= Not A
c. Y= A AND NOT B
d. Y = NOT A AND B
43. Which of the following is an expression representing Air_travel
a. Z= A AND B
b. Z= Not A
c. Z = A AND NOT B
d. Z = NOT A AND B

Questions 44 – 46 are based on the following:


A domestic water heating system has a hot water tank and a number of radiators. There is a
computerized management system which receives signals dependent on whether or not the
conditions for components are as they should be. The table below summarises the signals
received:
Signal Value Component
0 Water flow in the radiators is too low
A
1 Water flow in the radiators is within limits
0 Hot water temperature too high
B
1 Hot water temperature within limits
0 Water level in hot water tank too low
C
1 Water level in hot water tank within limits

44. Which of the following truth tables will represent the following fault condition. The
water level in the hot water tank is too low and the temperature in the hot water tank is too high.
The system must output a signal to switch off the system.

EXAMINER: FERDINAND KATSRIKU (PHD) Page 7 of 20


A B
Inputs Output Inputs Output
A B C F1 A B C F1
0 0 0 1 0 1 1 1
0 0 1 0 0 0 1 0
0 1 0 0 0 1 0 0
0 1 1 0 0 0 0 0
1 0 0 1 1 0 0 1
1 0 1 0 1 0 1 0
1 1 0 0 1 1 0 0
1 1 1 0 1 1 1 0

C D
Inputs Output Inputs Output
A B C F1 A B C F1
0 0 0 1 0 0 0 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 0 0
0 1 1 0 0 1 1 0
1 0 0 1 1 0 0 0
1 0 1 0 1 0 1 1
1 1 0 0 1 1 0 0
1 1 1 0 1 1 1 0

45. Which of the following truth tables will represent the following fault condition. The
water flow in the radiators is too low and the temperature in the hot water tank is too high. The
system must output a signal to switch off the system.
A B
Inputs Output Inputs Output
A B C F1 A B C F1
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 0
0 1 0 0 0 1 0 0
0 1 1 0 0 1 1 0
1 0 0 1 1 0 0 1
1 0 1 0 1 0 1 0
1 1 0 0 1 1 0 1
1 1 1 0 1 1 1 0

EXAMINER: FERDINAND KATSRIKU (PHD) Page 8 of 20


C D
Inputs Output Inputs Output
A B C F1 A B C F1
0 0 0 1 0 0 0 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 0 1
0 1 1 0 0 1 1 0
1 0 0 0 1 0 0 1
1 0 1 0 1 0 1 0
1 1 0 0 1 1 0 0
1 1 1 0 1 1 1 1

46. Which of the following circuits represent a fault condition where the hot water tank
temperature is within limits but the water flow in the radiators is too low and the water level in
the hot water tank is too low.
A B

C D

47. A register is a storage unit with limited capacity of just a few bytes. TRUE or FALSE?
48. A register is part of the processor (or microprocessor or CPU). TRUE or FALSE?
49. A register has a very short access time. TRUE or FALSE?
50. A register may be special purpose or general purpose. TRUE or FALSE?
51. An assembly language or machine code language program can access an individual
register. TRUE or FALSE
52. A fatal error in a program causes an INTERRUPT signal to be generated TRUE or
FALSE
53. A hardware fault causes an INTERRUPT signal to be generated TRUE or FALSE
54. A need for I/O processing to begin causes an INTERRUPT signal to be generated TRUE
or FALSE
55 User interaction causes an INTERRUPT signal to be generated TRUE or FALSE
56 A timer signal causes an INTERRUPT signal to be generated TRUE or FALSE

Given the following


LDD is the command for direct addressing, an address which holds the value to be used in the
instruction
LDI is for indirect addressing, an address which holds the address which holds the value to be
used in the instruction
INC increases the value of a specified register by 1
STO saves a value in a specified memory location

EXAMINER: FERDINAND KATSRIKU (PHD) Page 9 of 20


Trace the following assembly language program using a copy of the trace table provided.
Each question (57 – 64) relates to one step in the execution of the program. Which of the options
correctly represents the contents of the memory locations and the accumulator?

Assembly Language Program

Memory address Memory Content


100 LDD 201
101 INC ACC
102 STO 202
103 LDI 203
104 DEC ACC
105 STO 201
106 ADD 204
107 STO 201
108 END
.
.
201 10
202 0
203 204
204 5

Trace table
Memory Addresses
Question Accumulator
201 202 203 204
0 10 0 204 5
57 10 10 0 204 5
58 11 10 0 204 5
59 11 10 11 204 5
60 5 10 11 204 5
61 4 10 11 204 5
62 4 4 11 204 5
63 9 4 11 204 5
64 9 9 11 204 5

57. a.
Memory Addresses
Accumulator
201 202 203 204
0 0 11 204 5

b
Memory Addresses
Accumulator
201 202 203 204
10 0 10 204 5

EXAMINER: FERDINAND KATSRIKU (PHD) Page 10 of 20


c
Memory Addresses
Accumulator
201 202 203 204
10 10 0 204 5

d
Memory Addresses
Accumulator
201 202 203 204
0 10 10 204 5

58. a.
Memory Addresses
Accumulator
201 202 203 204
0 0 11 204 5

b
Memory Addresses
Accumulator
201 202 203 204
11 0 10 204 5

c
Memory Addresses
Accumulator
201 202 203 204
10 10 0 204 5

d
Memory Addresses
Accumulator
201 202 203 204
11 10 0 204 5

59. a.
Memory Addresses
Accumulator
201 202 203 204
11 10 11 204 5

b
Memory Addresses
Accumulator
201 202 203 204
10 0 10 204 5

c
Memory Addresses
Accumulator
201 202 203 204
10 10 0 204 5

EXAMINER: FERDINAND KATSRIKU (PHD) Page 11 of 20


d
Memory Addresses
Accumulator
201 202 203 204
0 10 10 204 5

60. a.
Memory Addresses
Accumulator
201 202 203 204
5 10 11 204 5

b
Memory Addresses
Accumulator
201 202 203 204
10 5 10 204 5

c
Memory Addresses
Accumulator
201 202 203 204
10 10 0 204 5

d
Memory Addresses
Accumulator
201 202 203 204
0 10 10 204 5

61. a.
Memory Addresses
Accumulator
201 202 203 204
4 0 11 204 5

b
Memory Addresses
Accumulator
201 202 203 204
4 10 11 204 5

c
Memory Addresses
Accumulator
201 202 203 204
10 10 0 204 5

d
Memory Addresses
Accumulator
201 202 203 204
4 10 10 204 5

EXAMINER: FERDINAND KATSRIKU (PHD) Page 12 of 20


62. a.
Memory Addresses
Accumulator
201 202 203 204
0 0 11 204 5

b
Memory Addresses
Accumulator
201 202 203 204
10 0 10 204 5

c
Memory Addresses
Accumulator
201 202 203 204
4 10 0 204 5

d
Memory Addresses
Accumulator
201 202 203 204
4 4 11 204 5

63. a.
Memory Addresses
Accumulator
201 202 203 204
0 0 11 204 5

b
Memory Addresses
Accumulator
201 202 203 204
10 0 10 204 5

c
Memory Addresses
Accumulator
201 202 203 204
10 10 0 204 5

d
Memory Addresses
Accumulator
201 202 203 204
9 4 11 204 5

64. a.
Memory Addresses
Accumulator
201 202 203 204
9 9 11 204 5

EXAMINER: FERDINAND KATSRIKU (PHD) Page 13 of 20


b
Memory Addresses
Accumulator
201 202 203 204
10 9 10 204 5

c
Memory Addresses
Accumulator
201 202 203 204
10 10 0 204 5

d
Memory Addresses
Accumulator
201 202 203 204
0 10 10 204 5

65. Which of the following is a user interface


a. Keyboard
b. Mouse
c. console mode
d. Pointer

66. Which of the following is a user interface


a. GUI
b. Mouse
c. Keyboard
d. Pointer
67. Which of the following are translation programs. There might be more than one correct
answer, identify all the correct answers.
a. Assembler
b. Java
c. Compiler
d. Interpreter

68. Which of the following are facilities you would expect a file management system to have.
There might be more than one correct answer, identify all the correct answers.
a. Delete a file
b. Copy a file
c. Save a File
d. All of the above
69. Which of the following are examples of utility programs associated with hard disk
usage in a PC. There might be more than one correct answer, identify all the correct answers.
a. Disk formatting
b. Partition creation
c. Disk recovery
d. None of the above

Chose a word from the list below to complete the sentences in questions 69 - 74
a. Living individual
b. securely
c. Integrity

EXAMINER: FERDINAND KATSRIKU (PHD) Page 14 of 20


d. Privacy
e. Up to date
f. Data controller in an organization
70. Data protection laws are primarily about data _____
71. The laws concern data which is about a ______
72. The data is held by a
73. Measures should be taken to ensure that the data has _____
74. One aspect of this is that the data must be ______
75. Measures should also be taken to ensure that the data is stored ____

Select a word from the list below to complete the sentences in questions 75 - 79
a. Attribute
b. relationship
c. Tuple
d. Table
e. Entity
76. _____something about which data is recorded, a customer, a product, a customer order
77. _____the implementation of the data for an object in relational database
78. _____the data for one row in the table
79. _____One of the data items for an object in relational database, customer name, address
80. _____this is the link between two tables

81. The basic three level concept of databases was developed by the American National
Standards Institute. Which of the following is not included in the three level model?
a. Physical level
b. internal level
c. external level
d. conceptual level

A company provides catering services for clients who need special occasion celebratory dinners.
For each dinner, a number of dishes are to be offered. The dinner will be held at a venue. The
company will provide staff to serve the meals at the venue. The company needs a database to
data related to this business activity.
Use the above scenario to answer questions 81 – 83
82. which of the following is not an entity in the above.
a. Dish
b. Venue
c. Date
d. Client
83. Which of the following have direct relationship
a. Dish and dinner
b. date and Venue
c. Dinner and Venue
d. Dinner and Staff
84. What is the relationship between Dinner and Client?
a. 1:1
b. M:M
c. M:1
d. 1:M

The simplest way to sort an unordered list of values is the following method.

EXAMINER: FERDINAND KATSRIKU (PHD) Page 15 of 20


Step1. Compare the first and second values. If the first value is larger than the second
value, swap them.
Step2. Compare the second and third values If the second value is larger than the third
value, swap them.
Step3. Compare the third and fourth values If the third value is larger than the value,
swap them.
Step4. Keep on comparing adjacent values, swapping them if necessary, until the last two
values in the list have been processed.
Step5. Repeat the above steps as many times as necessary.

Initial array:
25
34
98
7
41
19
5

Using the above algorithm to answer questions 84 – 90


85. The algorithm described above is known as ___________
a. Quicksort b. Insertion sort c. Selection sort d. Bubble sort

86. complete the following sentence with the correct word:


When we have completed the first pass through the entire array, the __________ is in
the correct position.
a. Smallest value b. Middle value c. Largest value d. No value

A B C D
25 7 25 7
34 19 7 25
7 5 34 19
41 25 19 5
19 34 5 34
5 41 41 41
98 98 98 98

Which of the above options correctly depicts the state of the array after each of the following:
87. The first pass
88. The second pass
89. The third pass
90. The fourth pass
91. How many passes are required for the array to be fully ordered?
a. 5 b. 7 c. 8 d. 6

In the following questions, (91 – 94) choose the correct word to match the definition given
a. Sequence b. Assignment c. Selection d. Iteration

92. Setting an identifier to a data value is known as ________


EXAMINER: FERDINAND KATSRIKU (PHD) Page 16 of 20
93. The order of steps which make up the design of an algorithm is called ________
94. Steps that are repeated is known as _________
95. The process of decision making is called _________

A program calculates the interest earned on GHc100. The value of investment increases by 20%
each year. Stop the process when the amount reaches GHc150. Draw up a trace table to complete
the execution of this algorithm:

01 YearNumber  1
02 Amount  100
03 Amount  Amount * 1.20
04 If Amount >= 150
05 THEN
06 OUTPUT YearNumber
07 STOP
08 ELSE
09 YearNumber  YearNumber +1
10 GOTO Step 03
11 ENDIF

YearNumber Amount OUTPUT

Use your trace table to answer the following questions.


96. What will be in the OUTPUT column in YearNumber 1?
a. 100 b. 120 c. blank d. 1
97. In what YearNumber will the amount be equal to 120?
a. 1 b. 2 c. 3 d. 4
98. What will the amount be equal to when the program terminates?
a. 100 b. 172.80 c. 120 d. 144
99. What will be in the OUTPUT column when the program terminates?
a. 1 b. 2 c. 3 d. 4
100. How many times will the code be executed before it terminates?
a. 1 b. 2 c. 3 d. 4 e. 5 f. 6

EXAMINER: FERDINAND KATSRIKU (PHD) Page 17 of 20

You might also like