Answer the following using a truth table.
Show answer
Answer
| P | P ∨ P | P ∨ P <=> P |
| 0 | 0 | 1 |
| 1 | 1 | 1 |
The ISC Computer Science 2017 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 using a truth table.
Answer
| P | P ∨ P | P ∨ P <=> P |
| 0 | 0 | 1 |
| 1 | 1 | 1 |
Answer the following question.
Answer
Answer the following question.
Answer
Draw the following.
Draw: Logic diagram and truth table for a 2-input XNOR gate
Answer
| A | B | F |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |

Answer the following question.
Answer
Answer the following question.
Answer
Answer the following question.
Answer
Convert the following notation as directed.
Answer
Answer the following question.
Answer
Final answer: 2256
Answer the following question.
for (int x = 1; x <= a; x++)
{
statements;
}
for (int y = 1; y <= b; y++)
{
for (int z = 1; z <= c; z++)
{
statements;
}
}Answer
Answer the following question.
Answer
Differentiate between the following.
Answer
What is the output of the following code?
magicfun() is a part of some class. What will the function magicfun() return, when the value of $n=7$ and $n=10$, respectively? Show the dry run/working:
int magicfun(int n)
{
if (n == 0)
return 0;
else
return magicfun(n / 2) * 10 + (n % 2);
}Answer
Reduce the following using a Karnaugh map.
Answer
Groups: (4, 5, 6, 7) → A'B; (2, 3, 10, 11) → B'C; (8, 10) → AB'D'
Reduced expression: F = A'B + B'C + AB'D'
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: (0, 1, 4, 5) → (P + R); (0, 2, 4, 6) → (P + S); (0, 2, 8, 10) → (Q + S)
Reduced expression: F = (P + R)(P + S)(Q + S)
Reduce the following using a Karnaugh map.
Draw: Logic gate diagram for the reduced expression
Answer

Answer the following using a truth table.
| INPUTS | |
| A | participated in a competition earlier |
| B | is very creative |
| C | won prize in an inter-house competition |
| D | has excellent general awareness |
Answer
| A | B | C | D | X |
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 |
| 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 |
POS: (A+B+C+D)(A+B+C+D')(A+B+C'+D)(A+B'+C+D)(A+B'+C'+D)(A'+B+C+D)(A'+B+C+D')(A'+B+C'+D)
Draw the following.
Draw: Circuit diagram for a Half Adder
Answer
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |

Convert the following notation as directed.
Answer
Draw the following.
Draw: Circuit diagram for an 8:1 Multiplexer
Answer

