Sample paper 5 for ISC computer Science
SUB: COMPUTER FOR CLASS XII MARKS: 70
-----------------------------------------------------------------------------------------------------------------
Answer all questions in Part I (compulsory) and seven
questions from Part-II, choosing two questions from Section-A, two from
Section-B and two from Section-C.
All working, including rough work, should be done on the
same sheet as the rest of the answer.
The intended marks for
questions or parts of questions are given in brackets [ ].
-----------------------------------------------------------------------------------------------------------------------
PART I
Answer all questions
Question1:
a) Convert
the following sum of product expression into its corresponding POS [1]
F(A,B,C)=A’.B’.C’+A’.B’.C+A’.B.C+A.B’.C
b) Show
that AB+(AC)’+AB’C(AB+C) is always 1. [1]
c) Simplify
expression AB’CD’+AB’CD+ABCD’+ABCD [1]
d) Convert
the following into canonical SOP form (X’Y)’.(X’Z’)’ [1]
e) Find
the complement of,F(A,B,C,D)=(A+((B+C).(B’+D’))) [1]
Question 2:
a) Draw
the logic gate diagram and truth table for XOR gate. [2]
b) Name
the Universal gates ,Explain with truth table And Diagram [2]
c) Prove
that (x.y)’=x’+y’ using truth table [2]
d) State
the two idempotent laws of Boolean algebra. Verify any one. [2]
e) Draw
the logic gate diagram for the following function using NOR gates only. [2]
F(A,B,C)=A’B+AB’+C
Question 3 [5]
The
following function comb() and combi() are a part of some class. Give the output
when the combi() is called.
Show the dry
run/working.
void combi()
{
for(int
i=0; i<5; i++)
{
for(int
j=0;j<i+1; j++)
System.out.print(“
“+comb(i,j));
System.out.println();
}
}
long
comb(int n, int k)
{
long
c=1;
for(int
i=1;i<=k;i++,n--)
c=c*n/i;
return
c;
}
PART II
Attempt any two questions from
Section-A, two from Section-B and two from Section-C
Section
A
Question 4
(a) Given the Boolean function: [5]
F ( P,
Q, R, S ) = ∑ ( 0, 1, 3, 4, 5, 6, 7, 9, 10, 11, 13, 15 )
Use Karnaugh’s map to reduce the function F, using
the SOP form. Draw a logic gate diagram for the reduced SOP form. You may use
gates with more than two inputs. Assume that the variable and their complements
are available as inputs.
(b)
Given G(A,B,C,D)= (A+B+C+D)
(A+B+C+D’) (A+B+C’+D’) (A+B+C’+D) (A+B’+C+D’) (A+B’+C’+D’) (A’+B+C+D)
(A’+B+C’+D)
i)
Reduce the above expression by using 4 variable Karnaugh map, showing the
various groups (i.e.octal, quads and pairs). [4]
ii)
Draw the logic gate diagram for the reduced expression. Assume that the
variables and their complements are available as inputs. [1]
Question 5.
(a)
What is Full adder? Write the SOP expressions for
sum and carry. Simplify the expressions algebraically using Boolean algebra. [5]
(b)
Draw the truth table and logic circuit diagram for a
Hexadecimal to Binary encoder. [5]
Question 6.
(a)
Write the equivalent Boolean expression for the
propositions F=X→Y and F=X↔Y. [2]
(b)
Reduce the following Boolean expressions to the
simplest form: [3]
A.[B+C.(A.B+A.C)’]
(c) Draw the
truth table and logic circuit diagram for a 3x8 decoder. What is the difference
between a
multiplexer
and a decoder? [5]
Section B
Answer two questions
Answer two 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. (Flowcharts and algorithms are not
required)
The programs must be written in Java.
The programs must be written in Java.
Question 7. [10]
In a class VowelWord to accept sentence and
calculate the frequency of words that begin with a vowel. The words in the
input string are separated by a single blank space and terminated by a full
stop. The description of the class is given below:
Class name VowelWord
Data members
str to
store the sentence
freq store
the frequency of the words beginning with a vowel
Member functions
VowelWord() constructor
to initialize data members to legal initial value.
void readstr() to
accept a sentence
void freqvowel() counts
the frequency of the words that begin with a vowel
void display() to
display the original string and the frequency of the words
that
begin with a vowel.
Specify the class VowelWord giving
details of the constructors and all the functions. Also write the main function
Question 8. [10]
A class RecFact defines a recursive function to
find the factorial of a number.
|
|||
The details of the class are given below:
|
|||
Class name
|
:
|
RecFact
|
|
Data members/instance variables
|
|||
n
|
:
|
stores
the number whose factorial is required
|
|
r
|
:
|
stores
an integer
|
|
Member functions
|
|||
RecFact( )
|
:
|
default
constructor
|
|
void
readnum( )
|
: to enter values for ‘n’ and ‘r’
|
||
int
factorial(int)
|
: returns the factorial of the number using
the recursive technique.
|
||
void factseries()
|
: to calculate and display the value of
|
||
n!+(r-2)!
|
|||
( n − r)!
|
|||
Specify the class RecFact giving the details of the
constructor and member functions void readnum( ), int factorial(int) and void
factseries( ). Also define the main function to create an object and call
methods accordingly to enable the task.
Question 9. [10]
A perfect square is an integer
which is the square of another integer.
For example, 4, 9,16 are perfect
squares. Design a Class Perfect with the following description:
Class name
|
Perfect
|
|
Data members/instance variables
|
||
N
|
stores an integer number
|
|
Member
functions:
|
||
Perfect(
)
|
default
constructor
|
|
Perfect(int)
|
parameterized
constructor to assign a
value
to ‘n'.
|
|
void
perfect_sq()
|
to display
the first 5 perfect squares larger than ‘n’ (if n = 15, the next 3 perfect
squares are 16, 25, 36)
|
|
void
sum_of()
|
to display
all combinations of
consecutive integers
whose sum is
equal
to n. ( the number n = 15 can be
expressed
as
1 2 3 4 5
4 5 6
7 8
|
Specify the class Perfect giving details of the constructors, void
perfect_sq( ) and void sum_of(). Also define the main function to create an
object and call methods accordingly to enable the task.
Section C
Answer any two questions
Answer any two questions
Each program should be written in such a way that it clearly depicts the logic of the problem step wise.This can also be achieved by using comments in the program and mnemonic names or pseudo codes for algorithms. The program must be written in Java and the algorithms must be written in general/standard form, wherever required/ specified. (Flowcharts are not required.)
Question 10. [5]
A class OctaDeci has
been defined to convert an Octal number into its equivalent Decimal number.
Some of the members of the class are given below:
Class name : OctaDeci
Data members :
dec : integer to store decimal number.
N : integer octal to be converted to its decimal form.
Member functions :
OctaDeci() : constructor to assign initial
value to the data members.
void
getOctal() : to accept Octal integer N.
void
recursiveDec(int): to find the decimal
equivalent of the octal number stored in N and store
in
dec using Recursive Technique.
void
putdata() : to display the octal number ‘N’
and its decimal equivalent.
Specify the class
OctaDeci giving details of constructor and functions. You do not need to write
the main function.
Question 11.
[5]
A class Revstr defines a recursive function to reverse a
string and check whether it is a palindrome. The details of the class are given
below:
Class name : Revstr
Data members Str
: stores the string.
Revst : stores the reverse of the string.
Member functions void getStr() : to
accept the string.
void recReverse(int)
: to reverse the string using
recursive technique.
void check() : to display the original string, its reverse
and whether the string is a palindrome
or not.
Specify the class Revstr
giving details of the functions void getStr(), void recReverse(int) and
void check(). The main function need not be written.
Question 12. [5]
Draw a truth
table with a three input combination which outputs 1 if there are odd number of
0’s. Also derive an SOP expression using
K map.
AB+(AC)′+AB′C(AB+C)
AB+A′+C′+ACB′B+AB′C(Demorgan's law
(AC)'=A'+C'
AB+A′+C′+AB′C(Complementarity law
B'B=0)
A(B+B′C)+A′+C′
A(B+C)+A′+C′(Distributive
law (B+B'C)=(B+C) as (B+B')(B+C)=(B+C) )
AC+AB+A′+C′
(A′+AC)+(A′+AB)+C′
(A′+C)+(A′+B)+C′
A′+B+C+C′
=1
____________________
1
11
121
1331
14641
____________________________
k-map
D + A*B + A*C + A*B*C
k-map
A+D * B+D
No comments:
Post a Comment