C1003 Mathematics for Computing Term 3 2007 Assignment
Hi! This is my third post about my International Diploma in Computing assignment. Now I going to post about my C1003 Mathematics for Computing module. I do this module in Term 3 2007 (August – December 2007).
So, lets begin..!!
SECTION A
A1
a) Perform the following base conversions, showing all workings.
i) 3345 Hexadecimal to Denary
|
3 |
|
3 |
|
4 |
|
5 |
|
|
|
X |
|
X |
|
X |
|
X |
|
|
|
163 |
|
162 |
|
161 |
|
160 |
|
|
|
1228 |
+ |
768 |
+ |
64 |
+ |
5 |
= |
13125 |
334516 = 1312510
ii) 5714 Octal to Hexadecimal
First step: Octal to Binary
|
5 |
7 |
1 |
4 |
|
▼ |
▼ |
▼ |
▼ |
|
101 |
111 |
001 |
100 |
57148 = 1011 1100 11002
Second step: Binary to Hexadecimal
|
1011 |
1100 |
1100 |
|
▼ |
▼ |
▼ |
|
B |
C |
C |
1011 1100 11002 = BCC16
57148 = BCC16
iii) 5971 Denary to Binary
|
2 |
5971 |
|
|
|||
|
2 |
2985 |
► |
1 |
|||
|
2 |
1492 |
► |
1 |
|||
|
2 |
746 |
► |
0 |
|||
|
2 |
373 |
► |
0 |
|||
|
2 |
186 |
► |
1 |
|||
|
2 |
93 |
► |
0 |
|||
|
2 |
46 |
► |
1 |
|||
|
2 |
23 |
► |
0 |
|||
|
2 |
11 |
► |
1 |
|||
|
2 |
5 |
► |
1 |
|||
|
2 |
2 |
► |
1 |
|||
|
|
1 |
► |
0 |
|||
597110 = 1 0111 0101 00112
b) Evaluate F9D 16 + 56A 16, showing your working.
|
|
1 |
1 |
|
|
|
F |
9 |
D |
|
|
5 + |
6 + |
A + |
| 21 | 16 |
23 |
|
|
|
16 + |
16 - |
16 + |
|
1 |
5 |
0 |
7 |
F9D16 + 56A 16 = 150716
A2
For each of the following statement, select one correct answer from those given.
a) A(n) truncation error occurs when the least significant digits from a number are discarded.
i) overflow
ii) truncation
iii) transposition
b) Errors that exist by themselves in the measurement scale is known as inherent errors.
i) inherent
ii) induced
iii) propagation
c) Absolute error is the difference between the true value and the reported value.
i) absolute
ii) relative
iii) transcription
d) Error bound is the difference between the minimum and maximum possible reported value.
i) absolute error
ii) induced error
iii) error bound
A3 State which word from the list below would be most suitable in the place of each of the letters (a) to (f) in the text. (You may, if you wish, use a word more than once, but you do not have to use them all.)
| Truncation | Iteration | Serial | overflow |
| Sequential | Unconditional | Offset | data transmission |
| Conditional | Direct | Base | data transfer |
| Arithmetic | Indexed | control transfer | indirect |
(a)Direct addressing gives the address of the operand to be used, whereas (b)indirect addressing is where the instruction word gives the address of the address of the operand. Besides, the two addressing techniques, another kind of addressing techniques is known as (c)Indexed addressing. There are several types of machine instruction, which include (d)Arithmetic, string and (e)control transfer. In addition, (f)data transfer instructions move data and addresses between registers and memory locations or I/O ports.
A4 An 8 bit register stores numbers in binary form. Using the following bit patterns:
A = 11010110 B = 10011010
Write your answer as bit patterns:
i)
X = A’.B
|
A |
B |
A’ |
A’. B |
|
1 |
1 |
0 |
0 |
|
1 |
0 |
0 |
0 |
|
0 |
0 |
1 |
0 |
|
1 |
1 |
0 |
0 |
|
0 |
1 |
1 |
1 |
|
1 |
0 |
0 |
0 |
|
1 |
1 |
0 |
0 |
|
0 |
0 |
1 |
0 |
X = A’.B= 00001000
ii)

X = A’.B’
|
A |
B |
A’ |
B’ |
A’.B’ |
|
1 |
1 |
0 |
0 |
0 |
|
1 |
0 |
0 |
1 |
0 |
|
0 |
0 |
1 |
1 |
1 |
|
1 |
1 |
0 |
0 |
0 |
|
0 |
1 |
1 |
0 |
0 |
|
1 |
0 |
0 |
1 |
0 |
|
1 |
1 |
0 |
0 |
0 |
|
0 |
0 |
1 |
1 |
1 |
X = A’.B’ = 00100001
iii)

X = A + B’
|
A |
B |
B’ |
A + B’ |
|
1 |
1 |
0 |
1 |
|
1 |
0 |
1 |
1 |
|
0 |
0 |
1 |
1 |
|
1 |
1 |
0 |
1 |
|
0 |
1 |
0 |
0 |
|
1 |
0 |
1 |
1 |
|
1 |
1 |
0 |
1 |
|
0 |
0 |
1 |
1 |
X = A + B’ = 11110111
A5
Suppose that the universal set U is given by
U = {a, b, c, d, e, f, g} and that the sets P and Q are defined by
P = {a, c, e}, Q = {b, c, d, e}.
a) Calculate :
i) n(P Ç Q)
P = {a, c, e}, Q = {b, c, d, e}, U = {a, b, c, d, e, f, g}
P Ç Q = {c, e}
n(P Ç Q) = 2
ii) n(P’ È Q)
P = {a, c, e}, Q = {b, c, d, e}, U = {a, b, c, d, e, f, g}
P’= {b, d, f, g}
P’ È Q = {b, c, d, e, f, g}
n(P’ È Q) = 6
b) List the elements of the following sets :
i) (P È Q)’
P = {a, c, e}, Q = {b, c, d, e}, U = {a, b, c, d, e, f, g}
P È Q = {a, b, c, d, e}
(P È Q)’ = {f, g}
ii) P’ Ç Q
P = {a, c, e}, Q = {b, c, d, e}, U = {a, b, c, d, e, f, g}
P’= {b, d, f, g}
P’ Ç Q = {b, d}
A6
Suppose that numbers are to be held in an 8-bit computer using two’s complement form.
a) Show how -56 would be evaluated by the computer.
i) Convert -56 to binary
-56 = – 0111000
ii) Insert it to 8-bit register
00111000
▼
11000111
00000001+
11001000
So, -56 will be stored as 11001000
b) Convert 10011010 to denary from stored using the above format.
10011010
00000001-
10011001
▼
01100110
|
0 |
|
1 |
|
1 |
|
0 |
|
0 |
|
1 |
|
1 |
|
0 |
|
|
|
X |
|
X |
|
X |
|
X |
|
X |
|
X |
|
X |
|
X |
|
|
|
27 |
|
26 |
|
25 |
|
24 |
|
23 |
|
22 |
|
21 |
|
20 |
|
|
|
0 |
+ |
64 |
+ |
32 |
+ |
0 |
+ |
0 |
+ |
4 |
+ |
2 |
+ |
0 |
= |
102 |
So, the original number is -10210
SECTION B
Answer ALL questions in this section.
B1
a) A binary tree is represented in a computer by the following table:
| Node | Content | Left Pointer | Right Pointer |
| 1 | Heather |
2 |
3 |
| 2 | Coriander |
5 |
-1 |
| 3 | Olive |
4 |
6 |
| 4 | Magnolia |
-1 |
-1 |
| 5 | Clytia |
7 |
-1 |
| 6 | Rosette |
-1 |
8 |
| 7 | Blossom |
-1 |
-1 |
| 8 | Suzette |
-1 |
-1 |
i) Draw a binary tree which this table represents.

ii) Construct a table to show the back and trace pointer, to represent the binary tree below.

