Home > Education, IDIC, Informatics > C1003 Mathematics for Computing Term 3 2007 Assignment

C1003 Mathematics for Computing Term 3 2007 Assignment

January 26th, 2009

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)a4i1

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)

a4i2

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)

a4i3

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.

b1ai1

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

b1ai2

Node

Content

Back Pointer

Trace Pointer

1

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.

b2bi2

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).

admin Education, IDIC, Informatics , , , , , , ,

  1. James E.
    February 10th, 2009 at 19:06 | #1

    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

  2. February 10th, 2009 at 20:01 | #2

    @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

  3. James E.
    February 12th, 2009 at 12:13 | #3

    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!

  4. saita
    July 29th, 2009 at 20:35 | #4

    thanks.

    how do i get past papers for this? if you do have my email is janetsait@hotmail.com

  5. July 29th, 2009 at 20:58 | #5

    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 ^^

  6. September 3rd, 2009 at 16:32 | #6

    hi!!!
    Good Day..

    can i paste my problem here for my coursework assignment??..and i need your help..for my CS113..

    inFormAtiCs sTudEnt
    Philippines

  7. September 3rd, 2009 at 20:17 | #7

    yes of course you can do it :)

  8. September 10th, 2009 at 15:40 | #8

    @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

  9. September 12th, 2009 at 08:59 | #9
  10. September 12th, 2009 at 11:27 | #10

    @admin
    Hi!!

    i already sent my coursework ass.to your personal account..thank you so much..:)

  11. September 16th, 2009 at 19:10 | #11

    @admin
    hi!!

    Good eVe..

    mAm i just want to follow up if you already see my coursework ass.?hehe..

  12. September 17th, 2009 at 08:38 | #12

    yes i got it, but then on which part do you need my help?

  13. September 17th, 2009 at 18:59 | #13

    @admin

    in SectiOn B..Q1 and Q2..i dont know how to ans.it..

  14. September 19th, 2009 at 17:14 | #14

    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))

  15. September 21st, 2009 at 12:47 | #15

    @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…

  16. janet
    September 29th, 2009 at 19:33 | #16

    kindly help me find marking schemes for c1003.

  17. September 29th, 2009 at 20:16 | #17

    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..

  18. September 29th, 2009 at 20:17 | #18

    I am sorry Janet, I have no access to any marking scheme

  19. janet
    October 1st, 2009 at 15:33 | #19

    ok thanks

  20. October 3rd, 2009 at 09:01 | #20

    you are welcome :)

  21. Gaga
    February 3rd, 2010 at 01:18 | #21

    holy shit~

    these are all the answer 4 my assignment~

    why do u have this?~

    diz is weird~

  22. February 3rd, 2010 at 20:40 | #22

    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

  23. Gaga
    February 3rd, 2010 at 23:59 | #23

    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

  24. February 4th, 2010 at 00:58 | #24

    Yes I am from Indonesia too. Nice To know you :)
    Good Luck with your study! ^^

  25. Mpho Moepi
    February 13th, 2010 at 17:56 | #25

    Hey, hanks a lot. Your publication really helped a lot. Am from Botswana, Southern Africa

  26. February 16th, 2010 at 07:14 | #26

    You are welcome Mpho Moepi :D

  1. February 6th, 2009 at 20:37 | #1

Bad Behavior has blocked 205 access attempts in the last 7 days.

Bad Behavior has blocked 205 access attempts in the last 7 days.