Answer the following in short.
Show answer
Answer
The ISC Computer Science 2020 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.
Answer the following in short.
Answer
Answer the following in short.
Answer
Answer the following in short.
Answer
Answer the following in short.
Answer
| P | Q | P=>Q | ~P | Q=>~P | F |
| 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 | 1 |
Study the diagram and answer the question.

Answer
Study the diagram and answer the question.

Answer
Differentiate between the following.
Answer
Solve the following.
Answer
Final answer: 2206
Answer the following in short.
Answer
Answer the following in short.
Answer
Answer the following in short.
Answer
What is the output of the following code?
check( ) is a part of some class. What will the function check( ) return when the value of (i) n=25 and (ii) n=10. Show the dry run/ working.
int check(int n)
{
if(n<=1)
return 1;
if( n%2==0)
return 1 + check(n/2);
else
return 1 + check(n/2 + 1);
}Answer
Reduce the following using a Karnaugh map.
Answer
Groups: (0, 1, 2, 3, 8, 9, 10, 11) → B'; (0, 1, 4, 5, 8, 9, 12, 13) → C'; (8, 10, 12, 14) → AD'
Reduced expression: F = AD' + B' + C'
Reduce the following using a Karnaugh map.
Draw: Logic gate diagram for the reduced expression
Answer