|
Node |
Content |
Back Pointer |
Trace Pointer |
|
Guava |
-1 |
6 |
|
|
2 |
Blue berry |
1 |
4 |
|
3 |
Watermelon |
1 |
-1 |
|
4 |
Citrus |
2 |
1 |
|
5 |
Avocado |
2 |
2 |
|
6 |
Pear |
3 |
7 |
|
7 |
Rumbutan |
6 |
3 |
b) From the tree in part(a)(ii) above, state the order in which the nodes would be visited if they were traversed in :
i) Preorder
Guava(1), Blue berry(2), Avocado(5), Citrus(4), Watermelon(3), Pear(6), Rumbutan(7)
ii) Inorder
Avocado(5), Blue berry(2), Citrus(4), Guava(1), Pear(6), Rumbutan(7), Watermelon(3)
iii) Postorder
Avocado(5), Citrus(4), Blue berry(2), Rumbutan(7), Pear(6), Watermelon(3), Guava(1)
c) Briefly explain the difference between a stack and a queue.
The basic difference between stack and queue is:
Ø Stack : Use LIFO (Last In First Out). So, the first item enter the stack will be the last item to exit the stack.
Ø Queue : Use FIFO (First In First Out). So, the first item enter the queue will be the first item to exit the queue.
d) Explain the term binary tree.
Binary tree (T) is a finite set of elements called nodes. It contains a distinguished node (R ) called as the root of T. The other nodes will form the left and the right subtrees of the root.
e) Suppose that a computer stores numbers in an 8-bit register using two’s complement form. How would the computer evaluate 33 – 45? Give your answer in binary form.
i) Convert each 33 and – 45 to binary, and then store it in 8-bit register using two’s complement form
*) 33:
|
2 |
33 |
|
|
|
|
2 |
16 |
► |
1 |
|
|
2 |
8 |
► |
0 |
|
|
2 |
4 |
► |
0 |
|
|
2 |
2 |
► |
0 |
|
|
2 |
1 |
► |
0 |
|
33 = 100001
Stored in 8-bit register = 00100001
*)- 45:
|
2 |
45 |
|
|
|
|
2 |
22 |
► |
1 |
|
|
2 |
11 |
► |
0 |
|
|
2 |
5 |
► |
1 |
|
|
2 |
2 |
► |
1 |
|
|
2 |
1 |
► |
0 |
|
- 45 = – 101101
Stored in 8-bit register = – 00101101
▼
11010010
00000001+
11010011
ii) Add together
00100001
11010011+
11110100
So, 3310 – 4510 will be evaluated as 111101002
B2
a) Lucy likes singing. She sings Chinese(A), English(B) and Japanese(C) songs. Write Boolean expressions to represent the following statements:
i) She sings Chinese and English songs, or she does not sing Chinese and Japanese songs.
X = A.B + (A.B)’
ii) She sings English or Japanese songs, but not Chinese songs.
X = (B+C).A’
iii) It is not true that she sings Chinese but not Japanese songs.
X = (A.C’)’
b) Suppose that X = (A.(A.B)’)’ and Y =(B.(A.B)’)’.
i) Produce two separate truth tables to represent X and Y respectively.
- for X:
|
A |
B |
A.B |
(A.B)’ |
A.(A.B)’ |
X = (A.(A.B)’)’ |
|
0 |
0 |
0 |
1 |
0 |
1 |
|
0 |
1 |
0 |
1 |
0 |
1 |
|
1 |
0 |
0 |
1 |
1 |
0 |
|
1 |
1 |
1 |
0 |
0 |
1 |
- for Y:
|
A |
B |
A.B |
(A.B)’ |
B.((A.B)’) |
Y =(B.(A.B)’)’ |
|
0 |
0 |
0 |
1 |
0 |
1 |
|
0 |
1 |
0 |
1 |
1 |
0 |
|
1 |
0 |
0 |
1 |
0 |
1 |
|
1 |
1 |
1 |
0 |
0 |
1 |
ii) Draw a logic circuit diagram to represent (X.Y)’ with inputs A and B.

