100% found this document useful (1 vote)
2K views6 pages

ISC 2007 Computer Science Paper 1 Theory

The document contains questions from an ISC 2007 Computer Science paper. It asks to: 1) Simplify a Boolean expression and state laws used. 2) State De Morgan's laws and verify one using a truth table. 3) Convert a sum of products expression to a product of sums form. 4) Find the complement of a Boolean expression. 5) Draw the logic gate diagram and truth table for an XOR gate.

Uploaded by

Shadower
Copyright
© Attribution Non-Commercial (BY-NC)
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
100% found this document useful (1 vote)
2K views6 pages

ISC 2007 Computer Science Paper 1 Theory

The document contains questions from an ISC 2007 Computer Science paper. It asks to: 1) Simplify a Boolean expression and state laws used. 2) State De Morgan's laws and verify one using a truth table. 3) Convert a sum of products expression to a product of sums form. 4) Find the complement of a Boolean expression. 5) Draw the logic gate diagram and truth table for an XOR gate.

Uploaded by

Shadower
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 6

ISC 2007 COMPUTER SCIENCE PAPER 1 THEORY PART I Answer all questions in this part Question 1.

a) Simplify the following Boolean expression using laws of Boolean Algebra. At each step state clearly the law used for simplification. XY. X.Y ! Y.") b) State the #e$organ%s &aws. 'erify any one of them using truth table. c) (on)ert the following Sum of *roduct expression into its corresponding *roduct of Sums form+ , -.'./)0 -%'%/% ! -%'%/!-%'/!-'%/ d) ,ind the complement of , A.B.(.#)0 1A ! 2 B!() . B%! #%)34 e) #raw the logic gate diagram and truth table for X-5 gate. [ 2 x 5 10! Question 2. a) 6ame the 7ni)ersal gates. b) (on)ert the following infix expressions to its postfix form. A! B8()) 9 (: #8B)) c) ;ach element of an array X1:1<=1>.1<=?>4 requires one byte od storage. @f the array is stored in column maAor order with the beginning location 1<>>. determine the location of X1<.B>4. d) ;xplain any two standard ways of tra)ersing a binary tree. e) /hat is meant by )isibility mode in the definition of deri)ed classes of @nheritanceC ;xplain any two )isibility modes a)ailable. [ 2 x 5 10!

Question ". a) @n the following function strange is a part of some class. Assume that arguments x and y are greater than > when the function is in)oDed. Show the dry run9worDing. publicint strange int x. int y) 2 if xE0y) 2 x0x:yF return strange x.y)F 3 else 2 return xF 3 3 i) /hat will the function strange B>.<) returnC ii) /hat will the function strange 1<.G) returnC 1

[2! [2!

iii)

@n one line state what the function strange =) is doingC

[1! [5!

b) State the final )alue of q at the end of the following program segment+ intm.n.p.q0>F for m0BFmH0IF!!m) 2 for n01FnH0mF!!n) 2 p0m!n:1F if pJI00>) q!0pF else q!0p!?F 3 3

P#$tII
Answer any se)en questions in this part. choosing three questions from Section A and four questions from Section B. Section A Answer any three questions. Question %. a) Ki)en the Boolean function , A.B.(.#)0 L >.B.I.?.G.M.N.1I) 7se Oarnaugh%s map to reduce the gi)en function ,. using the S-* form. #raw a logic gate diagram for the reduced S-* form. You may use gates with more than two inputs. Assume that the )ariables and their complements are a)ailable as inputs. b) X A.B.(.#)0 P B.I.?.<.1B.1?) 7se Oarnaugh%s map to reduce the gi)en function X using the *-S form. #raw a logic gate diagram for the reduced *-S form. You may use gates with more than two inputs. Assume that the )ariables and their complements are a)ailable as inputs. [ 5 x 2 10! Question 5. Qhe inaugural function of the newly constructed flyo)er has been organiRed by the *ublic /orDs #epartment. Apart from a few special in)itees. entry is permitted only if+: Qhe person is an employee of the */# of (lass @ category with more than 1> years of worDing experience. -5 Qhe person is an employee of any other go)ernment or authoriRed pri)ate organiRation either at the managerial le)el or with more than 1> years of worDing experience. Qhe inputs are+ A + Qhe person is a (lass @ employee of */#. B

B ( #

+ + +

Qhe person is an employee of any other go)ernment or authoriRed pri)ate organiRation. Qhe person has more than 1> years of worDing experience. Qhe person is holding a managerial post.

-utput+: X +

#enotes eligibility for entry.

1 1 indicates Yes and > indicates 6o in all cases4

a) #raw the truth table for the inputs and outputs gi)en abo)e and write the S-* expression for X A.B.(.#). [5! b) 5educe X A.B.(.#) using Oarnaugh%s map. #raw the logic gate diagram for the reduced S-* expression for X A.B.(.#) using A6# S -5 gates. You may use gates with two or more inputs. Assume that the )ariables and their complements are a)ailable as inputs. [5!

Question &. A combinational circuit with I inputs A.B.( detects an error during transmission of code and gi)es the output # as 1 if any two of the inputs are low >). i) /rite the truth table with @nputs A.B.( and -utputs #. [2! ii) /rite the S-* expression for # A.B.() using minterms. @mplement # using 6A6# gates only. [%! iii) /rite the *-S expression for # A.B.() using maxterms. @mplement # using 6-5 gates only. [%! Question 7. a) #raw the truth table and logic circuit diagram for a Texadecimal to Binary encoder. b) 'erify if X%Y"!XY%"!XY"%!XY"0 XY!Y"!X"

