CBSE Class XII : Computer Science Exam Paper Year 2009 (ISC Board)
General Instruction:
(i). All working including rough work should be done on the same sheet
as, and adjacent to the rest of the answer.
(ii). The intended marks for questions or parts of questions are given in
brackets []. (Material to be supplied: Log tables including Trigonometric
functions)
(iii). A list of useful physical constants is given at the end of this paper.
PART I
Q1. (a) Obtain the Truth Table to verify the following
expression: x.(y+z) = x.y + x.z Also name the law stated above. [2]
(b) Answer the following questions related to the gate
given below:
(i) What is the output of the above gate if input A = 0, B = 1?
(ii) What are the values of the inputs if output =
1? [2]
(c) Given F = A + (B+C). (D’+E)
Find F’ and show the relevant working in
steps. [2]
(d) State the dual for the following expression and also
draw the logic gate diagram for the dual expression obtained using NOR gate
only.
P = A.B + C.D
[2]
(e) For the given truth table where A, B, C are inputs and X is the
output,
A |
B |
C |
X |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
1 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
Write:
(i) Canonical sum-of-product expression (SOP)
(ii) Canonical Product-of-Sum expression (POS)
Q2. (a) State a difference between Linear and Non-Linear
Data Structure. Give one example of each. [2]
(b) Convert the following infix expression to its postfix
form : [2]
( (P*Q) / (R / S+T)) + U
(c) Simplify the following expression by using the
Boolean laws. Show the working in steps and also mention the laws
used: [2]
x’.y’.z’ + x’.y’.z + x’y.z + x’.y.z’ + x.y’.z + x.y’z
(d) Each element of an array A[20][10] requires two
bytes of storage. If the address of A[6][8] is 4000, find the Base Address at
A[0][0] when the array is stored as Row Major
wise. [2]
(e) Define Inheritance. How is it useful in programming?
Q3. (a) The following function trial and perform are a
part of some class. Answer the following parts given below. Show the dry
run/working. int trial (int n)
{if (n==1) return 2; else if (n==2) return 3; else
return trial (n-2) + trial (n-1);}
//for C++//
void perform (int p)
{ int x;
for(int i=1 ; i<=p; i++) OR
x=trail (i);
cout<<x<<" "; |
OR |
//for Java//
void perform (int p)
{ int x;
for (int i=1 ; i<p; i++)
{
x=trail (i);
System.out.print(x + “”) |
(i) What will the function trial return when the value of n is
4? [2]
(ii) What will be the output of the function perform when the value of p is
5? [1]
(iii) In one line state what the function trial is doing, apart from
recursion? [1]
(b) Answer the following from the diagram of a Binary Tree
given below:
i) Root of the
tree [1]
ii) External nodes of the
tree. [1]
iii) List the nodes in the tree using Inorder Traversal. [1]
iv) Left subtree.
[1]
v) Height of the
tree. [1]
PART II ( Section A )
Q4. (a) F(P,Q,R,S) = P’Q’RS’ + P’QRS’ + PQ’R’S + PQ’RS’ +
PQ’RS + PQR’S + PQRS’ + PQRS [5]
Use Karnaugh’s Map to reduce the given function F using the SOP form. Draw a
logic gate diagram for the reduced SOP form. You may use gate with more than two
inputs. Assume that the variables and their complements are available as inputs.
(b) F(A,B,C,D) = n(0,1,2,3,5,7,9,13)
[5]
Use Karnaugh’s Map to reduce the given function F using the POS form. Draw a
logic gate diagram for the reduced POS form. You may use gate with more than two
inputs. Assume that the variables and their complements are available as inputs.
Q5. A provisional store announces a special discount on all
its product as a festival offer only to those who satisfy any one of the
following conditions :
• If he/she is an employee of the store and has a service of more than 10 years.
• If he/she is a regular customer of the store whose age is less than 65 years
and is not an employee of the store.
• If he/she is a senior citizen but not a regular customer of the store.
The inputs are :
E : Employee of the store
R : Regular customer of the store
S : Service of the employee is more than 10 years
C : Senior citizen of 65 years or above
Output: X-Denotes eligible for discount [1 indicates YES and 0
indicates NO in all cases]
(a) Draw the truth table for the inputs and outputs given above and
write the SOP expression for X(E,R,S,C). [5]
(b) Reduce X(E,R,S,C) using Karnaugh’s Map [5]
Draw te logic gate diagram for the reduced SOP expression for X(E,R,S,C) using
AND & OR gates. You may use gates with two or more inputs. Assume that the
variable and their complements are available as inputs.
Q 6. (a) Draw a truth table representing a 2 input XNOR gate
and derive its SOP expression along with its logic gate
diagram. [3]
(b) Simplify the following expression and convert it to its
canonical POS form: [3]
(x.y+z) (y+z’.x)
(c) From the Logic Circuit diagram given below, name the parts
(1), (2), (3) and finally derive the Boolean expression and simplify
it: [4]
Q7. (a) Prove that the complement of A.(A+B).(B+CD)’ is a
universal gate. [2]
(b) Minimise the following expression. At each start step
clearly the law used. [3]
(c) Draw the truth table and logic circuit diagram for
a decimal to binary encoder. [5]
Q8. (a) State a difference between multiplexers and
decoders. Also state a use of each. [2]
(b) Verify the following Boolean expression with the help
of a truth table. [3]
(c) Write the SOP expression, truth table and the logic
circuit of full adder. [5]
SECTION-B
Each program should be written in such a way that it clearly
depicts the logic of the problem. This can be achieved by using mnemonic names
and comments in the program. (Flowcharts and Algorithms are not required) The
program must be written in C++/Java.
Q 9. A magic number is a number in which
the eventual sum of digits of the number is equal to 1.
For example, 172= 1+7+2=10
10 = 1+0= 1
then 172 is a magic number.
Design a class Magic to check if a given number is a magic number. Some of the
members of the class are given below:
Class name
|
: |
Magic |
Data members/instance variables |
|
|
n |
: |
stores the number |
Member functions |
: |
|
Magic |
: |
constructor to assign 0 to n |
void getnum (int nn) |
: |
to assign the parameter value to the number, n =nn |
int Sum-of’ digits (int) |
: |
returns the sum of the digits of a number |
void ismagic |
: |
checks if the given number is a magic number by calling
the function Sum of digits (int) and displays appropriate message |
Specify the class Magic giving the details of the constructor, void
getnum(int), int Sum-of digits(int) and void ismagic. You need not write the
main function. [10]
Q 10. A Transpose of an array is obtained by
interchanging the elements of the rows and columns. [10]
A class Transarray contains a two dimensional integer array of order [m x n].
The maximum value possible for both `m’ and `n’ is 20. Design a class Transarray
to find the transpose of a given matrix. The details of the members of the class
are given below :
Class name
|
: |
Transarray |
Data members/instance variables |
: |
|
arr[] |
: |
stores the matrix elements |
m |
: |
integer to store the number of rows |
n |
: |
integer to store the number of columns |
Member functions |
: |
|
Transarray |
: |
default constructor |
Transarray(int mm, int nn) |
: |
to initialize the size of the matrix, m=mm, n=nn |
void fillarray |
: |
to enter the elements of the matrix |
void transpose(Transarray A) |
: |
to find the transpose of a given matrix |
void disparrary |
: |
displays the array in a matrix form |
Specify the class Transarray giving the details of the constructors, void
fillarray, void transpose(Transarray) and void disparray. You need not write
the main function.
Q 11. A library issues books on rental basis at a 2%
charge on the cast price of the book per day . As per the rules of the library,
a book can be retained for 7 days without any fine . If the book is returned
after 7 says, a fine will also be charged for the excess days as per the chart
given below: