0% found this document useful (0 votes)
62 views5 pages

Xii T1TH 23-24

The document discusses a class 12 computer science exam paper. It contains two parts - Part 1 with 10 short answer questions testing basic concepts and Part 2 with longer questions to test application of concepts. Part 2 has three sections - Section A and B contain programming questions and Section C contains theoretical questions.

Uploaded by

naman verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views5 pages

Xii T1TH 23-24

The document discusses a class 12 computer science exam paper. It contains two parts - Part 1 with 10 short answer questions testing basic concepts and Part 2 with longer questions to test application of concepts. Part 2 has three sections - Section A and B contain programming questions and Section C contains theoretical questions.

Uploaded by

naman verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

I TERM EXAMINATION 2023-24

CLASS: XII
SUBJECT: COMPUTER SCIENCE
PAPER 1 (THEORY)
(Maximum Marks: 70)
(Time allowed: Three hours)
(Candidates are allowed additional 15 minutes for only reading the paper.
They must NOT start writing during this time.)
Answer all questions in Part I (compulsory) and six 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(20 Marks)
Answer all questions.
While answering questions in this Part, indicate briefly your working and reasoning,
wherever required.

QUESTION 1)
(i) Distributive law states that: [1]
(a) A • ( Aꞌ + B) = A
(b) A + ( A • B) = A
(c) Both (a) and (b)
(d) A • ( B + C ) = A • B + A • C
(ii) Assertion : A=1 B=0 C=0 and D=0 and minterm is A•B’•C’•D’
Reason : The final sum term must be 0 so B, C and D are complemented. [1]
Which one of the following options is correct?
(a) Both Assertion and Reason are true, and Reason is the correct explanation Assertion.
(b) Both Assertion and Reason are true, but Reason is not the correctexplanation for
Assertion.
(c) Assertion is true and Reason is false.
(d) Assertion is false and Reason is true.
(iii) According to the Principle of duality, the Boolean equation (P + Qꞌ) • R • 1 = P • R + Qꞌ • R will be
equivalent to: [1]
(a) P • Qꞌ + R + 1 = (P + R) • (Qꞌ + R)
(b) P • Qꞌ + R + 0 = (P + R) • (Qꞌ + R)
(c) Pꞌ • Q + R + 1 = (Pꞌ • Rꞌ) • (Q + Rꞌ)
(d) P • Qꞌ + R • 0 = (P + R) • (Qꞌ + R)
(iv) The complement of the Boolean expression (X’ + Y’ + Z’) is: [1]
(a) (X + Y) • Z
(b) X • Y • Z
(c) (Xꞌ + Yꞌ) • Zꞌ
(d) (Xꞌ + Yꞌ) • Z
(v) The equivalent of P ˄ Q ˅ ~ P ˄ ~ Q will be: [1]
(a) ((P ˄ Q ) ˅ ~ P ) ˄ ~ Q
(b) (P ˄ Q) ˅ ( ~ P ˄ ~ Q )
(c) P ˄ ( Q ˅ ~ P ) ˄ ~ Q
(d) P ˄ ( Q ˅ (~ P ˄ ~ Q ) )
(vi) Assertion : Boolean algebra and Binary number system are different from each other.
Reason : There are some basic operations like AND, OR and NOT which are
performed only in Boolean algebra. [1]
(a) Both Assertion and Reason are true, and Reason is the correct explanation forAssertion.
(b) Both Assertion and Reason are true, but Reason is not the correct explanationfor
Assertion.
(c) Assertion is true and Reason is false.
(d) Assertion is false and Reason is true.
(vii) What is the relevance of the keyword new for a data member of a class [1]
(viii) State any one purpose of using constructors in Java programming. [1]
(ix) Define Canonical form of an expression with respect to its Cardinal form. [1]
(x) State any one application each of full adder. [1]

QUESTION 2)
(i) Write Cardinal form for the given expression
f(a,b,c) = a’b’c + abc + ab’c + a’bc’ [2]
(ii) An array ARR[ −4 …..6, −2…..12] stores elements in Row Major Wise, with theaddress
ARR[2][3] as 4142. If each element requires 2 bytes of storage, find the Base address. [2]
(iii) The following functions are a part of some class:
void Try(char ch[],int x)
{ System.out.println(ch);
char temp;
if ( x<ch.length/2)
{ temp=ch[x];
ch[x]= ch[ch.length x 1];
ch[ch.length x 1] = temp;Try(ch,x+1);
}
}
void Try1(String n)
{ char c[]=new char[n.length()];
for(int i=0;i<c.length;i++)
c[i] = n.charAt(i);Try(c,0);
}
(a) What will the output of Try( ) when the value of ch[]={‘S’, ‘K’,‘I’, ‘P’} and x=1? [2]
(b) What will the output of Try1( ) when the value of n=”PLY”? [1]
(iv) The following function is a part of some class which computes and returns the valueof a number
‘p’ raise to the power ‘q’ (pq). There are some places in the code marked by ?1? , ?2? , ?3? which
must be replaced by an expression / a statement sothat the function works correctly.
double power ( double p , int q )
{ double r = ?1? ;
int c = ( q<0 ) ? q : q ;
if ( q == 0)
return 1 ;
else
{ for (int i = 1; i <= c ;?2?, i++);
return (q>0)? r : ?3?;
}
}
(a) What is the expression or statement at ?1? [1]
(b) What is the expression or statement at ?2? [1]
(c) What is the expression or statement at ?3? [1]
PART - II (50 MARKS)
Answer SIX questions in this part, choosing TWO questions from Section A,
TWO from Section B and TWO from Section C.
SECTION A
Answer any two questions.