[&! [%!

Question '. a) 7sing the truth table )erify *U! *U% 0 * [2! b) /hat is full adderC /rite the S-* expressions for Sum and (arry. Simplify the expressions algebraically using Boolean Algebra. [&! c) /hat is meant by a logic gateC State any one application of a logic gate circuit. [2!

Se(tion ) Answer any ? questions. ;ach program should be written in such a way that it clearly depicts the logic of the problem. Qhis can be achie)ed by using mnemonic names and comments in the program. ,lowcharts and algorithms are not required) T*e +$o,$#-s -ust .e /$itten in C0012#3# Question 4. A class called ;)enSeries has been defined to find the smallest )alue of integer. n. such that. B ! ?9BV! W9IV!1G9?V!=.Bn9nV E0 S. where B.> H S H M.>. Some of the members of the class ;)enSeries are gi)en below+ (lass name #ata members+ n S D $ember functions+ ;)enSeries ) )oid accept ) long fact long x) )oiddisp ) + + + + + + + + ;)enSeries long integer type to store number of terms. float )ariable where B.> H S H M.>. float )ariable to store the )alue of series e)aluated. constructor to initialiRe data members to >. to accept )alue of data member S. to compute and return factorial of x. calculates and displays the least )alue of n.

Specify the class ;)enSeries gi)ing details of the constructor and functions )oid accept ). long fact long) and )oid disp ). Qhe main function need not be written. [ 10 !

Question 4. #esign a class change to con)ert a decimal number to its equi)alent in base 1G and to con)ert it bacD to its decimal form. ;g. i) Qhe decimal number I< is BI in base 1G. ii) Qhe decimal number 1>M is GB in base 1G. Some of the members of the class are gi)en below+ (lass name #ata members a14 n $ember functions change ) )oid input ) )oidhexadeci int) )oiddecihexa ) + + + change integer type array. integer to be con)erted to base 1G.

+ + + +

constructor to assign > to instance )ariables. accepts integer to be con)erted to base 1G. to con)ert decimal integer to hexadecimal form. to con)ert hexadecimal number bacD to decimal form.

Specify the class change gi)ing the details of the constructor and the functions )oid input ). )oid hexadeci int) and )oid decihexa ). Qhe main function need not be written. [ 10 !

Question 11. A class 5earrange has been defined to insert an element and to delete an element from an array. Some of the members of the class are gi)en below+ (lass name #ata members a14 n pos1 posB item $ember functions )oid enter ) )oid insert ) + + + + + + 5earrange integer type array siRe of array integer) position of insertion integer) position of deletion item to be inserted integer)

+ +

)oid disp1 ) )oid dispB ) )oid remo) )

+ + +

to enter siRe. array elements and to display the entered elements. to accept element item) to be inserted. position of insertion and insert the element item) at the position of insertion. to display the array after item is inserted. to display the array after item is deleted. to accept the position of deletion and delete element item) at the position of deletion.

Specify the class 5earrange gi)ing details of the functions )oid enter ). )oid insert ). )oid disp1 ). )oid dispB ) and )oid remo) ). Qhe main function need not be written. [ 10 ! Question 12. (lass (on)ert has been defined to express digits of an integer in words. Qhe details of the class are gi)en below+ (lass name + (on)ert #ata members n + integer whose digits are to be expressed in words. $ember functions (on)ert ) + constructor to assign > to n. )oid inpnum ) + to accept the )alue of n. )oid extdigit int) + to extract the digits of n using recursi)e technique. )oid numXtoXwords int) + to display the digits of an integer in words. Specify the class (on)ert gi)ing details of the constructor and function )oid inpnum ). )oid extdigit int) and )oid numXtoXwords int). Qhe main function need not be written. [ 10 !

<

Question 1". A class Student defines the personal data of a student while another class $arDs defines the register number. name of subAect and marDs obtained by the student. Qhe details of both the classes are gi)en below+ (lass name + Student #ata members name + string to store name. sex + string to store sex age + integer to store age $ember functions )oid inpdetails ) )oid show ) (lass name #ata members regnum marDs subAect $ember functions )oid inpdetails ) )oid show )

+ + + + + +

to accept )alues for data members. to display personal data of student. $arDs int to store registration number. int to store marDs. String to store subAect name.

+ +

to accept )alues for data members. to display exam and student details.

a) Specify the class Student gi)ing details of the functions )oid inpdetails ) and )oid show ). b) Specify the class $arDs using the concept of inheritance gi)ing details of the functions )oid inpdetails ) and )oid show ). Qhe main function need not be written. [ 10 !

Question 1%. A class $ystring has been defined for the following methods+ (lass name + $ystring #ata members str + to store a string len + length of the gi)en string. $ember functions $ystring ) + constructor )oid readstring ) + reads the gi)en string from input. int code int index) + returns 7nicode for character at position index. )oid word ) + displays the longest word in the string. Specify the class $ystring gi)ing details of the constructor and )oid readstring ). int code int index). )oid word ) only. Qhe main function need not be written.

You might also like