Draw the following.
| A | B | X |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Draw: The logic gate represented by the truth table
Must show: name of the gate, inputs A and B, output X
Show answer
Answer

The ISC Computer Science 2019 Question Paper for Class 12: all 32 questions, 70 marks in all, in printed order and in full. It is free to download: tap "Show answer" under a question to see its answer, or use the download button to save the questions as a PDF, with or without answers; "Print this paper" below prints it as it was set.
Draw the following.
| A | B | X |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Draw: The logic gate represented by the truth table
Must show: name of the gate, inputs A and B, output X
Answer

Answer the following in short.
Answer
Answer the following in short.
Answer
Answer the following in short.
Answer
Write the proposition asked for.
Answer
Write the proposition asked for.
Answer
Answer the following in short.
Answer
Solve the following.
Answer
Final answer: 1610
Answer the following in short.
Answer
Differentiate between the following.
Answer
Differentiate between the following.
Answer
What is the output of the following code?
Mystery( ) is a part of some class. What will the function Mystery( ) return when the value of num=43629, x=3 and y=4 respectively? Show the dry run/ working.
int Mystery( int num, int x, int y)
{
if(num<10)
return num;
else
{
int z = num % 10;
if( z % 2 == 0 )
return z*x + Mystery( num/10,x,y);
else
return z*y + Mystery( num/10,x,y);
}
}Answer
Answer the following for the given Boolean function.
Answer
Groups: (4, 5, 12, 13) → BC'; (2, 3, 10, 11) → B'C; (0, 4, 8, 12) → C'D'
Reduced expression: F = BC' + B'C + C'D'
Answer the following for the given Boolean function.
Draw: Logic gate diagram of the reduced expression using only NAND gates
Answer

Answer the following for the given Boolean function.
Answer
Groups: (0, 1, 8, 9) → (Q + R); (9, 11, 13, 15) → (P' + S'); (0, 2) → (P + Q + S)
Reduced expression: F = (Q + R)(P' + S')(P + Q + S)
Answer the following for the given Boolean function.
Draw: Logic gate diagram of the reduced expression using only NOR gates
Answer

Answer the following.
Answer
| A2 | A1 | A0 | D0 | D1 | D2 | D3 | D4 | D5 | D6 | D7 |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Study the circuit diagram and answer the question.
Draw: The logic gate that the simplified expression represents
Must show: name of the gate, inputs, output

Answer

Answer the following using a truth table.
Answer
| P | Q | P => Q | ~(P => Q) | ~P | ~P ∨ Q | ~(P => Q) <=> (~P ∨ Q) |
| 0 | 0 | 1 | 0 | 1 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 | 1 | 0 |
Result: Contradiction
Answer the following using a truth table.
| INPUTS | |
|---|---|
| O | Works overtime for more than 4 hours |
| F | Festival sales are on |
| H | Working on an off day/holiday |
| U | Updates showroom arrangements |
Answer
| O | F | H | U | X |
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
POS: (O+F+H+U)(O+F+H+U')(O+F+H'+U)(O+F+H'+U')(O+F'+H+U)(O'+F+H'+U)(O'+F+H'+U')
Answer the following.
Answer
Answer the following in short.
Answer
Write the program described below.
Answer
import java.util.Scanner;
class ArmNum
{
int n;
int l;
ArmNum(int nn)
{
n = nn;
l = String.valueOf(n).length();
}
int sum_pow(int i)
{
if (i == 0)
return 0;
else
{
int digit = i % 10;
return (int) Math.pow(digit, l) + sum_pow(i / 10);
}
}
void isArmstrong()
{
int s = sum_pow(n);
if (s == n)
System.out.println(n + " is an Armstrong number.");
else
System.out.println(n + " is not an Armstrong number.");
}
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a number: ");
int nn = sc.nextInt();
ArmNum obj = new ArmNum(nn);
obj.isArmstrong();
}
}Explanation: the constructor stores the number n and its length l (number of digits, found via String.valueOf(n).length()). sum_pow(i) recursively strips the last digit of i at each call (i%10), raises it to the power l (the length of the original number, a fixed value throughout the recursion), and adds it to the recursive call on the remaining digits (i/10), stopping when i becomes 0. isArmstrong() compares this sum to n and prints the appropriate message. Tested (run for real): for n=371, sum_pow computes 3^3+7^3+1^3=371 and the program correctly printed "371 is an Armstrong number."Write the program described below.

