
Computer Science ISC 12th - Paper 3
Quiz by Sujatha Rajkumar
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
1. Convert A.B + B.Câ to its canonical SOP form using Boolean Algebra and choose the answer from the following:Â
[2]
2. Complement of the expression AâB + CDâ is ________________ [2]
3. Simplify y=ABâ+(Aâ+B)C [2]
4. Reduce the given Boolean function F(A,B,C,D)=âŹ( 0, 3, 4, 7, 8, 11, 12, 15) by using4-variable Karnaugh map and answer the following questions:
What will be the least number of groups and their types formed for reduction? [1]
5. Reduce the given Boolean function F(A,B,C,D)=âŹ( 0, 3, 4, 7, 8, 11, 12, 15) by using4-variable Karnaugh map and answer the following questions:
The reduced expression of the Boolean function given above is: [2]
6. Simplify the given expression and choose the answer from the following: [2](A.Bâ + AB) (A+B)
7. Choose the dual of F=(p+1).(qâ+0) [2]
8. Q18. Predict the output from the given code snippet, when value of n=567. [2]void function(int n)
{
while(true)
{
n/=10;break;
}
System.out.println(n*10);
}
9. Predict the output from the given code snippet.
[2]void test()
{
String str=âCOMPUTER IS FUNâ;
String s=str.substring(str.indexOf(âUâ), str.lastIndexOf(âUâ));
System.out.println(s);
}
10. Choose the answer after Converting X + Y to minterms. [2]
11. Simplify the given expression and choose the answer from the following: [2]
12. Reduce the given Boolean function F(A,B,C,D)=Ď(1, 2, 5, 6, 9, 11, 13, 15)
What will be the least number of groups and their types formed for reduction? [1]
13. Reduce the given Boolean function F(A,B,C,D)=Ď(1, 2, 5, 6, 9, 11, 13, 15)
The reduced expression of the Boolean function given above is: [2]
14. With reference to the program code given below, answer the questions that follow:void calculate(int x)
{
int s=0;
for(int i=1; i<x; i++)
if( x%i==0)Â
s=s+i;
if(s==x)
System.out.println(_______________);
}
Choose the correct print message for the above method calculate(), when x=28. [1]
15. With reference to the program code given below, answer the questions that follow:void calculate(int x)
{
int s=0;
for(int i=1; i<x; i++)
if( x%i==0)Â
s=s+i;
if(s==x)
System.out.println(_______________);
}
What is the output of the method calculate() when x=4? [2]
16. Answer the question that follows:
void show(int n, int d)
{
int k=1;
while(n>1)
{
if(n%d==0)
{
k=k*d;
n=n/d;
}
else
d++;
}
System.out.println(k);
}
What is the output of function show(24,2) ? [2]
17. Answer the question that follows:
void show(int n, int d)
{
int k=1;
while(n>1)
{
if(n%d==0)
{
k=k*d;
n=n/d;
}
else
d++;
}
System.out.println(k);
}
What is the output of function show(0,0)? [1]
18. The following public method is part of some class. Assume that the parameters x andy are positive integers. answer the questions following it. Show dry run/working.
int Afunction(int x, int y)
{
int p=1, n=x;
while(y>0)
{
if(y%2==1)
p*=n;
y/=2;
n*=n;
}
return p;
}
What will be returned by Afunction(2,7) when invoked? [2]
19. The following public method is part of some class. Assume that the parameters x andy are positive integers. answer the questions following it. Show dry run/working.
int Afunction(int x, int y)
{
int p=1, n=x;
while(y>0)
{
if(y%2==1)
p*=n;
y/=2;
n*=n;
}
return p;
}
What will be the final value of n by Afunction(2,7) when invoked? [1]
20. A company intends to develop a device to show the high status power load for ahousehold invertor depending on the criteria given below:
⢠If Air conditioner and Geyser are onOR
⢠If Air conditioner is off, but Geyser and Refrigerator are onOR
⢠If Geyser is off, but Air conditioner and Water purifier are onOR
⢠When all are on
The inputs are:
INPUT A- Air conditioner is on
G- Geyser is on
R- Refrigerator is on
W- Water purifier is on
(In all the above cases 1 indicates yes and 0 indicates no)
Output: X [ 1 indicates high power, 0 indicates low power for all cases]
Choose the SOP expression for X(A,G,R,W) [2]
21. A company intends to develop a device to show the high status power load for ahousehold invertor depending on the criteria given below:
⢠If Air conditioner and Geyser are onOR
⢠If Air conditioner is off, but Geyser and Refrigerator are onOR
⢠If Geyser is off, but Air conditioner and Water purifier are onOR
⢠When all are on
The inputs are:
INPUT A- Air conditioner is on
G- Geyser is on
R- Refrigerator is on
W- Water purifier is on
(In all the above cases 1 indicates yes and 0 indicates no)
Output: X [ 1 indicates high power, 0 indicates low power for all cases]
Choose the SOP expression for X(A,G,R,W)
How many 1âs will be in resultant column? [1]
22. The following function is a part of some class to compute that the number isArmstrong or not. If sum of cube of all the digits of a number is equal to the number, then itis Armstrong. The function returns true if B is Armstrong otherwise returns false. There arefive places in the code marked by ?1?, ?2?, ?3?, ?4?, ?5? which must be replaced bystatement or expression so that the function runs correctly.
boolean checkNum(int B)
{
int sum=0, num=?1?;
while(B>0)
{
int d=?2?;
sum=sum+?3?;
B=?4?;
}
if(?5?)
return true;
else
return false;
}
What is the expression or statement at ?1?
23. The following function is a part of some class to compute that the number is Armstrong or not. If sum of cube of all the digits of a number is equal to the number, then it is Armstrong. The function returns true if B is Armstrong otherwise returns false. There are five places in the code marked by ?1?, ?2?, ?3?, ?4?, ?5? which must be replaced by statement or expression so that the function runs correctly.
boolean check Num(int B)
{
int sum=0, num=?1?;
while(B>0)
{
int d=?2?;
sum=sum+?3?;
B=?4?;
}
if(?5?)
return true;
else
return false;
}
What is the expression or statement at ?2?
24. The following function is a part of some class to compute that the number is Armstrong or not. If sum of cube of all the digits of a number is equal to the number, then it is Armstrong. The function returns true if B is Armstrong otherwise returns false. There are five places in the code marked by ?1?, ?2?, ?3?, ?4?, ?5? which must be replaced by statement or expression so that the function runs correctly.
boolean check Num(int B)
{
int sum=0, num=?1?;
while(B>0)
{
int d=?2?;
sum=sum+?3?;
B=?4?;
}
if(?5?)
return true;
else
return false;
}
What is the expression or statement at ?3?