0% found this document useful (0 votes)
43 views3 pages

HYE Computer Science 2024-2025

Uploaded by

Vanita Karthik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views3 pages

HYE Computer Science 2024-2025

Uploaded by

Vanita Karthik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

STEM WORLD SCHOOL

SESSION: 2024-25
HALF YEARLY EXAMINATION
COMPUTER SCIENCE
CLASS – 11
Maximum Marks: 70
Time allowed: 3 hours
Answers to this Paper must be written on the paper provided separately.
The time given at the head of this Paper is the time allowed for writing the answers.
The intended marks for questions are given in brackets [ ].

PART – I [20 Marks]


[Answer all questions from this part) (While answering questions in this part, indicate briefly your
workings and reason, wherever required)
Question 1
a) The binary equivalent of a Decimal number (129)10 – [1]
a. (10000001)2 c. (10100000)2
b. (10010010)2 d. (10000000)2
b) The binary equivalent of a hexadecimal digit (12C)16 is represented by – [1]
a. (101001001)2 c. (100101100)2
b. (101111001)2 d. None of these
c) Convert (7E3)16 into octal form – [1]
a. (3473)8 c. (3753)8
b. (4740)8 d. (3743)8
d) The value of (12BD)16 + (14DB)16 : [1]
a. (2788)16 c. (2878)16
b. (2798)16 d. (2789)16
e) To convert a Hexadecimal number to its binary equivalent, each hexadecimal digit is
expressed into: [1]
a. 3 bits form c. 8 bits form
b. 4 bits form d. None of the above
f) The value of (4232)8 – (3343)8 is : [1]
a. (667)8 c. (666)8
b. (717)8 d. (646)8
g) The law which states: A(B+C) = A.B + A.C [1]
a. Associative law c. Commutative law
b. Distributive law d. Absorption law
h) “COMPUTER”.substring(2,5) will result: [1]
a. COM c. MPU
b. PUT d. None

1
Question 2
a. What do you mean by non-primitive data type? Give example [2]
b. Convert the following arithmetic expression into java statement: [2]

c. Differentiate between static variable and non-static variable. [2]
d. What is the output of the following code: [2]
String m = “STEM WORLD SCHOOL”;
(i) String r = m.substring(m.indexOf(“W”),m.lastIndexOf(‘ ’));
(ii) String k = m + 2024;
e. Write the syntax of StringTokenizer ? [2]
f. What is the output of the following segment ? [2]
(i) System.out.println(12+34+ “123”+12+34);
(ii) System.out.println((int)“ABCD”.charAt(2));

PART II [50 Marks]


Answer six questions in this part, choosing two questions from Section-A, two from Section-B
and two from Section C
SECTION – A [20 Marks]
(Attempt any two questions)
Question 3
a. Convert (1101010.110)2 = (?)10 [2]
b. What do you means by conjunction and disjunction? [2]
c. Prove that (p^q) => (pvq) is a tautology. [3]
d. Draw the truth table of: A’B’C’ + (A+B)+AB [3]
Question 4
a. Draw the logic diagram and truth table of 2 input XNOR gate. [3]
b. Show and prove De Morgan’s theorem with the help of a truth table. [3]
c. Prove the following using a truth table: (A^(AvB)) = A. [2]
d. Draw the logic circuit: A.B’ + A’.B. [2]
Question 5
a. State two absorption laws. Prove anyone using truth table. [3]
b. Draw the logic circuit of ((A’B+AB’).(AB’+A’B)) using AND,OR and NOT gates. [3]
c. Simplify the following using laws of Boolean algebra: (A+A’B).(A+B’) [2]
d. Draw the logic gates and truth table for the following: [2]
a. NAND gate b. NOR gate

2
SECTION-B [20 Marks]
(Attempt any two questions)

Each program should be written in such a way that it clearly depicts the logic of the problem.
This can be achieved by using mnemonic names and comments in the program.
(Flowcharts and algorithms are not required. Programs must be written in Java)

Question 6
Write a program in Java to input employee code, annual salary and deductible annual savings. Find
the taxable income and calculate the income tax as per the following:

Taxable income = Annual salary - Deductible annual savings

Taxable Income (₹) Income Tax


up to 200000 0%
200001 to 500000 10%
500001 to 1000000 20%
above 1000000 30%
Print the employee code, taxable income and income tax along with the appropriate messages.
[10]

Question 7
Write a class with the name Area using method overloading that computes the area of a
parallelogram, a rhombus and a trapezium.
Formula:
Area of a parallelogram (pg) = base * ht
Area of a rhombus (rh) = (1/2) * d1 * d2
(where, d1 and d2 are the diagonals)
Area of a trapezium (tr) = (1/2) * ( a + b) * h
(where a and b are the parallel sides, h is the perpendicular distance between the parallel sides)
[10]

Question 8
Write a program to accept the names of 10 cities in a single dimensional string array and their STD
(Subscribers Trunk Dialling) codes in another single dimension integer array. Search for the name of
a city input by the user in the list. If found, display "Search Successful" and print the name of the
city along with its STD code, or else display the message "Search unsuccessful, no such city in the
list".
[10]

SECTION – C [10 Marks]


(Attempt any two questions)
Question 9
Write a program to accept 20 numbers in an array. Display the numbers which are even numbers.
[5]

Question 10
Write a program to accept a string. Display the characters which are vowels. [5]

Question 11
Write a program to accept a number. Display the sum of the digits of the number. [5]

You might also like