Upload
sampuran-de
View
212
Download
0
Embed Size (px)
Citation preview
8/22/2019 Important Question Paper for ISC 2013 Class 12 Computer Science
http://slidepdf.com/reader/full/important-question-paper-for-isc-2013-class-12-computer-science 1/6
I
Important Paper – 2013Class – XII
Subject – Computer Science(Paper 1)
Time: 3 hours Max
Marks:100
Answer all Questions in Part I (compulsory) and seven questions from Part II, choosing
three questions from Section A and four questions from Section B.
PART I(Answer all questions in this Part)
While answering questions in this Part, indicate briefly your working and reasoning
wherever required Question 1. [10]
(a) Simplify A.B+A’.C+B.C using the laws of Boolean Algebra. At each step state
clearly the law used for simplification.
(b) Find the complement of
F((a, b, c, d) = [ a + { (b + c) . (b’ + d’) } ]
(c) State Absorption Laws. Verify one of the Absorption laws using a truth table.
(d) An array m[-2…..5,-1….4] is stored using row major implementation the
address of m[0][0] is 176 and the address of m[4][3] is 230. Find the addressof m[3][2].
(e) Write the preorder and post order traverse for following binary tree.
48
15 59
7 26 55 7818
70 86
22 80
Question 2: [10]
(a) Convert the following infix expression to its postfix form:
(A+B+C)*D/E^F/G*(H-I+) +J
(b) Show that if x.y=0, then x y= x + y.(c) State De Morgan’s law. Verify one of them using the truth table.
(d) Obtain the logic circuit of the following boolean expression using NOR gates
only F(X, Y, Z) = (X + Y). (Y + Z). (Z + X)(e) Write the product-of-sum for the Boolean function, F(A,B,C) whose output is
0 only when:
A=1, B=0, C=0; A=0, B=1, C=0; A=0, B=0, C=1; A=1, B=1, C=1
Question 3.
(a) The following strange function is a part of some class. Assume that thearguments x and y are grater than 0 when the function is invoked. Show the dry run/working.
int strange(int x, int y)
8/22/2019 Important Question Paper for ISC 2013 Class 12 Computer Science
http://slidepdf.com/reader/full/important-question-paper-for-isc-2013-class-12-computer-science 2/6
II
{
if (x>=y){ x = x – y; return (strange(x, y)); }
else
return x
}
(i) What will the function strange (20, 5) returns when invoked? [2]
(ii) What will the function strange (20, 5) returns when invoked? [2]
(iii) In one line state what the function strange ( ) is doing? [1]
(b) State the final value of q at the end of the following program segment after execution. Show the dry run or working:
int m, n, q=0, p;
for(m=2; m<=3; ++m)
{ for(n=1; n<=m; ++n)
{ p= m+n-1;
If(p%3= =0)
q + = p;
else
q + = p + 4;
}
}PART B
(Section 1)(Answer any three questions)
Question 4:
(a) Given the following Boolean function [5]F (a, b, c, d) = (5,6,7,8,9,10,11,12,13,14,15).
Use Karnaugh's map to reduce this function using the given SOP form. Draw thelogic gate diagram for the reduced SOP expression using AND and OR gates. Youmay use gates with more than two inputs. Assume that variables and theircomplements are available as inputs.
(b) Given F (a, b, c, d) = (0, 1, 3, 5, 6, 7, 10, 14, 15) [5]
Use Karnaugh's map to reduce this function using the given Pas form. Draw the logicgate diagram for the reduced POS expression using OR and AND gates. You may usegates with more than two inputs. Assume that variables and their complements are
available as inputs. Question 5: In Big Bazar the shopping could be done using cash or credit card of ICICI bank. Customer will be given bones point depending upon given condition.
Shopping using credit card.
Shopping of item which carries bones points.
Shopping using cash but above amount Rs 500.
Where C represents credit card (1 for payment by credit card 0 for not payment by credit card)
A represents cash (1 for payment by cash 0 for not payment by cash)
M represents amount (1 for money >=5000 and 0 for money <500)
8/22/2019 Important Question Paper for ISC 2013 Class 12 Computer Science
http://slidepdf.com/reader/full/important-question-paper-for-isc-2013-class-12-computer-science 3/6
III
I represents item (1 represent item carries bones, 0 represent item do not carriesbones)
B represents Bonus (1 represents bonus points given, 0 represent bonus points notgiven)
A) Draw the truth table to represent B using C, A, M, I? Find SOP expression for it. [5]
B) Reduce above SOP expression using K Map. And draw the Logic gate for it. [5]
Question 6:(a) Draw the truth table and logic circuit diagram for a Octal To Binary Encoder. [6](b) Verify if X’. Y.Z + X.Y’.Z + X.Y.Z’ + X.Y.Z = X.Y + Y.Z + Z.X [4]Give reasons at every step.
Question 7: (a) What is full adder? Write the SOP expression for sum and carry. Simplify theexpression algebraically for sum using Boolean Algebra. [6](b). What is Decoder? Give any one application of a decoder. [2](c ) Using Truth Table Verify: A + B.C. = ( A + B ) . (A + C) [2]
Question 8:A full subtractor is a combinational circuit that performs the subtraction between
two bits , taking int account that 1 may have been borrowed by a lower significantstage. Following is the truth table for the full subtractor. It has 3 inputs: M, S and P. ithas two output: B and D.
INPUT OUTPUT
Minuend(M) Subtrahend(S) PreviousBorrows(P)
Borrow(B) Difference(D)
000
01111
001
10011
010
10101
011
10001
011
01001
a) Write the SOP expression for B and D. Use Karnaugh’s Maps to reduce B and Dif Possible.[7]
b) Now Draw logic gate diagram for B and D using AND and OR gates. You may usegates with more than two inputs. Assume that variable and their complement
are available as inputs. [3] SECTION B [40 Marks]
(Attempt any four questions) 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.
Question 9:A class called Numeric has been defined to find and display the frequency of each digitpresent in the number and the product of the digits. Some of the members of the classare given below:
Data members : n-long integer type.
Member functions : Numeric (long a) : A constructor to assign a to n.void frequency( ) : to find the frequency of each digit in the number n, and display it.int product( ) : to return the product of the digits of the number.
8/22/2019 Important Question Paper for ISC 2013 Class 12 Computer Science
http://slidepdf.com/reader/full/important-question-paper-for-isc-2013-class-12-computer-science 4/6
IV
Specify the class Numeric giving the details of the constructor and the functions voidfrequency ( ) and int product ( ). Write the main method to create the object and print
frequency of each digit and product of each digit by calling above method. [10]
Question 10:Design a class Convert to convert a decimal number to its equivalent in base 2 and toconvert this binary number back to its decimal equivalent. E.g.
(i) The decimal number 35 is 100011 in base 2.(ii) The decimal equivalent of binary number 100011 is 35.
Some of the members of the class are given below:Class name : Convert
Data Members/ Instance Variables: N : integer to be converted to base 2.
Member functions/ methods: Convert( ) :constructor to assign 0 to instance variable.long binary (int ) :to convert and return binary form of parameterized value.int decibin(int ) :to convert and return decimal value of binary number passed in
parameter
Specify the class Convert giving details of the constructor and the functions along withmain method that accept a number and convert into binary form and again this binary number converted into decimal form. It print “BRILLIANT” if both the results are sameotherwise print ”BETTER LUCK NEXT TIME”. [10]
Question 11:A palindrome number is one that reads same from left to right or right to left.Example: 12321, 9834389. There is an ingenious method to get the palindrome from any positive integer. The procedure is as follows:
1. Start with any positive number of 2 or more digits.2. Obtain another positive number by reversing the digits of the starting number.
3. Add the 2 numbers together.
4. Repeat the whole procedure with the sum as the starting number till you get thesum which is the palindrome number.
Example: start with 87.
1st Step 2nd Step 3rd Step 4th Step87 165 726 135378 561 627 3531
Sum= 165 726 1353 4884
A class Palin is designed to get a palindrome number from a positive number.
A class Palin is designed to get a palindrome number for a positive number.Class Palin is defined as follows:Data member:int num : to store a 2 digit positive number.Member functions:
Palin(int) : a constructor to initialize num with parameter.boolean palindrome(int) : used to return true if parameterized value is a palindrome
otherwise return false.int ingenious( int) :a function that calculates and return the palindrome number
for parameterized number if it is found within 5 steps
otherwise returns -1.
8/22/2019 Important Question Paper for ISC 2013 Class 12 Computer Science
http://slidepdf.com/reader/full/important-question-paper-for-isc-2013-class-12-computer-science 5/6
V
Specify the class, giving details of the functions members along with main method thataccept a number and print its palindrome number by calling above methods. [10]
Question 12:Class “MyArray” contains the employee code of 100 employees. Some of themember function/ data members are given below:
Class name : MyArray Data member : arr[ ] – integerMember Function:MyArray() : to assign the code to 0.void fillarray() : to input the code in the arr[]
void sortArr() :to sort the array variable using selection sorttechnique.
int binarySearch(int code) :to search and return 1 if an employee code is found inthe array object else return 0.
Write the class details. You do not need to write the main function. [10]
Question 13:
Class Name : Point Member Data : x ( x coordinate), y ( y coordinate )Member Function :
Constructors : Default and Parameterizedvoid display() : display pointdouble findDistance( Point) : inputs a point as parameter and returns
distance between current object andparameterized object them.
Point findMidPoint( Point ) : returns midpoint between current abjectand parameterized object.
Now write a main method that accept to two point and calculate its mid point and
distance between them with the help of above methods.
Question 14:
Class Name : Saddle
Data Members : int arr[ ][ ] an integer array which can hold max20 x 20 elementsint N size of 2D integer array (square matrix form)
Member Function : Saddle(int nk) : to initialize N to nk and accept only positive number in
it.void displayArray( ) : to display array in matrix form.void saddlePoint() : to find the SADDLE POINT for the matrix. A saddle
point is an element of the matrix such that it is theminimum element for the row to which is belongs andthe maximum element for the column to which it
belongs. Saddle point for a given matrix is alwaysunique. If the matrix has no saddle point, output themessage “NO SADDLE POINT”.
There is no need to write the main method.
Question 13: Your computer science teacher is trying to analyze the performance of the class in theprevious exam. He has a class called Performance, which contains the marks of 60students in the class. These are not sorted. He wants to find two quantities.Mode: the most frequently occurring mark in the class. If two or more marks occurequally frequently then the highest of these marks is the mode.
mode frequency: ,frequency at mode
8/22/2019 Important Question Paper for ISC 2013 Class 12 Computer Science
http://slidepdf.com/reader/full/important-question-paper-for-isc-2013-class-12-computer-science 6/6
VI
You can make the following assumptions: the class has 60 students
the maximum marks anyone can get are 100 and the minimum is 0 all student marksare whole numbers.
Important: You are not allowed to sort the marks.
Some of the member functions/methods of Performance are given below:
Class name Performance
Data members/instance variables:
mark [ ] an integer array to store the marks of 60 students.
mode -to store the mode ,
freqatmode -to store the frequency at mode.
Member functions/methods
Performance ( ) :constructor,
void readmarks( ) :for reading the marks into the array,
int getmode( ) :for returning the mode,
int getfreqatmode( ) : for returning the frequency at mode ,
void calcmodeandfrequency ( ):a single function that calculates both mode andfrequency at mode.
Specify the class Performance giving the details of the constructor, int getmode( ),intgetfreqatmode( ), void calcmodeandfrequency( ) only. You may assume that the otherfunctions are written for you. You do not need to write the main function.
.