Sample PapersISCClass 12Computer Science

ISC Class 12 Computer Science Pre-board Papers (70 Marks)

Two ISC Class 12 Computer Science pre-board papers of 70 marks: an objective paper on Boolean algebra, propositional logic and K-maps, and a full three-hour theory paper with Parts I and II. Free PDF download with worked Boolean algebra examples.

7 min read
ISC Class 12 Computer Science Pre-board Papers (70 Marks)

Pre-boards show you exactly where you stand before the ISC board exam. This post has two ISC Class 12 Computer Science pre-board papers set by Trushna Tejwani, both out of 70 marks like the real theory paper.

Papers included

  1. Pre-board 1 (objective, 70 marks): objective questions on Boolean laws, duals and minterms, propositional logic (such as working with ~P ⇒ ~Q), Karnaugh maps, and Java programming concepts.
  2. Pre-board II (theory, 70 marks, 3 hours): a full paper in the classic ISC format. Part I is compulsory. In Part II you choose two questions each from Section A (Boolean algebra), Section B (Java programming) and Section C (data structures).

Worked examples from Pre-board 1

Q1. A + (B + C) = (A + B) + C is which law?

The Associative law: the grouping of the terms does not change the result.

Q2. Write the dual of (A + 1)(B + 0)(A' + B').

To find the dual, swap + with ·, and swap 0 with 1:

(A + 1)·(B + 0)·(A' + B')
dual → (A·0) + (B·1) + (A'·B')

Q3. If A = 0, B = 1, C = 0 and D = 1, what is the minterm?

In a minterm, a variable with value 1 is written as it is, and a variable with value 0 is complemented. So the minterm is A'·B·C'·D. A maxterm does the opposite and joins the terms with +, which gives (A + B' + C + D').

How to attempt a pre-board

  • Time it. Give yourself exactly 3 hours for Pre-board II, including about 15 minutes to plan your choices in Part II.
  • Section A: always draw the full K-map grid and label each group. Step marks are awarded.
  • Section B: write the class description (data members and methods) before the code, and use recursion where the question asks for it.
  • Section C: for stacks, queues and linked lists, write complete methods or clear algorithm steps.

After you finish, compare your work with our fully solved ISC Class 12 Computer Science Sample Paper 2027, and revise from the ISC Class 12 recursion programs guide.

Download the papers

ISC Class 12 Pre-board 1 (objective)

PDF · 140 KB

Download PDF

ISC Class 12 Pre-board II (theory)

PDF · 396 KB

