(Candidates are allowed additional 15 minutes for only reading the paper. They must not start writing during this time)
Answer all Question in Part I (compulsory) and seven questions from Part II, choosing three questions from Sections A and four questions from
Section B. All working, including rough work, should be done on the same sheet as the rest of the answer. The intended marks for questions or for parts of questions are given in brackets.
Answer all questions.
while answering questions in this part indicate briefly your working reasoning wherever required.
Question 1. 
(a) State the distributive Law? Verify it using the truth table?
|Ans: Distributive Law:
(b) What is the canonical form of Boolean Expression? State the two types of canonical form.
|Ans: A canonical form of a Boolean Expression is the logical sum of some minterms or logical product of some maxterms. The two types of canonical forms are: (i) Sum of product (SOP) form. (ii) Product of Sum (POS) form.|
(c) Using NOR gates only, draw AND, OR and NOT gate.
(d) What is the application of Boolean Algebra in Computer Science.
|Ans: Boolean Algebra plays a vital role in Today's technological advancement, in logic of circuits for designing and simplifying circuits. In Boolean Algebra the variables can take up only two values '0' and '1' and hence it is compatible with Binary Arithmetic used in simplifying the designing of computer hardware.|
(e) Reduce the following to its simplest form using laws of Boolean Algebra. At each step clearly state the law used for simplification.
AB' + A'BC' + (AC)' + BC
|Ans: A' + A'BC' + (AC)' + BC
AB' + A'BC' + A' + C' + BC [ (AC)' = A' + C' ]
AB' + A'(1+BC') + C' + BC
AB'+A'+C'+BC [ 1 + X = 1]
Question 2. 
(a) What is Data Structure? What are the different types of Data Structure?
|Ans: Data structure is representation of the logical relationship existing between individuals elements of data. In other words, A data structure is a way of organizing all data items that consider not only the elements but also their relationship to each other. Different types of data structures are: Arrays, Stack, Queue, LinK List, Tree etc.|
(b) With a suitable example state the difference between runtime and syntax error.
|Ans: A syntax error occurs when the grammatical rule is violated
of a programming language. e.g. not using semicolon(;) at the end
A run time error occurs during the execution of the programs. e.g. overflow of stacks, infinite loops.
(c) State the different applications of stack?
|Ans: Applications of Stack:
(1) Reversing a String.
(2) Conversion of infix expression to postfix expression.
(3) Stack frames.
(4) Implementing recursion.
(5) As a temporary memory area.
(d) Convert the following into postfix: (A+B/C)+B-C*D+C
(e) An array ARR is stored in memory with each element required 2 bytes of storage. If the element ARR is stored at the location 1250, Calculate the location of ARR when the array is stored row major wise.
Given B=1250, W=2 bytes, i=5, j=3, L1=0, L2=0, U1=9, U2=4, n=5
(a) What will be the values stored in array ar after the following program is executed. 
|Ans: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29|
(b) The following function is a function of some class. It computes the quotient and remainder of a division.
int dividend = 13, divisor = 2, quo = ?1?;
dividend -= ?3?;
rem = ?4?;
quo = ?5?;
rem = dividend + divisor;
(i) What is the expression/value at ?1? 
(ii) What is the expression/value at ?2? 
(iii) What is the expression/value at ?3? 
(iv) What is the expression/value at ?4? 
(v) What is the expression/value at ?5? 
|(i) -1 (ii) 0 (iii) divisor (iv) 0 (v) quo+1|
Answer seven questions in this Part, choosing three questions from Section A and four from Section B.
Answer any three questions.
(a) Given the Boolean function F(A,B,C,D) = E(0,1,2,4,5,7,11,13,15)
Using Karnought's map to reduce this function F, using the given SOP form. Draw logic gate diagram for the reduce SOP form. You may use gates with more than two inputs. Assume that variable and their complements are available as inputs. 
Quad 1 is m0+m1+m4+m5
Quad 2 is m5+m7+m13+m15
Quad 3 is m3+m7+m15+m11
Reduce Expression for Quad 1 is A'C'
Reduce Expression for Quad 2 is BD
Reduce Expression for Quad 3 is CD
Final SOP expression is A'C'+BD+CD
(b) Now given X(A,B,C,D) = II(2,3,4,7,9,10,11,12)
Use Karnought's map to reduce this function X using the given POS form. Draw logic gate diagram for the reduced POS form. You may use gates with more than two inputs. Assume that variables and their complements are available as inputs. 
|Quad is m3+m2+m11+m10
Pair 1 is m3+m7
Pair 2 is m4+m12
Pair 3 is m9+m11
Reduce Expression for Quad is B+C'
Reduce Expression for Pair 1 is A+C'+D'
Reduce Expression for Pair 2 is B'+C+D
Reduce Expression for Pair 3 is A'+B+D'
Final SOP expression is (B+C').(A+C'+D').(B'+C+D).(A'+B+D')
The Past Pupil Association of R. K. University Computer Science Department is organizing a reunion function at the campus. The invitation card is to be issued to a person if -
The Person is an ex-student of the department and had passed out in 1995.
The Person is not an ex-student of the same department and had passed out in 1995 and has made a contribution of Rs. 1000.
The inputs are:
E: The person is ex-student of the department.
U: The person is not ex-student of the department, but a student of the same university.
P: the person passed out in 1995.
S: The person contribute Rs. 1000.
[1 indicates yes 0 indicates no in all the cases]
I: Denotes the invitation card is issued. [1 indicates yes 0 indicates no]
(a) Draw the truth tables for the inputs and outputs given above and write the SOP expression for I(E,U,P,S) 
|Ans: SOP of I(E,U,P,S)
1 Quad (m10,m11+m14+m15)
1 pair (m7+m15)
Simplified Expression for Quad is EP
Simplified Expression for Pair is UPS
So final Reduced Expression is EP+UPS
(b) Reduce I(E,U,P,S) using Karnaugh's Map. Draw the logic gate diagram for the reduced SOP expression for I(E,U,P,S) using AND & OR gates. You may use gates with two or more inputs. Assume that variables and their compliments are available as input. 
(a) What is an encoder? State its application 
(b) Draw the truth table and logic circuit diagram for converting a decimal number to binary. Explain the working principle with an example. 
(c) Verify that (Z+X)(Z+X'+Y) = (Z+X)(Z+Y) 
(a) State the difference between half adder and full adder circuit. 
(b) Draw the truth table and logic gate diagram of a full adder. 
(c) Using two half adder and an OR gate construct a full adder. 
|Full adder circuit diagram
A + B + CarryIn = Sum + CarryOut
A full adder is a logical circuit that performs an addition operation on three binary digits. The full adder produces a sum and carry value, which are both binary digits. It can be combined with other full adders (see below) or work on its own.
(a) Prove that F(A,B,C)=II(2,3,4,7)=E(0,1,5,6) 
(b) State the dual form of the following XY'(Y'Z+X+X'Z') 
(c) State the difference between an Encoder and Multiplexer Circuit. 
(d) Using NOR gates only draw a logic diagram to construct NAND gate. 
Answer only four 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. (Flow charts and Algorithms are not required).
(The program must by written in C++ OR Java)
sum= 1 + x + x3 + x5 + .......... + x2n-1
1! 2! 3! n!
A class seriessum has been defined to calculate sum of the above series. Some of the members of the class are given below.
|Data member||x (integer), n (integer), sum(double)|
|int factorial(int)||claculate and returns factorial of n(n!) where n!=1x2x3x4.......xn|
|double term(int p,int q)||calculate and returns the value of p/q! by making use of factorial(int)|
|void accept()||input the value of member data x,n|
|void displaysum()||display the value of member data sum.|
|double calsum()||calculates the sum of the given series using the appropriate data and other member function.|
(a) Specify the class serisesum giving the details of the constructors, int factorial(int), double term(int,int), void displaysum(). You may assume that other member functions are written for you. You do not need to write the main function.
(b) What care do you need to take while designing double term(int,int)
int factorial(int n)
double term(int p,int q)
double c=(double) p/q;
cout<<"enter x= ";
cout<<"enter n= ";
cout<<" sum = "<<sum;
A class indexarray contains the employee code of 100 employees. Some of the member functions/data members are given below.
|Data members||arr - integer|
|indexarray()||constructor the code to 0.|
|void fillarray()||to input the code in the arr.|
|void sortarr()||to sort the array variable using selection sort technique.|
|int binarysearch(int,int)||to search and return 1 if the employee code is found in the array object otherwise return 0.|
Specify the class indexarray giving details of the constructors, void sortarr(), int binarysearch(int,int). You may assume that other functions are written for you and you do not need to write the main function.
#define MAX 100
cout<<"Enter Code : ";
int binarysearch(int a,int x)
int m,l=0; h=9;
while(h>=l && ans=='n')
A class quad contains the following data member and member functions to find the roots of a quadratic equation.
|Data members/instance variables:|
|a,b,c||of float data type.|
|x1,x2||of float data type.|
|quad(float,float,float)||constructor to assign values to the data members.|
|float discriminant()||to return the discriminant[b2-4ac]|
|void root_equal()||to display the root if both are equal.|
|void imag()||to display the roots, if roots are imaginary.|
|void root_real()||to display the two real, unequal roots.|
|void root()||to call other appropriate functions to find the solution of the problem.|
If ax2+bx+c=0 is the quadratic equation, then if
b2-4ac > 0 - roots are real, unequal
x1 = -b + `/(b2 - 4ac)
x2 = -b - `/(b2 - 4ac)
If b2 - 4ac = 0 - roots are real, equal
x1 = x2 = -b/2a
If b2 - 4ac < 0 - roots are imaginary
Specify the class quad giving the details of the functions quad(float,float,float). float discriminant(), void root_equal(), void root_real(), void root(). You may assume that other functions are written for you. You do not need to write the main function.
quad(float x,float y,float z)
cout<<"roots are equal : "<<endl;
cout<<"roots are imaginary"<<endl;
cout<<"roots are real : ";
A class recursion has been defined to find the Fibonacci series upto a limit. Some of the members of the class are given below.
|Data members/instance variables:|
|a,b,c,limit||all integer type.|
|recursion()||constructor to assign a,b,c with the appropriate values.|
|void input()||to accept the limit of the series.|
|int fib(int n)||to return the nth Fibonacci term using recursive technique.|
|void generate_fibseries()||to generate Fibonacci series upto the given given limit.|
(a) Specify the class recursion giving the details of the constructor, int fib(), void generate_fibseries(). You may assume other functions are written for you and you need not write the main function. 
(b) Why recursive functions result into slower execution of the program?
int fibo(int n)
A class iscscores defines the scores of a candidates in six subjects and another class bestfour defines the best four subjects.
The details of both the classes are given below.
|Data Member/Instance variable|
|int number||to contain marks for six subjects and subject code[numeric]|
|iscscores()||constructor to accept the marks.|
|int point()||to return the point in each subjects according to the following:
Marks>=90 1 point
80-89 2 points
70-79 3 points
60-69 4 points
50-59 5 points
40-49 6 points
|void bestsubjects()||to display the total points and best four subjects codes using the concept of inheritance.|
Specify the details of both the classes using the concept of inheritance. Specify the details of the constructor iscscores(), and functions int point(), void bestsubjects(). Other functions are written for you and you need not write the main function.
cout<<"Enter Subject Code : ";
cout<<"Enter Marks :";
int point(int i)
if(numbers[i]>=80 && numbers[i]<=89)
if(numbers[i]>=70 && numbers[i]<=79)
if(numbers[i]>=60 && numbers[i]<=69)
if(numbers[i]>=50 && numbers[i]<=59)
if(numbers[i]>=40 && numbers[i]<=49)
if(numbers[i]>=30 && numbers[i]<=39)
if(numbers[i]>=20 && numbers[i]<=29)
if(numbers[i]>=10 && numbers[i]<=19)
class bestfour : public iscscores
// calculating points for each subject
// sort the array
// display the Best four subjects and total points
cout<<"Total Points : "<<totpoints<<endl;
cout<<"Best of four Subject Code is : "<<endl;
cout<<"Code: "<<points[i]<<"\t Point: "<<points[i]<<endl;
A class stringop is designed to handle string related operations. Some members of the class are given below.
|Data members/instance variables|
|txt||to store the given string of maximum length 100|
|void readstring()||to accept the string|
|char caseconvert(int,int)||to convert the letter to other case|
|void circulardecode()||to decode the string by replacing ecah letter by converting it to opposite case and then by the next character in a circular way. Hence "AbZ" will be decoded as "bCa".|
Specify the class stringop giving the details of the char caseconvert(int) and void circulardecode() only. You may assume that other functions are written for you. You do not need to write the main().
void stringop:: readstring()
cout<<"enter a string";
char stringop:: caseconvert(int c)
if(c>=65 && c<=90)
void stringop:: circulardecode()
for(i=0; i<strlen(txt); i++)
if(txt[i]!=90 && txt[i]!=122)