QUESTION 3)
A training institute intends to give scholarships to its students as per the criteria given below:
• A student has excellent academic record but is financially weak.
OR
• A student does not have an excellent academic record but belongs to a backward class.
OR
• A student does not have an excellent academic record and is physically impaired.
The inputs are:

INPUTS:
A Has excellent academic record
F Financially sound
B Belongs to Backward class
P Is physically impaired

(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]
(i) Draw the truth table for the inputs and outputs given above. [2]
(ii) Write the SOP expression for X(A, F, B, P). [2]
(iii) Reduce the expression using K-Map and write simplified expression. [4]
(iv) Draw the logic circuit diagram for reduced expression. [2]

QUESTION 4)
(i) (a) Reduce the Boolean function F(A,B,C,D) = π (0, 1, 2, 3, 4, 6, 9, 11, 13) by using 4
variable Karnaugh map, showing the various groups (i.e. octal, quads and pairs). [4]
(b) Draw the logic gate diagram for the reduced expression. Assume that thevariables
and their complements are available as inputs. [1]
(ii) (a) From the logic circuit diagram given below, name the outputs (1), (2) and (3) and finally
derive the Boolean expression (F) and simplify it. Identify the propositional connective which
is equivalent to the simplified Boolean expression. [4]

(b) If A=1 and B=0 then find the value of (Aꞌ + 1) • B [1]
QUESTION 5)
(i) Draw the logic circuit to encode the following Hexadecimal number (1, 3, 5, 6, 9, A, C, E)
to its binary equivalents. Also state the binary equivalents of the given numbers. [5]
(ii) Verify if the following proposition is valid using the truth table:
A => ( B ^ C ) = ( A => B ) ^ ( B => C ) [3]
(iii) How is a 2 to 4 decoder related to 4:1 multiplexer? Explain and draw the logic circuit of
4:1multiplexer. [2]

SECTION B
Answer any 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.

QUESTION 6) [10]
An Evil Number is a number which contains even number of 1’s in its binaryequivalent.
Example: Binary equivalent of 10 = 1010 which contains even number on 1’s.
Thus, 10 is an Evil Number.
Design a class Evil to check if a given number is an Evil number or not. Some of themembers of the
class are given below:
Class name : Evil
Data members/instance variables:
num : to store a positive integer number
bin : to store the binary equivalent
Methods / Member functions:
Evil( ) : default constructor to initialize the data memberwith legal initial value
void acceptNum( ) : to accept a positive integer number
void rec_bin (int x) : to convert the decimal number into its binaryequivalent using
recursive technique
void check( ) : to check whether the given number is an Evil number by invoking the
function rec_bin() andto display the result with an appropriatemessage
Specify the class Evil giving details of the constructor( ), void acceptNum( ), void
rec_bin(int) and void check( ). Define a main( ) function to create an object and call all the functions
accordingly to enable the task.

QUESTION 7) [10]
A class Composite contains a two dimensional array of order [m x n]. The maximum values possible
for both ‘m’ and ‘n’ is 20. Design a class Composite to fill the array withthe first (m x n) composite
numbers in column wise.
[HINT: Composite numbers are those which have more than two factors.]
The details of the members of the class are given below:
Class name : Composite
Data members/instance variables:
arr[ ] [ ] : integer array to store the composite numberscolumn wise
m : integer to store the number of rows
n : integer to store the number of columns
Member functions/methods:
Composite(int mm, int nn ) : to initialize the size of the matrix, m = mm and n = nn
int isComposite( int p ) : to return 1 if the number is composite otherwisereturns 0
void fill ( ) : to fill the elements of the array with the first(m × n) composite
numbers in column wise
void display( ) : to display the array in a matrix form
Specify the class Composite giving details of the constructor(int,int), int isComposite(int), void
fill( ) and void display( ).
Define a main( ) function to create anobject and call all the functions accordingly to enable the task.

QUESTION 8) [10]
A class Encode has been defined to replace only the vowels in a word by the next corresponding
vowel and form a new word.
i.e. A -> E, E -> I, I -> O, O -> U, U -> A and a -> e, e -> i , i -> o, o -> u, and u -> a
Example:
Input :Institution
Output :Onstotatoun
Some of the members of the class are given below:
Class name : Encode
Data members/instance variables:
word : to store a word
length : integer to store the length of the word
new_word : to store the encoded word
Methods / Member functions:
Encode( ) : default constructor to initialize data memberswith legal initial values
void acceptWord( ) : to accept a word
void nextVowel( ) : to replace only the vowels from the word storedin ‘word’ by the next
corresponding vowel and to assign it to ‘newword’, with the remaining
alphabets unchanged
void display( ) : to display the original word along with theencrypted word
Specify the class Encode giving details of the constructor( ), void acceptWord( ),
void nextVowel( ) and void display( ). Define a main ( ) function to create an object andcall the
functions accordingly to enable the task.

SECTION - C
Answer any two questions.

QUESTION 10) [5]


Write a program to input two numbers and check whether the numbers are Twin Prime.
Twin Prime numbers are the Prime Numbers whose difference is two(2). For e.g. (5,7), (11,13),
(17,19) ....... and so on.

QUESTION 11) [5]


Write a program to accept a number from the user and check it is an Automorphic Number.
Automorphic number is the number, which is contained in the last digit(s) of its square. For e.g. 25
is an automorphic number as its square is 625 and 25 is present as the last two digits.

QUESTION 12) [5]


Write a program to input a string and print the Piglatin string.
A string is said to be in Piglatin form when it is obtained by forming a new word by placing the fore
vowel of the original word at the start of the new word along with the letters following it. The letters
present before the first vowel are shifted to the end of the new word, followed by ‘ay’.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy