ISC Class 11 Computer Science Evaluation II Sample Paper 2026-27 with Solutions
A full ISC Class 11 Computer Science Evaluation II paper for 2026-27 on Boolean algebra, propositional logic, number systems, the full adder, Java class design and Python, with a checked answer key and complete solutions.

This is a full ISC Class 11 Computer Science Evaluation II paper for 2026-27, followed by a complete, checked answer key. Part I tests Boolean algebra, propositional logic and Java output questions. Part II covers number-system conversions, a full adder and a scholarship truth table, three Java class-design programs (circular prime, matrix boundary and string encryption), and three short Python programs.
Attempt it in 3 hours, then compare your answers. All truth tables, conversions and programs are worked out in full below.

COMPUTER SCIENCE – EVALUATION II (2026-27)
Class XI | Maximum Marks: 100 | Time Allowed: Three Hours
Answer all questions from Part I (compulsory) and six questions from Part II, choosing two questions from each section. The intended marks for questions or parts of questions are given in brackets [ ].
PART I – 20 Marks (Answer all questions)
Question 1 [10 × 1]
(i) Which Boolean expression represents the XNOR gate?
- (a) A ⊕ B
- (b) (A ⊕ B)'
- (c) A + B
- (d) A.B
(ii) Which logical connective is used to represent 'implies'?
- (a) ∧
- (b) ∨
- (c) →
- (d) ↔
(iii) The dual of the Boolean expression A + (B.C) is:
- (a) A.(B + C)
- (b) A + B + C
- (c) A.B.C
- (d) A + (B + C)
(iv) The complement of F = A + B.C is:
- (a) A'.(B' + C')
- (b) A'.B'.C'
- (c) A' + B' + C'
- (d) A'.(B.C)
(v) Which law is represented by P + 0 = P?
- (a) Identity law
- (b) Complement law
- (c) Commutative law
- (d) Involution law
(vi) What is the output of the following code?
String state[] = {"GOA", "KERALA", "GUJARAT", "ODISHA", "PUNJAB"};
System.out.println(state[2].length() == state[4].length());
System.out.print(state[1].substring(2, 5));- (a) true RAL
- (b) false RAL
- (c) true KER
- (d) false KER
(vii) Which of the following is a contradiction?
- (a) X + X'
- (b) X.X'
- (c) X + Y
- (d) X
(viii) Assertion: Every contradiction is always false. Reason: The complement of a contradiction is a tautology.
- (a) Both true, R explains A
- (b) Both true, R does not explain A
- (c) A true, R false
- (d) A false, R true
(ix) Assertion: A truth table is used to determine the output of a logical proposition. Reason: A truth table lists all possible truth values.
- (a) Both true, R explains A
- (b) Both true, R does not explain A
- (c) A true, R false
- (d) A false, R true
(x) If P → Q, then its inverse is:
- (a) Q → P
- (b) P' → Q'
- (c) Q' → P'
- (d) P ↔ Q
Question 2
(a) Complete the palindrome method by writing the correct code at ?1? to ?5?. [5]
boolean palindrome(int n)
{
int rev = 0, temp = n;
while (?1?)
{
int d = ?2?;
rev = rev * 10 + ?3?;
temp = ?4?;
}
if (?5?) return true;
else return false;
}(b) Find the output of the following method when a = {{2,4,6},{1,5,3},{7,8,9}}. [2]
public static void display(int a[][])
{
int s = 0;
for (int i = 0; i < a.length; i++)
s = s + a[i][i];
System.out.println(s);
}(c) Construct the truth table for (P ∨ Q) → (P ∧ Q). [3]
PART II – 50 Marks
SECTION A (Attempt any two questions)
Question 3 – Perform the following [10]
- (a) (110101)₂ + (101011)₂
- (b) (111101)₂ − (100111)₂
- (c) (245.625)₁₀ to binary, octal and hexadecimal
- (d) (7254.34)₈ to binary, hexadecimal and decimal
- (e) (9AF)₁₆ + (4D6)₁₆
Question 4
(a) Explain the full adder with its truth table and logic diagram. [5]
(b) A college scholarship is granted to a student if any one of the following conditions is satisfied: [5]
- The student has scored 90% or above and belongs to the Economically Weaker Section (EWS), OR
- The student has represented the school at the national level in sports, OR
- The student has scored 90% or above and has won a state-level science competition.
Inputs: M – scored 90% or above, E – belongs to EWS, N – represented the school at the national level in sports, S – won a state-level science competition. Output: F – 1 if eligible, 0 otherwise. Draw the truth table and write the Sum of Products expression for F(M, E, N, S).
Question 5
(a) Verify using a truth table: (P → Q)' = P.Q' [5]
(b) Determine whether (P ∨ Q') → Q is a tautology, contradiction or contingency. [5]
SECTION B (Attempt any two questions)
Question 6 – CircularPrime [10]
A circular prime is a number that remains prime under all cyclic rotations of its digits. For example, 197 is a circular prime because 197, 971 and 719 are all prime. Design a class CircularPrime:
- Data member:
int num CircularPrime(int n): parameterised constructor to initialise numboolean isPrime(int n): returns true if n is primeint countDigits(int n): returns the number of digits in nint rotate(int n): moves the first digit to the last position and returns the rotated numbervoid checkCircular(): checks all rotations of num and displays whether it is a circular prime
Also define main() to create an object and call the methods.
Question 7 – MatrixBoundary [10]
The boundary elements of a square matrix are those in its first row, last row, first column and last column. Design a class MatrixBoundary:
- Data members:
int arr[][],int M(order of the matrix) MatrixBoundary(int mm): initialises M and allocates arrvoid fillArray(): accepts M × M elementsvoid displayMatrix(): displays the matrixint boundarySum(): returns the sum of the boundary elements, counting each corner only oncevoid displayBoundary(): displays the boundary elements and their sum using boundarySum()
Question 8 – Encrypt [10]
A sentence is encrypted by replacing every vowel with '*'. Design a class Encrypt:
- Data members:
String text,String encrypted,int count(vowels replaced) Encrypt(): default constructorvoid accept(): accepts a sentenceboolean isVowel(char ch): returns true if ch is a vowelvoid convert(): builds encrypted by replacing vowels with '*' and updates countvoid display(): displays the original sentence, the encrypted sentence and count
SECTION C – Python (Attempt any two questions)
Question 9 [5]: Write a Python program to accept the interest rate, principal amount and time from the user and print the simple interest.
Question 10 [5]: Write a Python program to accept three numbers and swap them without using a temporary variable.
Question 11 [5]: Write a Python program to input the name and basic salary of an employee and display the name, gross salary and net salary, where DA = 30% of basic, HRA = 18% of basic, PF = 12.5% of basic, gross = basic + DA + HRA and net = gross − PF.
ANSWER KEY WITH SOLUTIONS
Question 1 – MCQ answers
- (i) (b) (A ⊕ B)': XNOR is the complement of XOR.
- (ii) (c) →
- (iii) (a) A.(B + C): swap + with . (and 0 with 1).
- (iv) (a) A'.(B' + C'): by De Morgan's law, (A + BC)' = A'.(BC)' = A'.(B' + C').
- (v) (a) Identity law
- (vi) (b) false RAL: "GUJARAT" has 7 letters and "PUNJAB" has 6, so the comparison is false.
"KERALA".substring(2, 5)gives the characters at indices 2, 3 and 4, which is "RAL". - (vii) (b) X.X': it is 0 for every value of X.
- (viii) (b): both are true, but R talks about the complement. It does not explain why a contradiction is always false.
- (ix) (a): because a truth table lists every possible combination of truth values, it can show the output of the proposition in every case.
- (x) (b) P' → Q': the inverse negates both parts. (Q → P is the converse, and Q' → P' is the contrapositive.)
Question 2
(a) ?1? temp > 0 | ?2? temp % 10 | ?3? d | ?4? temp / 10 | ?5? rev == n
(b) 16: the method adds the main diagonal, 2 + 5 + 9 = 16.
(c)
P Q | P∨Q P∧Q | (P∨Q)→(P∧Q)
T T | T T | T
T F | T F | F
F T | T F | F
F F | F F | TQuestion 3 – Conversions
(a) 110101 (53) + 101011 (43) = (1100000)₂ (96)
(b) 111101 (61) − 100111 (39) = (10110)₂ (22)
(c) 245 ÷ 2 repeatedly gives 11110101. For the fraction, .625 × 2 = 1.25 → 1, .25 × 2 = 0.5 → 0, .5 × 2 = 1.0 → 1. So (245.625)₁₀ = (11110101.101)₂.
- Octal: group the bits in threes, 011 110 101 . 101 → (365.5)₈
- Hexadecimal: group the bits in fours, 1111 0101 . 1010 → (F5.A)₁₆
(d) Replace each octal digit with 3 bits: 7 = 111, 2 = 010, 5 = 101, 4 = 100, 3 = 011, 4 = 100. So (7254.34)₈ = (111010101100.011100)₂.
- Hexadecimal: 1110 1010 1100 . 0111 → (EAC.7)₁₆
- Decimal: 7×512 + 2×64 + 5×8 + 4 + 3/8 + 4/64 = 3756 + 0.4375 = (3756.4375)₁₀
(e) F + 6 = 21 = 15 + carry 1 → 5. A + D + 1 = 24 = 16 + 8 → 8 carry 1. 9 + 4 + 1 = 14 → E. Result: (E85)₁₆.
Question 4
(a) A full adder is a combinational circuit that adds three bits: A, B and a carry-in (Cin). It produces a Sum and a Carry-out (Cout).
A B Cin | Sum Cout
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 1Sum = A ⊕ B ⊕ Cin and Cout = A.B + B.Cin + A.Cin, which can also be written as A.B + Cin.(A ⊕ B). The logic diagram is shown at the top of this post.
(b) F = 1 when (M AND E) OR N OR (M AND S).

Canonical SOP: F(M,E,N,S) = Σ(2, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15). Written out as minterms: M'E'NS' + M'E'NS + M'ENS' + M'ENS + ME'N'S + ME'NS' + ME'NS + MEN'S' + MEN'S + MENS' + MENS. This simplifies to F = ME + N + MS.
Question 5
(a)
P Q | P→Q | (P→Q)' | Q' | P.Q'
T T | T | F | F | F
T F | F | T | T | T
F T | T | F | F | F
F F | T | F | T | FThe (P→Q)' and P.Q' columns are identical, so the identity is verified.
(b)
P Q | Q' | P∨Q' | (P∨Q')→Q
T T | F | T | T
T F | T | T | F
F T | F | F | T
F F | T | T | FThe result column has both T and F, so the proposition is a contingency.
Question 6 – CircularPrime
import java.util.Scanner;
class CircularPrime
{
int num;
CircularPrime(int n)
{
num = n;
}
boolean isPrime(int n)
{
if (n < 2)
return false;
for (int i = 2; i * i <= n; i++)
if (n % i == 0)
return false;
return true;
}
int countDigits(int n)
{
int c = 0;
do
{
c++;
n /= 10;
} while (n > 0);
return c;
}
int rotate(int n)
{
int p = (int) Math.pow(10, countDigits(n) - 1);
int first = n / p; // leading digit
int rest = n % p; // remaining digits
return rest * 10 + first;
}
void checkCircular()
{
int digits = countDigits(num);
int n = num;
boolean flag = true;
for (int i = 1; i <= digits; i++)
{
System.out.println(n);
if (!isPrime(n))
{
flag = false;
break;
}
n = rotate(n);
}
if (flag)
System.out.println(num + " is a Circular Prime");
else
System.out.println(num + " is not a Circular Prime");
}
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a number: ");
CircularPrime ob = new CircularPrime(sc.nextInt());
ob.checkCircular();
}
}The number of digits is counted once, before rotating. This matters for numbers with a 0, such as 101: the rotation 011 becomes 11, which has fewer digits.
Question 7 – MatrixBoundary
import java.util.Scanner;
class MatrixBoundary
{
int arr[][];
int M;
MatrixBoundary(int mm)
{
M = mm;
arr = new int[M][M];
}
void fillArray()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter " + (M * M) + " elements:");
for (int i = 0; i < M; i++)
for (int j = 0; j < M; j++)
arr[i][j] = sc.nextInt();
}
void displayMatrix()
{
for (int i = 0; i < M; i++)
{
for (int j = 0; j < M; j++)
System.out.print(arr[i][j] + "\t");
System.out.println();
}
}
int boundarySum()
{
int sum = 0;
for (int i = 0; i < M; i++)
for (int j = 0; j < M; j++)
if (i == 0 || j == 0 || i == M - 1 || j == M - 1)
sum += arr[i][j]; // each cell is visited once, so corners are not repeated
return sum;
}
void displayBoundary()
{
System.out.println("Boundary elements:");
for (int i = 0; i < M; i++)
{
for (int j = 0; j < M; j++)
{
if (i == 0 || j == 0 || i == M - 1 || j == M - 1)
System.out.print(arr[i][j] + "\t");
else
System.out.print("\t");
}
System.out.println();
}
System.out.println("Boundary sum = " + boundarySum());
}
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter the order of the matrix: ");
MatrixBoundary ob = new MatrixBoundary(sc.nextInt());
ob.fillArray();
System.out.println("Original matrix:");
ob.displayMatrix();
ob.displayBoundary();
}
}Checking every cell with one condition guarantees that each corner is added only once, and it also works for a 1 × 1 matrix.
Question 8 – Encrypt
import java.util.Scanner;
class Encrypt
{
String text, encrypted;
int count;
Encrypt()
{
text = "";
encrypted = "";
count = 0;
}
void accept()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a sentence: ");
text = sc.nextLine();
}
boolean isVowel(char ch)
{
return "AEIOUaeiou".indexOf(ch) != -1;
}
void convert()
{
encrypted = "";
count = 0;
for (int i = 0; i < text.length(); i++)
{
char ch = text.charAt(i);
if (isVowel(ch))
{
encrypted += '*';
count++;
}
else
encrypted += ch;
}
}
void display()
{
System.out.println("Original sentence : " + text);
System.out.println("Encrypted sentence: " + encrypted);
System.out.println("Vowels replaced : " + count);
}
public static void main(String args[])
{
Encrypt ob = new Encrypt();
ob.accept();
ob.convert();
ob.display();
}
}Questions 9 to 11 – Python
p = float(input("Enter principal amount: "))
r = float(input("Enter rate of interest: "))
t = float(input("Enter time in years: "))
si = (p * r * t) / 100
print("Simple Interest =", si)a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
c = int(input("Enter third number: "))
print("Before swapping: a =", a, " b =", b, " c =", c)
a, b, c = b, c, a # tuple packing/unpacking, no temporary variable
print("After swapping: a =", a, " b =", b, " c =", c)If the examiner expects arithmetic instead of tuple assignment, two numbers can be swapped with a = a + b; b = a - b; a = a - b. Repeat the same steps with b and c to rotate all three numbers.
name = input("Enter employee name: ")
basic = float(input("Enter basic salary: "))
da = 0.30 * basic
hra = 0.18 * basic
pf = 0.125 * basic
gross = basic + da + hra
net = gross - pf
print("Name :", name)
print("Gross salary :", gross)
print("Net salary :", net)Related Posts
Continue learning with these related articles

ISC Class 12 Computer Science Evaluation II Sample Paper 2026-27 with Solutions
A full ISC Class 12 Computer Science Evaluation II theory paper for 2026-27 on Boolean algebra, K-maps, encoders, recursion, deque, linked list and binary trees, with a checked answer key, logic diagrams and solved Java programs.

ISC Class 11 Computer Science Notes: Propositional Logic and Truth Tables
Complete ISC Class 11 Computer Science notes on propositional logic: propositions, logical connectives, truth tables, tautology, contradiction, converse, inverse and contrapositive, and the laws of logic, with solved examples.

ISC Class 12 Computer Science Sample Paper 2027 (Theory) with Solutions
A full 70-mark ISC Class 12 Computer Science theory sample paper for 2027 in the latest CISCE format: MCQs, Boolean algebra, K-maps, Java classes, recursion, inheritance, stacks, linked lists and binary trees, with complete step-by-step solutions.