Reduce the following using a Karnaugh map.
Answer
Groups: (9, 11, 13, 15) → (A' + D'); (4, 6, 12, 14) → (B' + D); (3, 11) → (B + C' + D')
Reduced expression: F = (A' + D')(B' + D)(B + C' + D')
Reduce the following using a Karnaugh map.
Draw: Logic gate diagram for the reduced expression
Answer

Draw the following.
Draw: Logic circuit diagram of an octal to binary encoder
Must show: inputs D0 to D7, outputs A, B, C
Answer

Draw the following.
Draw: Circuit of a two input XOR gate using only NOR gates
Answer

Answer the following in short.
Answer
Answer the following using a truth table.
| INPUTS | |
|---|---|
| A | Air conditioner is on |
| G | Geyser is on |
| R | Refrigerator is on |
| W | Water purifier is on |
Answer
| A | G | R | W | 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 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
SOP: X = A'GRW' + A'GRW + AG'R'W + AG'RW + AGR'W' + AGR'W + AGRW' + AGRW
Answer the following using a truth table.
Answer
| A | B | C | SUM | CARRY |
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |

Answer the following in short.
Answer
Write the program described below.
Answer
import java.util.Scanner;
class Convert
{
int n, d, m, y;
Convert()
{
n = 0;
d = 0;
m = 0;
y = 0;
}
void accept()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter day number: ");
n = sc.nextInt();
System.out.print("Enter year: ");
y = sc.nextInt();
}
void day_to_date()
{
int days[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
if ((y % 400 == 0) || (y % 100 != 0 && y % 4 == 0))
days[1] = 29;
int rem = n;
m = 0;
while (m < 12 && rem > days[m])
{
rem = rem - days[m];
m++;
}
d = rem;
m = m + 1;
}
void display()
{
String mn[] = {"January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"};
System.out.println(mn[m - 1] + " " + d + ", " + y);
}
public static void main(String args[])
{
Convert ob = new Convert();
ob.accept();
ob.day_to_date();
ob.display();
}
}Explanation: The constructor sets all data members to 0. accept() reads the day number and the year. day_to_date() first checks whether the year is a leap year (divisible by 400, or divisible by 4 but not by 100) and sets February to 29 days if so. It then subtracts the days of each month from the day number as long as the remaining number is larger than that month's days; what remains is the date d and the month is m + 1. display() prints the month name, date and year. Tested: for day number 64 and year 2020 the output is March 4, 2020, matching the example (31 + 29 + 4 = 64).Write the program described below.
Answer
import java.util.Scanner;
class BinSearch
{
int arr[];
int n;
BinSearch(int nn)
{
n = nn;
arr = new int[n];
}
void fillarray()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter " + n + " elements:");
for (int i = 0; i < n; i++)
arr[i] = sc.nextInt();
}
void sort()
{
for (int i = 0; i < n - 1; i++)
{
for (int j = 0; j < n - 1 - i; j++)
{
if (arr[j] > arr[j + 1])
{
int t = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = t;
}
}
}
}
int bin_search(int l, int u, int v)
{
if (l > u)
return -1;
int mid = (l + u) / 2;
if (arr[mid] == v)
return mid;
else if (v < arr[mid])
return bin_search(l, mid - 1, v);
else
return bin_search(mid + 1, u, v);
}
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter the size of the array: ");
int size = sc.nextInt();
BinSearch ob = new BinSearch(size);
ob.fillarray();
ob.sort();
System.out.print("Sorted array: ");
for (int i = 0; i < size; i++)
System.out.print(ob.arr[i] + " ");
System.out.println();
System.out.print("Enter the value to search: ");
int v = sc.nextInt();
int pos = ob.bin_search(0, size - 1, v);
if (pos == -1)
System.out.println(v + " not found");
else
System.out.println(v + " found at index " + pos);
}
}Explanation: The constructor stores the size and creates the array. fillarray() reads the elements. sort() arranges them in ascending order using bubble sort (binary search needs a sorted array). bin_search(l, u, v) is recursive: if l > u the value is absent and -1 is returned; otherwise it compares v with the middle element and returns mid if equal, else searches the left half (l to mid-1) or the right half (mid+1 to u). Tested: for the array 45 12 89 7 33 60 the sorted array is 7 12 33 45 60 89 and searching 33 gives index 2.Write the program described below.
Answer
import java.util.Scanner;
class Mix
{
String wrd;
int len;
Mix()
{
wrd = "";
len = 0;
}
void feedword()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a word in UPPER CASE: ");
wrd = sc.next();
len = wrd.length();
}
void mix_word(Mix P, Mix Q)
{
String s = "";
int min = Math.min(P.len, Q.len);
for (int i = 0; i < min; i++)
s = s + P.wrd.charAt(i) + Q.wrd.charAt(i);
if (P.len > Q.len)
s = s + P.wrd.substring(min);
else
s = s + Q.wrd.substring(min);
wrd = s;
len = s.length();
}
void display()
{
System.out.println(wrd);
}
public static void main(String args[])
{
Mix a = new Mix();
Mix b = new Mix();
Mix c = new Mix();
a.feedword();
b.feedword();
c.mix_word(a, b);
c.display();
}
}Explanation: The constructor sets wrd to an empty string and len to 0. feedword() accepts a word in upper case and stores its length. mix_word(P, Q) takes characters alternately from P and Q for as many positions as the shorter word has, then appends the remaining characters of the longer word at the end, and stores the result in the current object. display() prints the word. Tested: for JUMP and STROLL the output is JSUTMRPOLL, matching the example.Write the program described below.
Answer
void push(int n)
{
if ((rear + 1) % cap == front)
System.out.println("QUEUE IS FULL");
else
{
cq[rear] = n;
rear = (rear + 1) % cap;
}
}
int pop()
{
if (front == rear)
return -9999;
int v = cq[front];
front = (front + 1) % cap;
return v;
}Explanation: front and rear both start at 0, so front == rear means the queue is empty. push() checks whether advancing rear (with wrap-around using % cap) would meet front; if so the queue is full and the message QUEUE IS FULL is shown (one position is kept unused to tell a full queue from an empty one). Otherwise the number is stored at cq[rear] and rear moves to the next position circularly. pop() returns -9999 when the queue is empty; otherwise it returns the element at front and moves front forward circularly. Tested with cap = 4: three pushes were accepted, the fourth printed QUEUE IS FULL, pops returned the elements in FIFO order, and a pop on the empty queue returned -9999.Differentiate between the following.
Answer
Write the program described below.
Answer
class CalVol extends Base implements Data
{
double ht;
CalVol(double r, double h)
{
super(r);
ht = h;
}
public double volume()
{
return pi * rad * rad * ht;
}
void show()
{
super.show();
System.out.println("Height = " + ht);
System.out.println("Volume of the cylinder = " + volume());
}
}Explanation: CalVol extends the class Base (to reuse rad and show()) and implements the interface Data (so it must define volume(), which has to be public, and can use the constant pi = 3.142). The constructor passes the radius to the super class constructor with super(r) and stores the height. volume() returns pi x rad x rad x ht, the volume of a cylinder. show() calls super.show() to display the radius, then displays the height and the volume. Note: the question's stem says cylinder while the method description says sphere; the given formula pi x radius^2 x height is that of a cylinder. Tested with stub Base and Data classes: for radius 3.5 and height 10 the volume printed is 384.895.Write the program described below.
class Node
{
int n;
Node next;
}
Write an Algorithm OR a Method to find the product of the integer numbers from an existing linked list.
The method declaration is as follows:
void Product_Node( Node str )Answer
void Product_Node(Node str)
{
if (str == null)
{
System.out.println("The list is empty");
return;
}
int p = 1;
Node t = str;
while (t != null)
{
p = p * t.n;
t = t.next;
}
System.out.println("Product = " + p);
}Explanation: p starts at 1 and a temporary reference t starts at the first node str. The loop multiplies p by the number stored in each node (t.n) and moves t to the next node until t becomes null, i.e. the end of the list. The product is then displayed. Tested: for the list 2, 3, 7 the output is Product = 42.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 2020 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 | 11 | 15 |
| Drawing | 4 | 10 |
| K-map | 2 | 8 |
| Truth table | 2 | 8 |
| Output | 1 | 5 |
| Binary tree | 3 | 3 |
| Differentiate | 2 | 3 |
| Numerical | 1 | 2 |
| Chapter | Questions | Marks printed* |
|---|---|---|
| Objects | 4 | 32 |
| Boolean Algebra | 11 | 23 |
| Data structures | 8 | 14 |
| Computer Hardware | 5 | 12 |
| Inheritance, Interfaces and Polymorphism | 1 | 5 |
| 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 (11), Data structures (8), Computer Hardware (5) and Objects (4).
Tap “Show answer” under a question to see its answer. The download button saves the paper as a PDF, with or without the answers.