**COMPUTER SCIECE**

**PAPER 1**

**Three hours**

**The intended marks for questions or parts of questions are given in brackets [ ].**

**Part I**

**Question 1**

(a) State the two distributive laws of Boolean Algebra. Prove any one of them with the help of Truth Table.

(b) Draw the truth table to verify the expression :

p q is equivalent to q p

( q = q = q’)

(c) Find the complement of the following:

[(xy)^{0} • x] [ (xy)^{0} • y]

(d) Simplify the following Boolean Expression using laws of Boolean Algebra. At each step, clearly state the law used for simplification.

z . ( z + x ) x ( y + y )

(e) Given

F ( x, y, z ) = xz + xy + yz Write the function in canonical sum of products form.

**Question 2**

(a) What do LIFO and FIFO stand for?

(b) For an array of real numbers x [ − 6… 8 , -12… 20 ] , find the address of

x [5] [4 ], if x [1] [1] is stored in location 100 in the column major order.

Assume that each element requires 4 bytes.

(c) State the difference between an abstract class and an interface

(d) Convert the following infix expression to its postfix form:

b * [ (a / d ) - ( c * ( e - f ) ) ]

(e) Define a binary tree.

**Question 3**

(a) The following function is a part of some class. It returns the value 1 when the number is an Armstrong number, otherwise it returns 0.

/* An Armstrong number is a number which is equal to the sum of the cube of

its individual digits */

int arms ( int n )

{

int digit = 0, sum = 0 ;

int rem = n;

while ( ? 1 ? )

{

digit = ? 2 ?;

sum = sum + ? 3 ? ;

rem = ? 4 ? ;

}

if (? 5 ? )

return 1 ;

else

return 0 ;

}

(i) What is the expression/value at ? 1 ?

(ii) What is the expression/value at ? 2 ?

(iii) What is the expression/value at ? 3 ?

(iv) What is the expression/value at ? 4 ?

(v) What is the expression/value at ? 5 ?

**Please refer to attached file for ISC Question Papers 2013 Computer Science**