Вы находитесь на странице: 1из 10

Red=5 Yellow=3

R Y R Y R Y R Y R Y R Y R Y

From the above tree diagram, a. Probability of 3 sweets chosen were yellow Soln: The probability of getting all three sweets are yellow =P(Y)xP(Y)xP(Y) = = Ans.

b. At least one of the three sweets chosenis red. Soln. The maximum probability is always 1. Therefore, the probability o getting at least 1 of the 3 sweets chosen was red is, Maximum probability-Probability of getting all sweets is yellow i.e. 1= Ans.

c. At least 2 of 3 sweets are chosen were red. Soln. The possible outcomes are (RRR,RYR,RRY,YRR) = = = Ans.


A2. a. Given, (1046)10 Soln. Divisor Dividend 16 1046 16 65 16 4 0

Remainder 6 1 4

Therefore, (1046)10=(416)16

Ans.

b. (1011101011010011)2 Soln. Grouping into 4 bits, we get 1011 1010 1101 0011 Equation with the corresponding values, 10112=1110=B16 10102=1010=A16 11012=1310=D16 00112=310=316 Therefore, (1011101011010011)2 = (BAD3)16 c. (537)8 Soln. Equating the corresponding value and grouping in 4 bits 5= 101 3=011 7=111 0001 0101 1111 Again, equation with the corresponding values, 00012=116 01012=516 11112= 1510=F16 Therefore, (537)8=(15F)16

d. The sum of AB and 57 AB A=10 +36 B=11 102 (Process: B=11+7= 18-16=2 and 1 is carried over 11 +5+1=16-16=0 and again 1 is carried over) A3. a. 45=00101101 36=00100100 (8 Bits representation) The 2s compliment of 36 because it is negative i.e. 11011011 +1 11011100 Now adding with 45, 00101101 +11011100 100001001

b. -15+8 15=1111=00001111 8=1000=00001000 2s compliment of 15 because it is negative i.e. 11110000 +1 11110001 Now adding with 00001000, we get 11110001+00001000 = 11111001 Ans. c. -10*4 10=00001010 (8 bits representation) (8 bits representation)

Taking 2s compliment i.e. 11110101 +1 11110110

Now adding 4 times, we get 111110110 111110110 111110110 +111110110 111011000 Ans.

d. -25-10 25= 00011001 Taking both 2s compliment, we get 11100110 +1 11100111 Adding both, 11100111 +11110110 111011101 10= 00001010 11110101 +1 11110110 (8 bits representation)

Ans.

A4. a. In floating point representation, mantissa is stored in two methods i. 2s compliment method ii. Sign modulus method In 2s compliment method, if the mantissa is positive then it is stored as it is else if mantissa is in negative then the digits are inverted and 1 is added and then stored. In sign, modulus method the first digit represents the sign of the number if it is 0 then it is positive number and if it is 1 then it is negative number. Similarly, Exponent is also stored in two methods i. 2s complement method ii. Excess 2n-1 method The storing process of exponent is similar to that of mantissa but in excess 2n-1 format, the value 2n-1 is added to the actual exponent whether it is positive or negative to give the stored exponent. Stored exponent= true exponent+2n-1

b. Following are the steps to store numbers in floating point format. 1. Convert given numbers into binary 2. Check if converted is normalized, if not normalize if 3. Store mantissa based on given format( which can be sign modulus or 2s compliment format) 4. Store exponent based on given format( which can be 2s compliment or excess 2n-1 method) A5. a. U={x;1<=x<=10} ={1,2,3,4,5,6,7,8,9,10} U A 7 35 B

A= {2,3,4,5,7} B= {3,5,10} C={x:x is an even integer} C={2,4,6,8,10}

24

10

68 C

b. A C = {2,3,4,5,7} {2,4,6,8,10} ={2,4} Ans. ii. B C ={3,5,10} {2,4,6,8,10} ={10} Ans. iii. (A B) ={{2,3,4,5,7} {3,5,10}} ={2,3,4,5,7,10} ={1,6,8,9} Ans. i.

Section B

1. a. i. Soln. X 0 0 1 1 Soln. X 0 0 1 1 iii. Y 0 1 0 1 X+Y (X+Y) 0 1 1 0 1 0 1 0

ii.

Y 0 1 0 1

X.Y (X.Y) 0 1 0 1 0 1 1 0

X 0 0 1 1

Y 0 1 0 1

X+Y 0 1 1 1

iv. X 0 1 b i. A(A+B) =AA+AB =0+AB =AB Ans. X 1 0

ii.

B(A+B) =B(A.B) =(AB Ans.

iii.

(A.B) =(A)+(B)

=A+B Ans.

iv.

A(A+B) =A.A+A.B =A+AB =A(1+B) =A

v.

A+((A+B).B) = A + A + B + B [A + A = A and B + B = 1]

=A+1 =1 Ans.

c.
A A B
B

A .B (A .B )+(B (A+B) ) B (A+B) (A+B) (A .B )+(B (A+B) ) B (A+B)

B A+B A

d. We have, -45.375 Converting them into binary, we get 101101.001 =0.101101011x2100 Therefore, in floating point representation

In excess form, 6+2n-1 =25-1 = 6+24=6+16=22 Converting 22 into binary 22= 10110

B2. a. Following are the types of data structure. i. Queue ii. Dequeue iii. Stack b. Following are the features of data structure The queue is data structure which differs in a number of ways from the stack. It may be used in real-time processing for scheduling of jobs in the context of OS. The main feature of queue is that it is a FIFO(First-In-First-Out) structure which means that the first item to enter the queue is the first item to leave and new items always get added to the end of the queue. The feature if Dequeue is that data are push and pop (add & delete) from both ends. The stack is yet another example of data structure found quite commonly in computing which is specially used is system software. The main physical feature of stack is that it is a LIFO (Last-In Last Out) structure. It is like a pile of a dinner plates at parties.

c. We have, 1001101010 001000 Soln. Since it is stored in 2s compliment form, we have to again chage to get the original value and 1 at the beginning refers to that it is a negative number. Taking 2s compliment, 1001101010 +1 0110010110 For exponent we have, (001000)2 = 810 Now putting mantissa into normalized form we get, 0.110010110 x 28 = 011001011.0 x 28x2-8 = 011001011 Now converting into denary number system we get, 011001011=-203 Ans. d. i. Soln. From truth table, X=A.B.C+A.B.C+A.B.C+A.B.C+A.B.C

ii. Soln. X= A.B.C+A.B.C+A.B.C+A.B.C+A.B.C = C (AB + AB + AB) + C (AB + AB) = C (AB + A (B + B)) + C (B (A + A) [A + A = 1] = C (A + AB) + BC = C (A + B) + BC = AC + BC + BC Ans.

iii. Soln.

C B C C B

AC + BC + B C

TURNITIN ORIGINALITY REPORT

Вам также может понравиться