UNIVERSITY OF GHANA
III1
~•
B.A/BSc SECOND SEMESTER UNIVERSITY EXAMINATIONS:
2013/2014
DEPARTMENT OF COMPUTER SCIENCE
CSCD 102/COMP 102: INTRODUTION TO
COMPUTER SCIENCE II (3 CREDITS)
EXAMINER: J.K. ECKLU
TIME ALLOW,ED: TWO AND HALF ( 2 ~ ) HOURS
INSTRUCTIONS
Answer all questions in this section. Provide your answer to each question by circling (
on the question paper) the letter of the correct answer in the options given. Each
question carries 1 mark.
Section A [75 Marks]
At. A machine language is a programming language in which the instructions are in the
fonn ......... .
a. of hexadecimal code.
b. that allows the computer to perform them electronically with further translation being
required.
c. that allows the computer to perform them immediately without any further translation
being required.
d. that allows the computer to perform them immediately with further translation being
required.
A2. The name of the set of machine instructions that a computer processor can only perform I
IS
a. operating system.
b. instruction set.
c. BIOS.
d. POST.
A3. The following are some of the features of Operating System's kernel, EXCEPT:
a. It remains in main memory permanently during the running of the computer
b. It can control the running of all programs
c. It must remain on a serial-access storage device during the running of the computer
d. It can call non-kernel programs which form part of the operating system
A4. RISC is an example of a microcomputer's:
a. BIOS
b. Operating System
c. Instruction Set
d. PROM
AS. In the multi-layered computer system architecture, clse are used at:
a. Digital Logic layer
b. Machine layer
c. Microprogrammed layer
d. Operating system layer
CSCD1D2 -INTRODUCTION TO COMPUTER SCIENCE /I Page 1 of 16
A6. In the multi-layered computer architecture, the layer that controls the way in which all
software use the underlying hardware is
a. Digital logic layer
b. Machine layer
c. Operating system layer
d. High Order Software layer
A 7. In the multi-layered computer architecture, this layer handles all programs in
languages other than machine language:
a. Digital logic layer
b. Machine layer
c. Operating system layer
d. High Order Software layer
AS. In the multi-layered computer architecture, this layer is a Virtual Machine to the
Application layer:
a. Digital logic layer
b. Machine layer
c. Operating system layer
d. High Order Software layer
A9. The name of the UNIX command interpreter is:
a. Shell
h. cmd.exe
c. Jscript
d. PowerShell
AIO. The name of the DOS command interpreter is:
a. Shell
h. cmd.exe
c. Jscript
d. PowerShell
CSCD102 -INTRODUCTION TO COMPUTER SCIENCE /I Page 2 of 16
All. The large amount of software provided by the computer manufacturer that contributes to I
the control and performance of the computer system is collectively called:
a. Operating System
b. System Software
c. Utilities
d. Applications Software
A12. A microcomputer's processor consist mainly of
a. the Arithmetic Logic Unit and the Bus.
b. the main memory and the Arithmetic Logic Unit.
c. the Control Unit, the Arithmetic Logic Unit and main memory.
d. the Control Unit and the Arithmetic Logic Unit.
AB. All data and instructions pass in and out of the processor through
a. Memory Buffer Register
b. Memory Data Register
c. Memory Address Register
d. Instruction Register
A14. For the main memory to save or retrieve data, it must receive
a. control signals from the processor via the Memory Data Register.
b. control signals from the processor via the Memory Address Register.
c. control signals from the processor via the Control Bus.
d. control signals from the memory via the Control Bus.
AlS. The exact source or destination of data to be transferred between the processor and the
main memory is a location address found in
a. Memory Buffer Register.
b. Memory Data Register.
c. Memory Address Register.
d. Instruction Register.
C5CD102 -INTRODUCTION TO COMPUTER SCIENCE /I Page 3 of 16
A16. An instruction that is about to be decoded and perfonned by the processor is in the
a. Memory Buffer Register.
b. Memory Data Register.
c. Memory Address Register.
d. Instruction Register.
A17. The name of Programs held in Read Only Memory is
a. Firmware.
b. Read Only Memory.
c. Programmable Read Only Memory.
d. Erasable Programmable Read Only Memory.
A18. The device that converts group of signals of one set into one signal of another set is called:
a. Encoder
b. Multiplexer
c. Latch
d. Decoder
AI9 ........ is a pictorial representation of an algorithm.
a. A flowchart
b. A program
c. Pseudocode
d. An algorithm
A20.The only language understood by computer hardware is a ......... .... language.
a. Machine
b. Symbolic
c. High-level
d. Natural
A21.A compiler and an interpreter are both
a. Translators
b. High-Ievellanguages
c. Low-Ievellanguages
d. Assemblers
CSCD102 - INTRODUCTION TO COMPUTER SCIENCE /I Page 4 of 16
A22 ........... . is a program' s code in machine language.
a. Microcode
b. An object program
c. A source program
d. None of the above
A23 .... ..... translates the whole source program into the object program.
a. Interpreter
b. Microcode
c. Operating system
d. compiler
A24. The .... .... DOS command organises a disk surface into tracks and sectors
a. deltree
b. format
c. tree
d. chkdisk
A2S. The collection of devices referred to as I/O subsystem allows a computer to do all of the
following except which one
a. Communicate with the outside world
b. Store programs and data when the power is off
c. Carries communication between the CPU and memory
d. Do encoding and decoding
A26. A data bus of word size 4 bytes will need ............. wires/connections
a. 32
b. 4
c. 16
d. 4294967296
A27. The function of this device is to convert character symbol to internal ASCII bit patterns:
a. Encoder
b. Multiplexer
c. Latch
d. Decoder
CSCD1D2 -INTRODUCTION TO COMPUTER SCIENCE /I Page 5 of 16
A2S. Data in the form of images, sound or video in a digital computer are described as
a. Broad-based fonn of data
b. Character set fonn of data
c. Non-character set fonn of data
d. Narrow-based fonn of data
A29. A main memory has 2 16 words, the address bus needs to carry...... bits at a time.
a. 65536
b. 16
c. 2
d. 8192
A30. A main memory has 2 16 words, the address space is ......... words.
a. 65536
b. 16
c. 2
d. 8192
A31. The total number of control commands/operations needed by a computer is 128. The
number of bits needed to define this number of control command is
a. 128
b. 64
c. 8
d. 7
A32.1nterrupt request channels, or hardware interrupts, are used by various hardware devices
a. to signal the motherboard that a request must be fulfilled.
b. to signal the main memory that a request must be fulfilled
c. to signal the buffer that a request must be fulfilled.
d. to stop the memory from carrying out any further instructions.
A33 . ............... .. is a step-by-step method for solving a problem or doing a task
a. A construct
b. A recursion
c. An iteration
d. An algorithm
CSCD1D2 - INTRODUCTION TO COMPUTER SCIENCE /I Page 6 of 16
81
A34. There are ............. bytes in 32 Terabytes
a. 216
b. 240
c. 245
d. 256
A35 .......... can be programmed and erased using electronic impulses but can remain in a
computer during erasure.
a. EEPROM
b. EPROM
c. PROM
d. ROM
A36 . ..... .... is a type of memory in which the user, not the manufacturer, stores programs that
cannot be overwritten.
a. EEPROM
b. EPROM
c. PROM
d. ROM
A37. The ....... is a computer subsystem that performs operations on data.
a. CPU
b. Memory
c. 110 hardware
d. None of the above
A38....... ... .. is a memory type with capacitors that need to be refreshed periodically.
a. SRAM
b. DRAM
c. ROM
d. All of the above
A39. If the memory address space is 16MB and the word size is 8 bits, then ...... bits are needed
to access each word.
a. 8
b. 16
c. 24
d. 34
CSCD102 -INTRODUCTION TO COMPUTER SCiENCE /I Page 7 of 16
A40. The data in .......... is erased if the computer is powered down.
a. RAM
b. ROM
c. pen drive
d. CD-ROM
A41........... is a stand-alone storage location that holds data temporarily.
a. AnALU
b. A register
c. A control unit
d. A USB drive
A42. A word of memory is ......... bits.
a. 8
b. 16
c. 32
d. Any of the above
A43. A register in a CPU can hold
a. Data
b. Instructions
c. Program counter values
d. All of the above
A44. A computer has 64MB (megabytes) of memory. Each word is 4 bytes. How many bits are
needed to address each single word in memory?
a. 24
b. 26
c. 64
d. 256
A45. The first node in an inverted tree file system is
a. branch
b. root
c. subfolder
d. file
I CSC0102 -INTRODUCTION TO COMPUTER SCIENCE /I Page 8 of 16
g~
A46. A memory with 64 kilobytes and a word size of 1 byte has an address space that ranges
from
a. 0 to 64
b. 1 to 64
c. 0 to 65535
d. 1 to 65536
A47. The slowest memory is ........ .
a. CPU register
b. Main memory
c. Ll Cache
d. L2 Cache
A48. Memory locations numbered 4016 to FDI6 are used for storing data. The number of
locations (in base 10) in the range used is .... ..
a. 189
b. 190
c. 206
d. 207
A49. A machine cycle is made of a sequence of three phases in the order ...
a. Code / fetch / decode
b. Fetch! decode / execute
c. Fetch / code / decode
d. Fetch / execute / decode
A50 to A51..Refer
1 0 0 1 1 0 0 1 Input 1
0 0 1 0 1 1 1 0 Input 2
Output
A50. The solution of a X OR operator on the bit patterns Input 1 and Input 2 will be
a. 10 1 1 1 1 1 1
b. 0000 1 000
c. 0 100 1 000
d. 10 1 10 1 1 1
CSCD102 -INTRODUCTION TO COMPUTER SCIENCE 1/ Page 9 of 16
<if'f
AS1. The solution of a AND operator on the bit patterns Input 1 and Input 2 will be
a. 1 0 1 1 1 1 1 1
b. 0000 1 000
c. 0 1 001 000
d. 1 0 1 1 0 1 1 I
A52. One megabyte of data can be expressed in the form .. ......... bytes
a. 210
b. 220
c. 230
d. 240
AS3. Extended ASCII uses ....... bits
a. 7
b. 8
c. 16
d. 32
AS4. Which of the following is equivalent to 24 in decimal?
a. (11 000 )2
b. (1 A )16
c. (3 1 )8
d. None of the above
ASS. Which of the following representations is erroneous?
a. (10 111)2
b. (348)8
c. (3AB)16
d. 256
AS6. The smallest unit of data that can be stored in a computer and has value of 0 or 1 is
a. nibble
b. bit
c. byte
d. integer
CSCD102 -INTRODUCTION TO COMPUTER SCIENCE /I Page 10 of 16
AS7. A transistor acts as a .......... .. in an electronic circuit
a. Signal detector
b. Multiplexer
c. Switch
d. Amplifier
ASS. In a set of 64 symbols, each symbol requires a bit pattern length of ......... bits.
a. 4
b. 5
c. 6
d. 7
A59. How many symbols can be represented by a bit pattern with ten bits?
a. 128
b. 256
c. 512
d. 1024
A60. If the ASCII code for E is 1 0 0 0 1 0 1, then the ASCII code for e is .... ".
a. 1000110
b. 1000111
c. 0000110
d. 1100101
A61. A 32-bit code called " ........... represents symbols in all languages.
a. ANSI
b. Unicode
c. EBCDIC
d. Extended ASCII
A62. The ........ manager of WINDOWS XP OS is responsible for access to va devies.
a. memory
b. process
c. device
d. file
CSCD102 -INTRODUCTION TO COMPUTER SCIENCE /I Page 11 of 16
S"b
A63. The ...... .. manager of WINDOWS XP OS is responsible for archiving and backup.
I
a. memory
b. process
c. device
d. file
A64. A nanosecond is defined as ....... of a second
a. 1/1 ,000
b. 1 / 1,000,000
c. 1 / 1,000,000,000
d. 1 / 1,000,000,000,000
A65. A processor speed is expressed in ....... .
a. Amplitude per second
b. Cycles per second
c. Rounds per second
d. None of the above
A66. Cache memory is an example of ..... .
a. DRAM
b. SRAM
c. RAM
d. ROM
A67. SDRAM is an example of ............ .
a. register
b. cache
c. buffer
d. main memory
A68. The command layer is the .... ...... interface to the OS
a. user
b. application
c. hardware
d. None of the above
~---------------------------------------------------------------------------
,
CSCD102 - INTRODUCTION TO COMPUTER SCIENCE /I Page 12 of 16
A69. The OS layer that interfaces the bare hardware directly is ...... ... .
a. application
b. command
c. kernel
d. service
A70. During POST, the system halts without displaying any message, then the .... is faulty.
a. keyboard
b. Processor
c. Video Card
d. RAM memory
e. Interrupt Controller
A 71. During POST, system gives a long beep followed by two short beeps, then the .. . is faulty. I
a. keyboard
b. Processor
c. Video Card
d. RAM memory
e. Interrupt Controller
A 72 ...... is not contained in the motherboard ROM.
a. BIOS
b. Bootstrap loader
c. POST
d. Translator
A 73 ... ... .. .. is an example of firmware.
a. Compiler
b. CMOS
c. Interpreter
d. Translator
A74.. .......... . is a menu driven application that allows the user to set System Configuration
parameter options, security settings and preferences.
a. BOOTSTRAP LOADER
b. BIOS
c. CMOS
d. POST
CSCD102 -INTRODUCTION TO COMPUTER SCIENCE /I Page 13 of 16
gZ
A 75........... is a series of device driver programs designed to present standard interface to the
basic system hardware
a. BOOTSTRAP LOADER
b. BIOS
c. CMOS
d. POST
Section B 25 Marks
Answer this question in the Answer booklet provided.
Bl. To solve a series of systems of equations in two unknowns of the form:
Ax + By =C
Ox + Ey = F
The input will be the values of A, B, C, D, E, and F, the output will be x and y
When input values of both A and B equal to zero this will indicate the end of the data for the
program.
To find the solutions we will use: Cramer's Rule for determinants which states that
C B
F E
x =
A B
D E
and
y =
I~ il
I~ ~I
The output of the program will be the values of x and y if they exist.
,......
CSCD102 - INTRODUCTION TO COMPUTER SCIENCE /I Page 14 of 16
Otherwise, the system will be labelled
dependent or inconsistent
The system is dependent if the numerator and denominator detenninants are both zero.
The system is inconsistent if only the denominator detenninant is zero.
Also
the numerator determinant for x solution is given by
(C multiplied by E) - (B multiplied by F)
the numerator determinant for y solution is given by
(A multiplied by F) - (C multiplied by D)
the denominator determinant is given by
(A multiplied by E) - (B multiplied by D)
Required:
a. Design the Algorithm to implement the logic of Cramer's Rule for detenninants. The
algorithm must accept the inputs, do the processing and detennine whether the solution
x and y exist, or it is dependent or inconsistent. ( 15 marks)
b. Design a flowchart to implement the Algorithm in (a.) ( 10 mark)
CSCD102 -INTRODUCTION TO COMPUTER SCIENCE II Page 15 of 16