You are on page 1of 3

Numerical Methods & Logic

Sample Test

Page 1 of 3

INSTRUCTION:

Answer ALL the questions


QUESTION 1 (30 Marks)
(a)

Convert 27.2510 into two equivalent numbers in binary and octal.

(b)

Covert 351.12510 into hexadecimal.

(c)

Find the value of X and Y in the equation below.


46.38 + 5.78 = X8 = Y10

[5 marks]
[3 marks]

(d)

(e)

[5 marks]
Using twos complement in 8-bit register, show how the computer would
evaluate
(A) 18 11
[3 marks]
(B)
-11 18
[3 marks]
(ii)
Verify the answer in part (d)(i)(B) by using twos complement.
[2 marks]
What is the value represented in single-precision format below if the bias is 127?
(i)

0
1000 0001
001 0000 0000 0000 0000 0000
s
E B
1.0 1 M 2.0
(Hint:
)
[4 marks]
(f)

Perform the following addition in BCD8421.


290 + 36
[5 marks]

QUESTION 2 (15 Marks)


(a)

Suppose the X and Y below are some data collected and it will be rounded before used.
X = 10.4054 and Y = 8.0881
(i)
What is the absolute error if X rounded up to 3 significant figures?
[3 marks]
(ii)
What is the relative error if Y rounded down to 2 decimal places?
[4 marks]
(iii)
Compute the absolute error for the sum of X and 2Y after the rounding made in
part (i) and (ii).
[4 marks]
(b)
If the absolute error of Z is 0.006, what are the possible used values of the Z? Given
the true value of Z is 27.1202.
[4 marks]

Diploma Part II

Asia Pacific University of Technology & Innovation

Numerical Methods & Logic

Sample Test

Page 2 of 3

QUESTION 3 (25 Marks)


(a)
Given

Let Z as the set of integers, where Z = {, -2, -1, 0, 1, 2, }.


A x : x Z , 7 x 2

B x : x Z , x 2 20

C x : x Z , x is even, 3 x 12

(i)

List the elements of sets A, B and C.


[5 marks]

(ii)

List the elements of each of the following sets by using set braces.
B A
(A)

(B)

A B C

[2 marks]

[3 marks]
(b)

Given two sets as below


E = {0, -1, f}
F = {m, n, o, p, q}
(i)
Find the power set of E, P(E).
[3 marks]
(ii)

Find the cardinality of the power set of F, |P(F)|.

[2 marks]
Find the cardinality of the Cartesian Product of E and F, |E F| by using
multiplication principle.
[2 marks]
Suppose R is the relation from set A to set B consisting the ordered pairs (a, b) such
that a b is positive even number where
A = {1, 2, 4, 8}
B = {0, 1, 2, 6}
(i)
List the elements of R.
[3 marks]
(ii)
Give the pictorial representation of R.
[3 marks]
(iii)
State true of false for the followings.
(A)
6R8
(B)
8R2
[2 marks]
(iii)

(c)

QUESTION 4 (15 Marks)


(a)

How many different arrangements can be made from the words below?
(i)
QUESTION
[2 marks]
(ii)

(b)

CANDIDATES

[4 marks]
Eight horses are entered in a race in which a first, second, and third prize will be
awarded. Assuming no ties, how many different outcomes are possible?

Diploma Part II

Asia Pacific University of Technology & Innovation

Numerical Methods & Logic

Sample Test

Page 3 of 3

[3 marks]

(c)

A student must answer exactly eight questions out of ten on a final examination.
(i)
In how many ways can she choose the questions to answer?
[3 marks]
(ii)
In how many ways can she choose the questions to answer if she must answer
the first three questions?
[3 marks]

QUESTION 5 (15 Marks)


(a)

(b)

Suppose that a certain mathematics class contains 26 students. Out of these, 14 are
economic majors, 15 are first year students, and 10 are economic majors and first year
students. Suppose that a person is selected at random from the class.
(i)
Draw a Venn diagram for the class above.
[4 marks]
(ii)
What is the probability that the person is both an economics major and first
year student?
[2 marks]
(iii)
What is the probability that the person is economics major but not a first year
student?
[2 marks]
(iv)
What is the probability that the person is an economics major or a first year
student?
[2 marks]
When three coins are flipped, what is the probability that
(i)
there will be exactly three heads?
[2 marks]
(ii)
one tail and two heads?
[3 marks]

Diploma Part II

Asia Pacific University of Technology & Innovation

You might also like