Wednesday 15 June 2022

Download Solved CS302 Assignment No1 Solution 2022

 CS302 Assignment No 1 Solution - Download Solved CS302 Assignment Solution 2022

QuestionNo 01                                                                                               Marks (10)

The stated number is represented as a positive decimal number, you are required to represent it as a Binary Floating-Point Number having 1 Sign bit, 8-bit Exponent, and 23 bits Mantissa.

490.286468506

Answer No 1:

Firstweconvert490 intobinary:

Division

quotient

remainder

490

2

245

0

245

2

245

1

122

2

122

0

61

2

61

1

30

2

30

0

15

2

15

1

7

2

7

1

3

2

3

1

1

2

0

1

 So,ourbinaryformof“490”is:(111101010)2

 

 

Nowforfraction part

0.286468506 ×2=0+0.572 937012

0.572937012 ×2=1+0.145 874024

0.145874024 ×2=0+0.291 748048

0.291748048 ×2=0+0.583 496096

0.583496096 ×2=1+0.166 992192

0.166992192 ×2=0+0.333 984384

0.333984384 ×2=0+0.667 968768

0.667968768 ×2=1+0.335 937536

0.335937536 ×2=0+0.671 875072

0.671875072 ×2=1+0.343 750144

0.343750144 ×2=0+0.687 500288

0.687500288 ×2=1+0.375 000576

0.375000576 ×2=0+0.750 001152

0.750001152 ×2=1+0.500 002304

0.500002304 ×2=1+0.000 004608

0.000004608 ×2=0+0.000 009216

0.000009216 ×2=0+0.000 018432

0.000018432 ×2=0+0.000 036864

0.000036864 ×2=0+0.000 073728

0.000073728 ×2=0+0.000 147456

0.000147456 ×2=0+0.000 294912

0.000294912 ×2=0+0.000 589824

0.000589824 ×2=0+0.001 179648

0.001179648 ×2=0+0.002 359296

Wedidn'tgetanyfractionalpartthatwasequaltozero.Butwehadenoughiterations (over Mantissa limit) and at least one integer that was differentfromzero=>FULLSTOP(losingprecision...)

So,ourbinaryformof“0.286468506”is:

(0.01001001 010101100000 0000)2

So our complete binary form is 490. 286468506 is

(111101010.010010010101011000000000)2

Normalizeexponentformofthis490.286468506 numberis:

=111101010.0100100101010110000000002*20

=1.11101010 0100100101010110000000002*28

So, our sign bit is “0”

Exponent=(8+127)10

= (135)10

Toconvertexponentintobinary

135÷2=67+ 1;

67÷2=33+ 1;

33÷2=16+ 1;

16÷2=8 +0;

8÷2 =4 +0;

4÷2=2 +0;

2÷2=1 +0;

1÷2=0 +1;

So (135)10 =(10000111)2

Nowformantissa

=1.111010100100100101010110000000002

=11101010010010010101011

So,

0

-

1

0

0

0

0

1

1

1

-

1

1

1

0

1

0

1

0

0

1

0

0

1

0

0

1

0

1

0

1

0

1

1

 

Question No 02                                                                                  Marks (10)

Simplify the stated 5 Variable Boolean Expression using Karnaugh Map.

 

With the following Don’t Care Conditions

Answer No 2:

 

GivenData:

Minterm=1,2,3,14,20,21,22,23,27,28

DontCare=6,7,11,12,16,26,30

Variable=A,B,C,D,E

 

A,B\C,D,E

000

001

011

010

110

111

101

100

00

00

11

13

12

X6

X7

05

04

01

08

09

X11

010

114

015

013

X12

11

024

025

127

X26

X30

031

029

128


No comments:

Post a Comment