Download PDF
Read the questions as text
ISC Class 12 Pre-board 1 (objective) Standard: XII Subject: Computer Max Marks: 70 ___________________________________________________________________________ 1. A+(B+C)=(A+B)+C is [1] A. Commutative law C. Associative law B. Involution law D. Distributive law 2. The dual of (A+1)(B+0)(A'+B') [1] A. (A+1)+(B.1)+(A'.B) C. (A+.0)+(B’+1)+(A.B') B. (A.0)+(B.1)+(A'.B') D. none 3. If A=0, B=1, C=0 and D=1, then the minterm will be: [1] A. A'BC'D C. A+B’+C’+D B. A’BCD’ D. A’+B+C+D’ 4. Select the complement of A+(B’C+ABC) [1] A. (A+B+A.C’)(A+B+C) C. (AB+AC)(A’+B’+C’) B. (A’B+A’C’)(A’+B’+C’) D. None 5. The proposition operator represents: [1] A. Implication C. Conjunction B. Equivalence D. Disjunction 6. Decoders are used for: [1] A. Adding two bits C. Converting Binary to Decimal B. Converting Decimal to Binary D. Data transmission 7. EXOR gate is formed by the combinations of: [1] B. AND gate, OR gate and NOT gate D. NAND gate and NOT gate C. OR gate and NOT gate E. AND gate and NOT gate 8. The combinational circuit which adds three binary bits is: [1] A. Full Adder C. Half Adder B. Decoder D. Multiplexer 9. The Octet group in a Karnaugh’s map eliminates: [1] A. Four variables C. two variables B. three variables D. one variable 10. The logical XNOR operation can be written as _____________ [1] A. (A'B+AB')' C. AB+AB B. (AB+A'B')' D. None 11. If the input in a Encoder is A’B'C’D, then the decimal equivalent output will be: [2] A. 8 B. 10 C. 5 D. 14 Page 1 of 9 12. A matrix ARR[-4 ….. 6, 3 ……. 8] is stored in the memory with each element requiring 4 bytes of storage. If the base address is 1430, find the address of ARR[3] [6] when the matrix is stored in Row Major Wise. [2] A. 1610 B. 1620 C. 1822 D. 1820 13. With reference to the given proposition ~P => ~Q , answer the following questions: i. the converse of the proposition is: [1] A. Q => P B. ~Q => ~P C. P => Q D. ~Q => P ii. The Inverse of the proposition is: [1] A. Q => P B. ~Q => ~P C. P => Q D. ~Q => P 14. The reduced expression for the Boolean expression F(A,B,C) = ∑(0,1,2,4,5,6) is: [2] A. B'+C' C. B+CA B. B'+C'A' D. None of the above 15. What is the output of the code given below? int sum = 2; for(int i = 2; i <= 5; i++ ) { for(int j = 7; j <= 9; j++ ) { sum += ( i * j); } } System.out.println("sum = " + sum); A. 144 B. 12345 C. 3 A. 338 40 16. What is the output of the statement given below? System.out.println(Integer.parseInt("145"+'Z'); A. 145+90 B. 235 C. 144Z 17. What is the output of the statement given below? System.out.println('5'+'D'+'B'); [2] [2] D. Error [2] Page 2 of 9 A. 145 B. 5+68+65 C. 5DB D. 187 18. Select the canonical SOP of the expression A+B [2] A. AB+AB’+A’B B. A’B’+AB C. A’B+AB’ D. None 19. P: We should be honest. Q:We should be dedicated. R: We should be overconfident. Then “We should be honest or dedicated but not over confident” is expressed by [2] A. ~PV~QVR B. ~P^~Q^ R C. P V QVR D. P V Q^ ~R 20. What is the conditional statement to check for the sum of right diagonal elements in a double dimensional array of ‘M’ number of rows and ‘M’ number of columns? The row index is represented by ‘r’ and the column index is represented by ‘c’ [2] A. ((r+c)==(M-1)) C. (r>0 || r<M-1 || c>0 || c<N-1) B. (r = = c) D. (r+c==0) 1. F(A, B, C, D) = Σ (0, 2, 4, 8, 9, 10, 12, 13) Reduce the above expression by using a 4-variable Karnaugh Map and answer the following questions. (i) What will be the least number of groups and their types formed for reduction? [1] A. 3 quads C. 1 quad and 2 pairs B. 6 pairs D. 2 quads and 1 pair (ii) The reduced expression of the Boolean function given above is: [2] A. (B+C).(B+D).(A’+D) C. AB’ + C’D’ + B’D’ B. C'D’ + AC’ + B’D’ D. (A+B’).(C’+D’).(B’+D’) 1. The Principal of a school intends to select students for admission to class XI on the following criteria: The student is of the same school and has passed the class X Board Examination with more than 60% marks. Or Students of the same school, has passed the class X Board Examination with less than 60% marks but has taken an active part in co-curricular activities. Or The student is not from the same school but has either passed the class X Board Examination with more than 60% marks or has participated in sports at the National Level. The inputs are: S Student of the same school. Page 3 of 9 P Has passed the class X Board Examination with more than 60% marks. C Has taken an active part in co-curricular activities. T Has participated in sports at the National Level. (b) Output: X-Denotes admission status [1 indicates granted and 0 indicates reduced in all the cases.] Draw the truth table for the inputs and outputs given above and answer the following questions. (i) The SOP expression for X(S,P,C,T) will be: [2] A. X(S,P,C,T) = ∑ (3, 5, 7, 11, 12, 13, 14, 15) D. X(S,P,C,T) = ∑ (1, 3, 5, 6, 7, 10, 11, 12, 13, B. X(S,P,C,T) = π (3, 5, 7, 11, 12, 13, 14, 15) 14, 15) C. X(S,P,C,T) = π (0, 1, 2, 4, 6, 8, 9, 10) (ii)The maximum input combinations for the above truth table will be: [1] A. 24 B. 16 C. 8 D. 4 1. F (P, Q, R, S) =π (0, 1, 2, 4, 5, 6, 8, 10).Reduce the above expression by using a 4-variable Karnaugh Map and answer the following questions. (i) What will be the least number of groups and their types formed for reduction? [1] A. 3 quads B. 6 pairs C. 1 quad and 2 pairs D. 2 quads and 1 pair (ii) The reduced expression of the Boolean function given above is: [2] A. (R' + S')(P' + S')(P' + Q') C. (P'+S')(Q+R')(Q+S) B. (S)(Q'+P)(R+S) D. (P+S)(Q'+P')(Q'+S) 1. From the logic diagram given above, where A,B and C are inputs and F is the output, answer the following questions: (i)The expression at (1) is: [1] A. A.B B. A’+B’ C. A+B’ D. A+B (ii)The expression at (2) is: [1] A. A+B.C’ B. ((A+B)’.C)’ C. ((A+B).C)’ D. (A.B)+C (iii)The final expression F(A,B,C) is: [1] A. F=((A+B)’.C)’ + (A+B) C. F=( (A+B).C) + (A+BC)+(A+AB) B. F= (A+B)’.(C+A+B) D. F= (BC + B) +(A+AB)+(AB+C) Page 4 of 9 1. Given the Boolean expression A’B’+AB(C+D) A. Select the complement of [2] B. (A’B’)[(A+B’)+C’D’] D. (A+B)[(A’+B’)+C’D’] C. (A+B)[(A.B)+CD] E. None A. The expression of the De morgan’s law is [1] B. (A.B)’=A’+B’ D. (A+B)(A.B)=(A’+B’).(A’.B’) C. (A+B)’=A’.B’ E. Both A and B 1. With reference to the program code given below, answer the questions that follow: static boolean isSomething(int num) { boolean flag = true; for (int i = 2; i <= (num / 2); i++) { if (num % i == 0) { flag = false; break; } } return flag; } (i)What is the output of the method isSomething() when the value of n=4? [2] A. true B. false C. 1 D. ERROR (ii)What is the method isSomething() performing? [1] A. Checking for Prime Numbers C. Factors of a number B. Product of odd numbers D. Finding the factorial 1. With reference to the program code given below, answer the questions that follow: public static int fun(int number) { int renum = 0; while (number > 0) { rnum = (renum * 10) + number % 10; number /= 10; } return renum; } (i) What is the output of the method fun() when the value of n=234? [2] A. 2 3 4 B. 432 C. 342 D. ERROR (ii)What is the method fun() performing? [1] Page 5 of 9 A. Checking for Prime Numbers C. Factors of a number B. Reversing a number D. Finding the factorial 1. With reference to the program code given below, answer the questions that follow: public static void list(int SNum) { int[] num = new int[SNum]; num[0] = 0; num[1] = 1; for (int i = 2; i < SNum; i++) { num[i] = num[i - 1] + num[i - 2]; } for (int i = 0; i < SNum; i++) { System.out.print(num[i] + " "); } } (i)What is the output of the method list() when the value of n=6? [2] A. 0 1 1 2 3 5 B. 1 2 3 4 5 6 C. 12 D. ERROR (ii)What is the method list() performing? [1] A. Printing fibonacci series C. Printing Factors of a number B. Reversing a number D. Finding the factorial 29. With reference to the program code given below, answer the questions that follow: public static int task(int num) { int n=num; int temp=num; int length = 0; while(n != 0){ length = length + 1; n = n/10; } while(num > 0) { rem = num%10; sum = sum + Math.pow(rem,len); num = num/10; len = len - 1; } if(sum==temp) return 1; else return 0; Page 6 of 9 } (a)What will the method test() return when the value of n=175? [2] (i)1 (ii)true (iii)0 (iv)Error (b) What is the method test() performing? [1] (i)Disarium number (iii)Palindrome number (ii)Armstrong number (iv)Perfect number 30. int PRO(int n) { int res = 1; while (n % 2 == 0) n = n / 2; for (int i = 3; i <= Math.sqrt(n); i++) { int count = 0, curr_sum = 1; int curr_term = 1; while (n % i == 0) { count++; n = n / i; curr_term *= i; curr_sum += curr_term; } res *= curr_sum; } if (n >= 2) res *= (1 + n); return res; } (a)What will the method PRO() return when the value of n=30? [2] (i)1 (ii)true (iii)24 (iv)30 (b) What is the method PRO() performing? [1] (i)Sum of odd factors (ii)Sum of even factors (iii)Sum of primefactors (iv)Perfect number 31. The following program code checks if the positive integer ‘num’ is a perfect number by returning true or false. There are some places in the code marked as ?1?, ?2?, ?3?,?4? and ?5? which are to be replaced by a statement/expression so that the code works properly. public int isperfect (int num) { int sum=?1?; { for(int i=1;?2?;i++) Page 7 of 9 { if(?3?==0) sum+=i; } } if(sum==?4?) return true else return ?5?; } Answer the following question: (a) What is the statement or expression at ?1? (i) -1 (ii) 0 (b) What is the statement or expression at ?2? (i) i<n (ii) i<=n (c) What is the statement or expression at ?3? (i) num (ii) num/i (d)What is the statement or expression at ?4? (i) num+i (ii) num*num (e) What is the statement or expression at ?5? (i) 1 (ii) 100 (iii) 10 (iii) i==n (iii) num%i (iii) F (iii) false [1] (iv) 2 [1] (iv) i*10 [1] (iv) num * 1 [1] (iv) num [1] (iv) true 32. The following program code sorts a single dimensional array in ascending order using bubble Sort technique. There are some places in the code marked as ?1?, ?2?, ?3?, ?4? and ?5? which are to be replaced by a statement/expression so that the code works properly. public static void BubbleSort(int arr[]) { int len=?1?; for(int i=0;i<?2?;i++) { for(int j=0;j<?3?;j++) { if(arr[j]>?4?) { temp=arr[j]; ?5?=arr[j+1]; arr[j+1]=temp; } } } } Answer the following question: (a)What is the statement or expression at ?1? [1] Page 8 of 9 A. array.length() B. arr.length C. length D. -1 (b)What is the statement or expression at ?2? A. len B. len-1 (c)What is the statement or expression at ?3? A. key B. len-i-1 (d) What is the statement or expression at ?4? A. j+1 B. key C. array[j] C. len C. array[j+1] [1] D. 0 [1] D. len-1 [1] D. array[i] (e) What is the statement or expression at ?5? A. array[i+1] B. i+1 C. j [1] D. array[j] Page 9 of 9 ―――――――――― ISC Class 12 Pre-board II (theory) SNV International School, Nadiad Pre Board-II – Jan’2018 Standard: 12 Subject: Computer Max Marks: 70 Date: 29/01/18 Max. Time 3 hours ------------------------------------------------------------------------------------------------------------------------- ------------------------------ 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 Question 1. Answer all questions [ 1 x 5 = 5] a) State the two distributive laws of Boolean Algebra. Prove any one of them with the help of truth table. b) Using truth table, verify whether the following is true or false: (p →q) = (q’→p’) c) Find the complement of the following: [(xy)’.x][(xy)’.y] d) Simplify the following Boolean expression using laws of Boolean Algebra. At each step, clearly state the law used for simplification. z(z+x).x(y+y’) e) Given F(x,y,z)= xz+xy +yz Write the function in canonical sum of product form. Question 2. [ 2 x 5 = 10] a) What do LIFO and FIFO stand for? b) For an array of real numbers x[-6…8, -12…. 20], find the address of x[5][4] , if x[1][1] is stored in location 100 in the column major order. Assume that each element requires 4 bytes. c) State the difference between an abstract class and an interface. d) Convert the following infix expression to its postfix form. b*[(a/d) – (c * (e-f))] e) Define a binary tree. Question 3. [5] The following is a function of some class. What will be the output of the function test( ) when the value of count is equal to 4?Show the dry run / working. class Sample { public void test( int count) { if(count == 0) System.out.println(" "); else { System.out.println("Bye " +count); test(--count); System.out.println(" "+ count); } } } 1 Part II 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 4. a) Given F(P,Q,R,S)= ∏(0,1,2,3,5,7,8,9,10,11) 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] b) Given P(A,B,C,D)= ABC’D’ + A’BC’D’+ A’BC’D+ ABC’D+A’BCD+ABCD 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) Draw the truth table and logic circuit diagram for a 3X 8 decoder. [5] b) What do you understand by a multiplexer? State any one application of a multiplexer circuit. [2] c) Draw the logic gate diagram to implement the AND gate by using NOR gate and NAND gate. [3] Question 6 The main safe in the nationalize bank can be opened by means of a unique password consisting of three parts. Different parts of the password are held by the chairman, Regional Manager, Bank Manager and Head Cashier of the bank, respectively. In order to open the safe any one of the following conditions must be satisfied: The password of the chairman, together with passwords of any two other officials, must be entered. OR The password of all three bank officials, excluding the chairman, must be entered. The inputs are: INPUTS A Denotes the chairman’s password B Denotes the Regional Manager’s password C Denotes the Bank Manager’s password D Denotes the Head Cashier’s password Output X Denotes the safe can be opened [ 1 indicates YES ad 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(A,B,C,D). b) Reduce X(A,B,C,D) using Karnaugh’s map, if possible. Draw the logic gate diagram for the reduced SOP expression for X(A,B,C,D) using AND and OR gates. You may use gates with two or more inputs. Assume that the variable and their complements are available as inputs. [10] 2 Section B Answer two questions Each program should be written in such a way that it clearly depicts the logic of the problem. use mnemonic names and comments in the program. (Flowcharts and algorithms are not required) The programs must be written in Java. Question 7. 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 n : stores an integer number Member functions Perfect() : default constructor Perfect(int) : parameterized constructor to assign 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 = n. (The number n=15 can be expressed as : 12345 456 78 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. [ 10 ] Question 8. 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. 3 Specify the class VowelWord giving details of the constructors and all the functions. Also write the main function. [10] Question 9. A Transpose of any array is obtained by interchanging the elements of the rows and columns. 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 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 fillaray() : to enter the elements of the matrix void transpose(Transarray A) : to find the transpose of a given matrix void disparray() : displays the array in a matrix form Specify the class Transarray giving the details of the constructor and other member functions. You need not to write the main function. [10] Section C Answer any 2 questions. Each program/algorithm 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 pseudo codes. (Flowcharts are not required) The programs must be written in Java. The algorithm must be written in general standard form wherever required. Question 10. A class Author contains details of the author and another class BookList contains details of the books written by him. The details of the 2 classes are given below: Class name : Author Data members authorno : stores the author’s number name : stores the author’s name Member functions Author() : default constructor Author(…..) : parameterized constructor to assign values to author number and name. void show() : to display the author’s details. 4 Class name : Booklist Data members bookno : long type variable to store the book number. bookname : stores the book name price : float variable to store price edition : integer type variable to store the edition number Member functions Booklist(…..) : parameterized constructor to assign values to data members of both the classes. void show() : to display all the details. Specify the class Author giving details of the constructors and member function void show(). Using the concept of inheritance, specify the class Booklist giving details of the constructor and the member function void show(). Also define the main function to create an object and call methods accordingly to enable the task. [5] Question 11. In a computer game, a vertical column and a pile of rings are displayed. The objective of the game is to pile up rings on the column till it is full. It can hold 10 rings at the most. Once the column is full, the rings have to be removed from the top till the column is empty and the game is over. Define the class RingGame with the following details: Class Name : RingGame Data members ring[] : array to hold rings (integer) max : integer to hold maximum capacity of ring array upper : integer to point to the uppermost element Member functions RingGame(int m) : constructor to initialize, max = m & upper to -1. void jump-in(int) : adds a ring to the top of the column, if possible, otherwise, displays a message “Column full. Start removing rings”. void jump-out() : removes the ring from the top, if column is not empty, otherwise outputs a message, “Congratulations the game is over “. Specify the class RingGame giving details of the constructor and functions void jump-in(int) and void jump-out(). Also define the main function to create an object and call methods accordingly to enable the task. [5] 5 Question 12. a) A linked list is formed from the objects of the class. [2] class Node { int info; Node link; } Write an algorithm OR a method for deleting a node after ‘n’ nodes from a linked list. The method declaration is given: void deletenode(Node start, int n). (c) Answer the following from the diagram of a binary Tree [3] A B C D E F G H (i) Write the postorder tree traversal. (ii) Name the root of the right subtree (iii) Level of the tree. 6