(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) Obtain the truth table to verify the following expression: x(y+z) = x.y+x.z also name the law stated above.
(b) Answer the following questions related to the NOR gate given below.
(i) What is the output of the above gate if input A=0, B=1.
(ii) What are the values of the input if output = 1.
(c) Given F = A + (B+C).(D'+E) Find F' and show the relevant working in steps.
(d) State the dual for the following expression and also draw the logic gate diagram for the dual expression obtained using NOR gate only. P = AB + CD
(e) For the given truth table where A,B,C are inputs and X is the
Write Canonical SOP and Canonical POS Expression.
(a) State the difference between Linear and Non-Linear data structure. Give one example of each.
(b) Convert the following infix expression to its postfix form.
( ( P * Q ) / ( R / S + T ) ) + U
(c) Simplify the following expression by using the Boolean Laws. Show the working in steps and also mention the laws used. X'Y'Z' + X'Y'Z + X'YZ + X'YZ' + XY'Z + XY'Z
(d) Each element of an array A requires 2 bytes of storage. If the address of A is 4000, find the base address of A when array is stored in Row major wise.
(e) Define Inheritance. How it is useful in programming.
(a) The following is a function trial() and perform() are a part of some class. Answer the following parts given below. Show the dry run/working.
int trial(int n)
return trial(n-2) + trial(n-1)
|// for c++||// for Java|
|void perform(int p)
for(int i=1; i<=p; i++)
|void perform(int p)
for(int i=1; i<=p; i++)
(i) What will the function trial() return when the value of n is 4?
(ii) What will be the output of the function perform() when the value of p is 5? 
(iii) In one line state what the function trial() is doing, apart from recursion? 
|Ans: (i) 8|
(iii) calculating sum of last two digits of Fibonacci series.
(b) Answer the following from the diagram of a Binary Tree given below: 
/ \ / \
D E F G
(i) Root of the TREE
(ii) External node of the tree
(iii) List the node s in the tree using Inorder Traversal.
(iv) Left subtree.
(v) Height of the Tree.
Answer seven questions in this Part, choosing three questions from Section A and four from Section B.
Answer any three questions.
(a) F(P,Q,R,S) = P'Q'RS'+P'QRS'+PQ'R'S+PQ'RS'+PQ'RS+PQR'S+PQRS'+PQRS
Use Karnaugh's map to reduce the function F, using the SOP form. Draw a logic gate diagram for the reduced SOP form. You may use gates with more than two inputs. Assume that the variables and their complements are available as inputs. 
Pair 1 is m5+m7
Pair 2 is m6+m14
Pair 3 is m8+m9
Pair 4 is m14+m8
Reduce Expression for Quad 1 is A'D'
Reduce Expression for Quad 1 is A'C
Final SOP expression is A'D'+A'C+AC'D
(b) Given: F(A,B,C,D) = II(0,1,2,3,5,7,9,13)
Use Karnaugh's map to reduce this function F using the given POS form. Draw a logic gate diagram for the reduced POS form. You may use gates with more than two inputs. Assume that the variables and their complements are available as inputs. 
Pair 1 is m2+m3
Pair 2 is m4+m5
Pair 2 is m12+m14
Reduce Exp. for Pair 1 is A+B+C'
Reduce Exp. for Pair 2 is A+B'+C
Reduce Exp. for Pair 3 is A'+B'+D
A provisonal store announces a special discount on all its products as a festival offer only to those who satisfy any one of the following conditions:
* If he/she is an employee of the store and has a service of more than 10 years.
* If he/she is a regular customer of the store whose age is less than 65 years & is not an employee of the store.
* If he/she is a senior citizen but not a regular customer of the store.
The inputs are:
E: Employee of the store.
R: Regular customer of the store.
S: Service of the employee is more than 10 years.
C: Senior citizen of 65 years or above.
X- Denotes eligible for discount[ 1 indicates Yes and 0 indicates No in all cases ]
(a) Draw the truth table for the inputs and outputs given above and write the SOP expression for X(E,R,S,C). 
The Function value is: R(A,B,C,D)=E(5,6,7,10,11,13,14,15)
The SOP Expression for R(A,B,C,D) is A'BC'D + A'BCD' + A'BCD + AB'CD' + AB'CD + ABC'D + ABCD' + ABCD
(b) Reduce X(E,R,S,C) using Karnaugh's map. Draw the logic gate diagram for the reduced SOP expression for X(E,R,S,C) using AND & OR gates. You may use gates with two or more inputs. Assume that the variables and their complements are available as inputs. 
Quad 1 (m5+m7+m13+m15)
Quad 2 (m6+m7+m14+m15)
Quad 3 (m10+m11+m14+m15)
Simplified Exp. for Quad 1 is BD
Simplified Exp. for Quad 1 is BC
Simplified Exp. for Quad 1 is AC
So final Reduced Expression is BD+BC+AC
a) Draw a truth table representing a 2 input XNOR gate and derive its SOP expression along with its logic gate diagram.
b) Simplify the following expression and convert it to its canonical POS form:
(x.y + z)(y + z'.x) 
c) From the logic circuit diagram given below name the parts (1), (2), (3) & finally derive the boolean expression & simplify it: 
(a) Prove that the complement of A.(A+B).B.(B+C') is a universal gate. 
(b) Minimise the following expression. At each step state clearly the law used.
(c) Draw the truth table & logic circuit diagram for a decimal to binary encoder. 
(a) State a difference between multiplexers & decoders. Also state a use of each. 
(b) Verify the following Boolean expression with the help of a truth table.
(c) Write SOP expression, truth table and the logic circuit of full adder. 
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)
A magic number is a number in which the eventual sum of digits of the number is equal to 1. For example, 172=1+7+2=10
then 172 is a magic number.
Design a class Magic to check if a given number is a magic number. Some of the members of the class are given below:
|Data members/instance variables|
stores the number
|Magic()||Constructor to assign 0 to n|
|void getnum(int nn)||to assign the parameter value to the number, n=nn|
|int Sum_of_digits(int)||returns the sum of the digits of a number|
|void ismagic()||checks if the given number is a magic number by calling the function Sum_of_digits(int) & displays appropriate message|
Specify the class Magic giving the details of the constructor ,void getnum(int), int Sum_of_digits(int)and void ismagic(). You need not write the main function.
A transpose of an array is obtained by interchanging the elements of the rows and columns.
A class Transarray contains a two dimensional integer array of order [m*n]. The maximum value possible for both 'm' and 'n' is 20. Design a class Transarray to find the transpose of a given matrix. The details of the members of the class are given below:
Data members/instance variables:
| stores the matrix elements
integer to store the number of rows
integer to store the number of columns
|Transarray(int mm, int nn)||to initialise the size of the matrix, m=mm, n=nn|
|void fillarray()||to enter the elements of the matrix|
|void transpose(Transarray A)||to find the transpose of a given matrix|
|void disparray()||displays the array in a matrix form|
Specify the class Transarray giving the details of the constructor, void fillarray(), void transpose(Transarray) and void disparray(). You need not write the main function.
A library issues books on rental basis at a 2% charge on the cost price of the book per day. As per the rules of the library, a book can be retained for 7 days without any fine. If the book is returned after 7 days, a fine will also be charged for the excess days as per the chart given below:
Number of excess days Fine per day(Rs.)
1 to 5 2.00
6 to 10 3.00
Above 10 days 5.00
Data members/instance variables
| name of the book
author of the book
price of the book in decimals
|Library(.....)||parameterized constructor to assign values to data members|
|void show()||displays the book details|
Data members/instance variables:
| number of days taken in returning the book
to store the fine
|Compute(.....)||parameterized constructor to assign values to data members of both the classes|
|void fine()||calculates the fine for the excess days|
|void display()||displays the book details along with the number of days, fine and the
total amount to be paid. Total amount is calculated as:
(2% of price of book*total no. of days)+fine
Specify the class Library giving the details of constructors and void show(). Using the concept of Inheritance, specify the class Compute giving the details of constructor, void fine() & the void display() function. You need not write the main function.
A class PrimeFac contains an array of 50 integers. Some of the members of the class are given below:
|Data members/instance variable|
|array to store integers
array to store the frequency of prime factors of numbers
Constructor to initialize array elements to 0
to enter values into array num
to determine the frequency of prime factors of the numbers stored in num and assign it to freq
|void disp()||to display both the arrays|
Specify the class PrimeFac giving the details of the constructor, void enter(), void frefac() and void disp() only. You need not write the main function.
Class Binary contains an array of n integers (n<=100)that are already arranged in ascending order. The subscripts of the array elements vary from 0 to n-1. The data members and member function of the class Binary are given below:
|Data members/instance variables|
| integer array of 100 elements
size of the array
location of the lower bound
location of the upper bound
|Binary(int nn)||constructor to initialize the size n=nn and the other instance variables|
|void readdata()||to fill the elements of the array in ascending order|
|int binary_search(int v)||returns the location of the value (v) to be searched in the list by binary search method using the Recursive technique. The function returns -1 if the number is not present in the given list|
(a) Specify the class Binary giving the details of the constructor, void readdata() and int binary_search(int). You need not write the main function.
(b) State the Base Case in the recursive function binary_search().
(c) What are the drawbacks of using the recursive technique?
A class SortWord has been defined with the following details:
|Data members/instance variables:|
| stores the word
stores the length of the word
|void readTxt()||to accept the word in lower case|
|void sortTxt()||to sort the word in alphabetical order of characters using bubblesort technique and display it|
|void changeTxt()||to change the case of vowels in the word to UPPER case (for e.g. school becomes schOOl)|
|void disp()||to display the changed string|
Specify the class SortWord giving the details of the functions constructor, void readTxt(), void sortTxt(), void changeTxt() and void disp(). You need not write the main function.