0% found this document useful (0 votes)
63 views5 pages

CS Unit 1 EoT Exam Solutions

1. The document contains an end-of-term exam for a Computer Science Unit 1 course. 2. The exam consists of two sections - a multiple choice (MCQ) section and a written problems section. 3. The MCQ section contains 10 questions testing topics like data representation, storage devices, logic gates, and programming concepts. 4. The written problems section asks students to draw logic gate symbols and truth tables, perform binary conversions, describe stages of the problem-solving process, and draw a flowchart representing an algorithm.

Uploaded by

Kaif Ali
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)
63 views5 pages

CS Unit 1 EoT Exam Solutions

1. The document contains an end-of-term exam for a Computer Science Unit 1 course. 2. The exam consists of two sections - a multiple choice (MCQ) section and a written problems section. 3. The MCQ section contains 10 questions testing topics like data representation, storage devices, logic gates, and programming concepts. 4. The written problems section asks students to draw logic gate symbols and truth tables, perform binary conversions, describe stages of the problem-solving process, and draw a flowchart representing an algorithm.

Uploaded by

Kaif Ali
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/ 5

Computer Science Unit 1

End-of-Term Exam Questions


Section I – MCQs (10 mks)
1. What is the LARGEST integer that can be represented in a 4-bit signed magnitude?
a. -3
b. +7
c. +8
d. +15
2. Which of the following is NOT an advantage of storage devices over memory?
a. Greater response time
b. Larger storage capacity
c. Less volatility
d. Ability to remove the storage device from the machine for archival purposes
3. Which of the following BEST defines the term ‘clock speed’?
a. The number of clock cycles which occur in a nanosecond
b. The speed at which the microprocessor executes instructions
c. The speed at which the microprocessor transfers data from secondary storage
to primary memory
d. The number of bits transferred across a medium in a second
4. The range of instructions that a computer can execute is known as the
a. Instruction set
b. Instruction size
c. Executable
d. Word size
5. Which of the following CANNOT be accurately represented using 4-bit two’s
complement notation?
a. -8
b. -7
c. 7
d. 8
6. Which of the following statements may replace the symbol P?
a. Read x
b. Is x < 0?
c. x = 2 * x
d. 5 * y
7. The statement: while(mark not equal -1) is an example of:
a. Assignment
b. Unbounded iteration
c. Output
d. Bounded iteration
8. The statement for j = 1 to 501 is an example of:
a. Assignment
b. Unbounded iteration
c. Output
d. Bounded iteration
9. Which of the following ways of specifying an algorithm uses standard graphical
symbols?
a. Narrative
b. Flowchart
c. Pseudocode
d. Program
10. A programming language that models real world entities with attributes and
behaviours is:
a. Procedural
b. Functional
c. Object-Oriented
d. Scripting

Section II – Written Problems


1. The functionality of simple logic gates can be combined to implement more complex
operations
a. Draw the symbols for EACH of the THREE basic logic gates [3mks]

(.5 for drawing, .5 for name)

NOT

OR

AND
b. Draw the associated truth tables for EACH of the THREE basic logic gates [3
mks]

NOT OR AND

X Y OUT X Y OUT

0 0 0 0 0 0
0 1 1 0 1 0
1 0 1 1 0 0
1 1 1 1 1 1

(1mk per correct table, -1 from total if not labelled)

c. Draw the truth table that shows the output from a circuit that performs the
function NOT (X AND Y). [2mks]

(1mk for correct X AND Y,


1mk for correct ~(X AND Y))
X Y X AND Y ~(X AND Y)

0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0

2. State the range of integers with 8-bits, using sign magnitude representation [2mks]
1111 1111 - 0111 1111 (1mk for each correct value)
3. The binary sequence 01111110 equates to the decimal value 126, using two’s
complement.
a. Show the steps involved in determining that the 8-bit two’s complement
representation of the value -126 in binary sequence is 10000010 [2mks]

(1mk each for correct last steps)


Start: 01111110
Invert/flip the bits: 10000001

Add 1: 10000001
+ 1
= 10000010

b. Write the decimal value that is represented by the sequence 10110101, if it


stores a floating point number with a 1-bit sign, a 4-bit mantissa and a 3-bit
exponent. Show ALL working. [5mks]

exp = 011 -> 3

0101 -> 10.1 = 2.5

First bit is 1, therefore negative

ans = -2.5

(1mk for each relevant step, full mks for adequate solution)

4. Flip-flops and Registers are commonly used in computer systems


a. State the meaning of the term ‘flip flop’ [1mk]
A circuit/bistable device capable of storing 1 bit of data

b. The logic circuit below represents a system of three switches A, B and C. The
combination of switches illustrated determines whether a bell, X, sounds.

Construct the truth table for the circuit shown. [4mks]

(1mk for each correct C, D, E and X columns)


5. Briefly describe THREE stages in the problem-solving process [6mks]
(2mks each for any three points)

Define the problem - short statement outlining the problem

Analyse the problem - find data/info about the problem


Identify possible solutions - Ideate numerous possible ways to solve the problem

Select - choose the best solution that addresses the problem most effectively

Implement - Turn solution into an algorithm and then a working program

Review - Evaluate whether the solution addresses the problem successfully


and adjust if necessary

6. Draw a flowchart to represent the following algorithm [12mks]

You might also like