c) Simplify the following expression
A’.B.C + A.B’.C’ + A.B.C’ + A’.B.C’ + A’.B’.C’
= A’.B.C + (A. C’).(B’+ B) + (A’.C’).(B’+ B)
= A’.B.C + (A. C’).( 1 ) + (A’.C’).( 1 )
= A’.B.C + C’.(A + A’)
= A’.B.C + C’
d) John has 5 red discs and 4 white discs in a bag. He takes 2 discs at random from the bag one after the other, and are not replaced. Expressing your answer as fractions, find the probability that
i) the first disc is red and the second is white.
5/9 * 4/8 = 20/72 = 5/18
ii) the two discs have different colours.
5/9 * 4/8 = 20/72 = 5/18
Or
4/9 * 5/8 = 20/72 = 5/18 So, 5/18 + 5/18 = 10/18 = 5/9
iii) the second disc chosen is white.
5/9 * 4/8 = 20/72 = 5/18 or 4/9 * 3/8 = 12/72 = 3/18
So, 5/18 + 3/18 = 8/18 = 4/9
Do you have any comment on this? maybe you have something to ask me or want to discuss with me about this?Or maybe you are IDIC student and taking this module also?
Feel free to use the comment box below (click here if you cannot see the comment box).



Hi There,
I would like to thank you for sharing this website. It served as a great help for us IDIC student. Keep up the Good work.
GOD BLESS!
James E.
Philippines
@James E.
Hi James,
You are welcome
You can also share your problem in the lesson here and I will try to help you
God Bless You
Thomas S
Singapore
Hi Thomas,
Greetings for the day!
I really appreciate your great effort for the assistance you have extended to us.
btw. here is my personal email(buenlag280@gmail.com). Thank a lot!
thanks.
how do i get past papers for this? if you do have my email is janetsait@hotmail.com
Hi, are you Informatics Student? If so, then you can download the past year papers from IVC. Log in, go to my course, select the module name, go to exam corner, then click on past year paper. Good Luck ^^
hi!!!
Good Day..
can i paste my problem here for my coursework assignment??..and i need your help..for my CS113..
inFormAtiCs sTudEnt
Philippines
yes of course you can do it
@admin
hMmm..do you have email add???..can i send it to your personal account??,,hehe..coz im shy to paste it coz many to answer..hehe
yes, it is
thomaset2000@thomaset2000.com
@admin
Hi!!
i already sent my coursework ass.to your personal account..thank you so much..:)
@admin
hi!!
Good eVe..
mAm i just want to follow up if you already see my coursework ass.?hehe..
yes i got it, but then on which part do you need my help?
@admin
in SectiOn B..Q1 and Q2..i dont know how to ans.it..
is it this one:
Q1.
a) By drawing the truth table, verify that:
i) C OR (A AND B AND (NOT C))
ii) B OR NOT ((A AND B) OR NOT C)
all you need to do here is to draw a truth table and put in all the combination there. for example you will have these columns for the a) i):
A, B, C, (NOT C), (A AND B), (A AND B) AND (NOT C), C OR (A AND B AND (NOT C))
@admin
Hmmm..mAm can i get the correct ans.?hehe..i have only few days to answer then i have no idea for it..huhuhu…
kindly help me find marking schemes for c1003.
oh my, I cant do everything for you because I have my school assignments also, please give me specific question that you cant do.. sorry..
I am sorry Janet, I have no access to any marking scheme
ok thanks
you are welcome
holy shit~
these are all the answer 4 my assignment~
why do u have this?~
diz is weird~
Hi Gaga, Are you taking course in Informatics too?
This is not exactly your assignment. This is my past Informatics’ IDIC assignments.
Glad to know you find it helpful
yeah, IDIC~
i’m from indonesia, i heard bout u alot from my frenz~
u’re from indonesia too, aren’t u?~
anyway, i’mma do my assignment all bymyself~
well, hopefully i can answer all d questions~
if not, i can juz peek abit from diz site~
=p
Yes I am from Indonesia too. Nice To know you
Good Luck with your study! ^^
Hey, hanks a lot. Your publication really helped a lot. Am from Botswana, Southern Africa
You are welcome Mpho Moepi