Answer
import java.util.Scanner;
class MatRev
{
int arr[][];
int m, n;
MatRev(int mm, int nn)
{
m = mm;
n = nn;
arr = new int[m][n];
}
void fillarray()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter " + (m * n) + " elements:");
for (int i = 0; i < m; i++)
for (int j = 0; j < n; j++)
arr[i][j] = sc.nextInt();
}
int reverse(int x)
{
int rev = 0;
while (x != 0)
{
rev = rev * 10 + x % 10;
x = x / 10;
}
return rev;
}
void revMat(MatRev P)
{
for (int i = 0; i < m; i++)
for (int j = 0; j < n; j++)
arr[i][j] = reverse(P.arr[i][j]);
}
void show()
{
for (int i = 0; i < m; i++)
{
for (int j = 0; j < n; j++)
System.out.print(arr[i][j] + "\t");
System.out.println();
}
}
public static void main(String args[])
{
MatRev A = new MatRev(3, 3);
A.fillarray();
MatRev B = new MatRev(3, 3);
B.revMat(A);
System.out.println("Original matrix:");
A.show();
System.out.println("Reversed matrix:");
B.show();
}
}Explanation: reverse(x) reverses the digits of a single integer x using the standard while-loop technique. revMat(P) takes another MatRev object P as a parameter, and for every cell (i,j) stores in the current object's arr the reverse of P's corresponding element, leaving P itself unchanged. Tested (run for real) with the example matrix {{72,371,5},{12,6,426},{5,123,94}}: the program correctly produced the reversed matrix {{27,173,5},{21,6,624},{5,321,49}}, matching the example exactly.Write the program described below.
Answer
import java.util.Scanner;
class Rearrange
{
String wrd, newwrd;
Rearrange()
{
wrd = "";
newwrd = "";
}
void readword()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a word in UPPER CASE: ");
wrd = sc.nextLine();
}
void freq_vow_con()
{
int vcount = 0, ccount = 0;
for (int i = 0; i < wrd.length(); i++)
{
char ch = wrd.charAt(i);
if (ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U')
vcount++;
else
ccount++;
}
System.out.println("Number of vowels: " + vcount);
System.out.println("Number of consonants: " + ccount);
}
void arrange()
{
String vowels = "";
String consonants = "";
for (int i = 0; i < wrd.length(); i++)
{
char ch = wrd.charAt(i);
if (ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U')
vowels = vowels + ch;
else
consonants = consonants + ch;
}
newwrd = vowels + consonants;
}
void display()
{
System.out.println("Original word : " + wrd);
System.out.println("Rearranged word : " + newwrd);
}
public static void main(String args[])
{
Rearrange obj = new Rearrange();
obj.readword();
obj.freq_vow_con();
obj.arrange();
obj.display();
}
}Explanation: freq_vow_con() scans wrd once and counts vowels and consonants, printing both counts. arrange() scans wrd character by character, appending each vowel to a separate 'vowels' string and each consonant to a 'consonants' string (preserving their original relative order within each group), then sets newwrd = vowels + consonants so all vowels come first followed by all consonants. Tested (run for real): for wrd="ORIGINAL" the program printed "Number of vowels: 4", "Number of consonants: 4", and Rearranged word "OIIARGNL", matching the example in the question exactly.Write the program described below.
Answer
class Highest extends Record
{
int ind;
Highest(int cap)
{
super(cap);
ind = 0;
}
void find()
{
ind = 0;
for (int i = 1; i < size; i++)
{
if (m[i] > m[ind])
ind = i;
}
}
void display()
{
super.display();
find();
System.out.println("Student(s) with the highest mark:");
for (int i = 0; i < size; i++)
{
if (m[i] == m[ind])
System.out.println(n[i] + "\t" + m[i]);
}
}
}Explanation: the parameterised constructor passes cap up to the superclass via super(cap) so that Record's constructor allocates the n[] and m[] arrays of the given size, then initialises ind. find() scans the inherited marks array m[] (indices 0 to size-1) and stores in ind the index of the largest mark. display() first calls super.display() to reuse the superclass's printing of all the array elements, then calls find() and prints the name(s) and mark of the student(s) with the highest mark (handling ties, i.e. more than one student sharing the highest mark). Tested (run for real, with a small Record superclass and main added only for testing) with names/marks {AMIT:78, SUMIT:95, ROHIT:95, MOHIT:60}: the program correctly identified and printed both SUMIT and ROHIT (95) as the students with the highest mark.Answer the following about the data structure described.
Answer
void pushadd(String n)
{
if (end == size)
System.out.println("NO SPACE");
else
{
Q[end] = n;
end++;
}
}
String popadd()
{
if (start == end)
return "?????";
else
{
String val = Q[start];
start++;
return val;
}
}Explanation: pushadd(String) checks whether end has reached size (diary full) before storing the address n at index end and incrementing end; otherwise it prints "NO SPACE". popadd() checks whether the diary is empty (start==end), returning "?????" in that case; otherwise it returns the address at index start and advances start, so addresses always leave from the front in the order they were added. Tested (run for real, capacity 3): after 3 successful pushadd calls a 4th correctly printed "NO SPACE"; popadd() correctly returned the addresses in FIFO order and finally returned "?????" once the diary was emptied.Answer the following about the data structure described.
Answer
Write the program described below.
class Node
{
int num;
Node next;
}
Write an Algorithm OR a Method to find and display the sum of even integers from an existing linked list.
The method declaration is as follows:
void SumEvenNode( Node str )Answer
void SumEvenNode(Node str)
{
int sum = 0;
Node temp = str;
while (temp != null)
{
if (temp.num % 2 == 0)
sum = sum + temp.num;
temp = temp.next;
}
System.out.println("Sum of even integers = " + sum);
}(Verified by running the code: for a list 3->4->7->10->5, the method correctly printed "Sum of even integers = 14", i.e. 4+10.)Answer the following questions from the binary tree.
Answer
Answer the following questions from the binary tree.
Answer
Answer the following questions from the binary tree.
Answer
The ISC Computer Science 2019 Question Paper is a board paper for Class 12: 32 questions in printed order, 70 marks in all, asked from 8 chapters. The board paper is the exam itself: the question paper CISCE set for that year’s ISC candidates. Solve it in one sitting, in the time allowed, to see how questions are worded and how hard the real paper is.
The layout of the current Computer Science paper (sections, marks, choices) is in the paper pattern guide.
| Kind | Questions | Marks printed* |
|---|---|---|
| Program | 6 | 41 |
| Short answer | 9 | 11 |
| K-map | 2 | 8 |
| Long answer | 2 | 8 |
| Truth table | 2 | 7 |
| Drawing | 4 | 6 |
| Output | 1 | 5 |
| Differentiate | 2 | 4 |
| Binary tree | 3 | 3 |
| Numerical | 1 | 2 |
| Chapter | Questions | Marks printed* |
|---|---|---|
| Objects | 3 | 30 |
| Boolean Algebra | 12 | 23 |
| Data structures | 8 | 14 |
| Computer Hardware | 4 | 12 |
| Inheritance, Interfaces and Polymorphism | 2 | 7 |
| Recursion | 1 | 5 |
| Arrays, Strings | 1 | 2 |
| Complexity and Big O notation | 1 | 2 |
* Marks are those printed on each question; where a question offers an either-or choice, both options are counted, so the totals can come to more than the paper’s own total.
32 questions, 70 marks in all, shown in full and in printed order on this page.
By number of questions: Boolean Algebra (12), Data structures (8), Computer Hardware (4) and Objects (3).
Tap “Show answer” under a question to see its answer. The download button saves the paper as a PDF, with or without the answers.