Monday, 23 November 2015

Q8,p-3,j15.The student information in a university is stored in the relation

STUDENT(Name,sex,marks,Dept_name)
Consider the following  SQL query "Select Dept_name from student where sex='M' group by dept_name  having avg(marks)>select avg(marks)from student . It returns the  name of department for which:
Options
A)The average marks of male students is more than the average marks of the same department.
B)The average marks of male students is more than the average marks of students in the university.
C)The average marks of male students is more than the average marks of male students in university.
d) The average marks of students is more than the average marks of male students in the university.
Answer B.

Q7,p3,J15. Let E1 and E2 be two entities in ER diagram with simple single valued attributes. R1,R2 are two relationships between E1 and E2. where R1 is one to many and R2 is many to many. R1 and R2 do not have any attributes of their own.How many minimum number of tables are required to represent this situation in relational model?

Options A)4      B)3          C)2          D)1.
Answer B.
Explanation.

Let relation R1 is composed of table emp(ssn,name, Superssn). A query like this can be made from single table like. Find the employee ssn, name, super visor ssn, supervisor name from emp table. An ssn will map to a single supervisor and a supervisor can map to many employee.
In many to many relationship like  "a student can take many subjects and many students can take a subject". it needs two table.eg. student(rollno,subject,name) where pk= roll no and subject. and fk = subject.
Foreign key map to pk of subjet (Subjetid, Subjname, Roomno).
Hence it required 3 tables

Sunday, 22 November 2015

Q6,p3,j15 , The number of flip flops required to design a modulo 272 counter is

Options  A)8       B)9             C)27.                  D.)11.

Answer B

Explanation.
 The number of flipflop required to design a Modulo 272 counter is Log2 272.
  8 flips flops  do the work up to 256. hence we need 9 flip flops to achieve the task.

Q4,p3,j15. The equivalent hexadecimal notation for octal number 2550276 is.

Options  A)FADED  B)AEOBE    C)ADOBE           D)ACABE
Answer C.
Explanation .
We write binary equivalent of every no in a group of 3.

So 2550276 is written as below.

010 for 2.
101 for 5
and similarly.

so we organize every thing as.
010101101000010111110.
Now this binary representation is grouped in to 4 to get the Hexadecimal notation.

0 1010 1101  0000   1011   1110 so after converting every group in HEX. we get
ADOBE.

Q3,p3,j15. RST 7 instruction in 8085 microprocessor is equivalent to.

Option A)call 0010 H   B) Call 0034 H       C)CALL 0038 H             D)CALL 003CH
Answer C.

Explanation.
Interrupt
Vector Address
RST 0
0000H
RST 1
0008H
RST2
0010H
RST3
0018H
RST4
0020H
RST5
0028H
RST6
0030H
RST7
0038H

Q2,p3,j15. Consider a 32 bit microprocessor with a 16 bit external data bus,driven by 8 Mhz input clock.Assume that microprocessor has a bus cycle whose minimum duration equals to four input clock cycle. What is the maximum data transfer rate for this micro processor.

Options A) 8x10 6bytes /sec B) 4x10 6 bytes/sec   c) 16x 10 6 bytes/sec
Answer. B
Explanation.
Minimum bus cycle duration = 4 clock cycle.
maximum bus cycle rate= 8 MHZ/4= 2M/s where 1 MHZ= 1000000/sec.
maximum data transferred per  bus cycle rate= 2bytes.
data transferred rate per second = data transferred  per bus cycle* bus cycle rate.= 2bytes*2M/s

4* 106 bytes/sec

Friday, 2 October 2015

Q1. Paper 3, j15. For the 8 bit word 00111001.the check bits stored would be 0111. When word is read from memory, the check bits are calculated to be 1101.what is the data word that was read from memory?



       1.  10011001.
2.    00011001. 
3.   00111000.
4. 11000110.

Answer 2.

Explanation .
Given 8 bit word 00111001. encoded in d8=0 d7=0 d6=1 d5=1 d4=1 d3=0 d2=0 d1=1.
parity is calculated as 01111  which are written as p8p4p2p1.
p1=1
p2=1
p4=1
p8=0.

encode the string as 
d8d7d6d5p8d4d3d2p4d1p2p1.
001101001111.
check bit at other end is 1101.
c1=1
c2=0
c4=1
c8=1. 
xor(1101,0111)=1010 . its decimal conversion is 10. so 10th bit is changed.
 10th bit is d6.  so we flip it. and we get
00011001