Prove the following using Boolean laws.
Given: $(x' + z) + [(y' + z) \cdot (x' + y)]'$
To show: 1
Answer
Answer the following question.
Answer
Write the program described below.
Answer
import java.util.Scanner;
class Palin
{
int num; // number to be checked
int revnum; // reverse of the number
Palin()
{
num = 0;
revnum = 0;
}
void accept()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a positive number: ");
num = sc.nextInt();
}
// reverses y recursively and stores the result in revnum
int reverse(int y)
{
if (y == 0)
return revnum;
revnum = revnum * 10 + y % 10;
return reverse(y / 10);
}
void check()
{
revnum = 0;
reverse(num);
if (num == revnum)
System.out.println(num + " is a Palindrome number");
else
System.out.println(num + " is not a Palindrome number");
}
public static void main(String args[])
{
Palin obj = new Palin();
obj.accept();
obj.check();
}
}Explanation: the constructor sets num and revnum to 0. reverse(y) takes the last digit of y (y % 10), appends it to revnum (revnum * 10 + digit) and calls itself with y / 10 until y becomes 0, when it returns revnum. check() resets revnum, calls reverse(num) and compares num with revnum. Tested by running: input 12321 printed "12321 is a Palindrome number".Write the program described below.
Answer
import java.util.Scanner;
class Adder
{
int a[] = new int[2]; // a[0] = hours, a[1] = minutes
Adder()
{
a[0] = 0;
a[1] = 0;
}
void readtime()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter hours: ");
a[0] = sc.nextInt();
System.out.print("Enter minutes: ");
a[1] = sc.nextInt();
}
void addtime(Adder X, Adder Y)
{
a[1] = X.a[1] + Y.a[1];
a[0] = X.a[0] + Y.a[0] + a[1] / 60; // carry of minutes goes to hours
a[1] = a[1] % 60;
}
void disptime()
{
System.out.println("hours = " + a[0] + " and minutes = " + a[1]);
}
public static void main(String args[])
{
Adder A = new Adder();
Adder B = new Adder();
Adder C = new Adder();
System.out.println("Enter Time A:");
A.readtime();
System.out.println("Enter Time B:");
B.readtime();
C.addtime(A, B);
System.out.println("Sum of the two times:");
C.disptime();
}
}Explanation: addtime() adds the minutes of X and Y, adds the hours plus the carry (minutes / 60) and keeps the remainder (minutes % 60) as the minutes of the calling object. Tested by running: 6 h 35 min + 7 h 45 min gives hours = 14 and minutes = 20.Write the program described below.
Answer
import java.util.Scanner;
class SwapSort
{
String wrd, swapwrd, sortwrd;
int len;
SwapSort()
{
wrd = "";
swapwrd = "";
sortwrd = "";
len = 0;
}
void readword()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a word in UPPER CASE: ");
wrd = sc.next();
len = wrd.length();
}
void swapchar()
{
if (len > 1)
swapwrd = wrd.charAt(len - 1) + wrd.substring(1, len - 1) + wrd.charAt(0);
else
swapwrd = wrd;
}
void sortword()
{
char ch[] = wrd.toCharArray();
for (int i = 0; i < len - 1; i++)
{
for (int j = 0; j < len - 1 - i; j++)
{
if (ch[j] > ch[j + 1])
{
char t = ch[j];
ch[j] = ch[j + 1];
ch[j + 1] = t;
}
}
}
sortwrd = new String(ch);
}
void display()
{
System.out.println("Original word : " + wrd);
System.out.println("Swapped word : " + swapwrd);
System.out.println("Sorted word : " + sortwrd);
}
public static void main(String args[])
{
SwapSort obj = new SwapSort();
obj.readword();
obj.swapchar();
obj.sortword();
obj.display();
}
}Explanation: swapchar() builds the new word as last character + middle part + first character. sortword() copies the word into a char array and sorts it with bubble sort, then stores it as a String in sortwrd. Tested by running: input HELLO gives swapped word OELLH and sorted word EHLLO.Write the program described below.
Answer
class Sales extends Product
{
int day;
double tax, totamt;
Sales(String n, int c, double p, int d)
{
super(n, c, p); // assigns name, code and amount of the super class
day = d;
tax = 0.0;
totamt = 0.0;
}
void compute()
{
double fine = 0.0;
tax = amount * 12.4 / 100; // service tax @ 12.4%
if (day > 30)
fine = amount * 2.5 / 100; // fine @ 2.5% only if paid after 30 days
totamt = amount + tax + fine;
}
void show()
{
super.show();
System.out.println("Total amount: " + totamt);
}
}Explanation: the constructor uses super(n, c, p) to set the data members of Product and then sets day. compute() calculates the service tax, the fine only when day > 30, and the total amount as amount + tax + fine. show() calls the super class show() and then displays totamt. Tested by running with amount 1000: 25 days gives total 1124.0 and 40 days gives total 1149.0.Write the program described below.
Answer
void addele(int v)
{
if (rear == size)
System.out.println("Overflow");
else
{
Que[rear] = v;
rear++;
}
}
int delele()
{
if (front == rear)
{
System.out.println("Underflow");
return -9999;
}
else
{
int v = Que[front];
front++;
return v;
}
}Explanation: elements are added at the rear and removed from the front. The queue is full when rear == size (Overflow) and empty when front == rear (Underflow, returning -9999). Tested by running with a queue of size 3: adding a 4th element printed Overflow, deleting 10, 20, 30 worked and a 4th delete printed Underflow and returned -9999.Write the program described below.
class Node
{
int num;
Node next;
}
Write an Algorithm OR a Method to count the nodes that contain only odd integers from an existing linked list and returns the count.
The method declaration is as follows:
int CountOdd( Node startPtr )Answer
int CountOdd(Node startPtr)
{
int count = 0;
Node ptr = startPtr;
while (ptr != null)
{
if (ptr.num % 2 != 0)
count++;
ptr = ptr.next;
}
return count;
}Explanation: start at the first node, visit every node until ptr becomes null, add 1 to count whenever the value of num is odd (num % 2 != 0, which also works for negative numbers) and finally return count. Tested by running: the list 5, 8, -3, 12, 7 gives 3 and an empty list gives 0.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 2017 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 | 42 |
| Drawing | 5 | 11 |
| Short answer | 8 | 9 |
| K-map | 2 | 8 |
| Truth table | 2 | 6 |
| Output | 1 | 5 |
| Conversion | 2 | 4 |
| Binary tree | 3 | 3 |
| Derivation | 1 | 3 |
| Differentiate | 1 | 2 |
| Numerical | 1 | 2 |
| Chapter | Questions | Marks printed* |
|---|---|---|
| Boolean Algebra | 13 | 26 |
| Arrays, Strings | 3 | 22 |
| Data structures | 6 | 12 |
| Objects | 2 | 12 |
| Computer Hardware | 3 | 9 |
| Inheritance, Interfaces and Polymorphism | 2 | 7 |
| Recursion | 1 | 5 |
| Complexity and Big O notation | 2 | 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 (13), Data structures (6), Arrays, Strings (3) and Computer Hardware (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.