Home Virtual University CS101 Assignment 1 Solution Fall 2021 Perfect Solution

CS101 Assignment 1 Solution Fall 2021 Perfect Solution

by Usman Ali
CS101 Assignment 1 Solution Fall 2021 Perfect Solution

Are you searching for CS101 Assignment 1 Solution Fall 2021 Perfect Solution ? If yes then Congratulation’s because you landed at the right page. I personally contact with an Computer science professor that really well explained all your assignment questions to help you people.

CS101 Assignment 1 Solution Fall 2021 Perfect Solution

Question  No 1

  1. Encode the following decimal fractional value to binary floating point notation using the 8-bit floating-point format.
  • -3.5
  1. Decode the following 8-bit floating point binary value to decimal fractional value.
  • 00101100

Hint: Use the following 8-bit floating-point notation to convert these values.

Solution:

PART A:

Step 1:

As the given Number is negative that’s why Sign bit of Floating point notation will be 1

Step : 2

Now we will Convert 3.5 Decimal Number into Binary One.

222Redix2
421 1/2
011.1

3.5 in a Binary One is 011.1

Find Mantisa:

To Get the Mantisa, we must have to move 3 numbers towards right side in the concluded binary number that is 011.1.

And after moving:

.0111

So, our Exponent is Positive 3 in excess notation 4 is 111

Our Final 8 bit floating Notation is

11110111

PART B:

Decode the following 8-bit floating point binary value to decimal fractional value.

00101100

Solution:

FOR MANTISA:

Using the strategy of dividing the given number in four bit pattern then Our Mantisa will be:

1100

FOR EXPONENT:

Our Exponent is 010

And in 3 bit Excess notation 010 is equal to -2.

Our Exponent is Negative that’s why we will shift our redix of .1100 towards the left Side.

Then we will get the below given result;

.101100

Now we will convert the given Binary value into Decimal value.

.101100 is equal to 1011.

.2-12-22-32-4
.1/21/41/81/16
 1011

1/2 + 0 + 1/8 + 1/16 =

8 + 2 + 1 / 16  =  11/16

=  0.6875 Answer

Perform the binary addition on the following decimal numbers:

  • 46 3

8

and 92 7

8

Solution:

As we have given data and Now we will convert this decimal data into binary addition but one by one:

PART 1:

46 3/8

252423222120
32168421
101110

And Redix:

2-12-22-32-4
1/21/41/81/16
0110

PART 2

92 7/8

26252423222120
6432168421
1101110

And Redix:

2-12-22-32-4
1/21/41/81/16
1110

Now Part One in Binary Digit is 101110.0110

While Part Two in Binary Digit is 1011100.1110

Now we will add these Binary Numbers:

Addition:

 1011100.1110
 0101110.0110
                                                                                                                                                 +
10001011 0100

So we Got the Final Binary Number

Answer is 10001011.0100

Question Number 3

CircuitsWhat would be the output when the upper input is 1 and the lower input is 0? What would be the output when upper input is 0 and the lower input is 1? 
A00
B01

CS101 Assignment 1 Solution Fall 2021

By ConceptsBuilder

Question  No 1

  1. Encode the following decimal fractional value to binary floating point notation using the 8-bit floating-point format.
  • -3.5
  1. Decode the following 8-bit floating point binary value to decimal fractional value.
  • 00101100

Hint: Use the following 8-bit floating-point notation to convert these values.

Solution:

PART A:

Step 1:

As the given Number is negative that’s why Sign bit of Floating point notation will be 1

Step : 2

Now we will Convert 3.5 Decimal Number into Binary One.

222Redix2
421 1/2
011.1

3.5 in a Binary One is 011.1

Find Mantisa:

To Get the Mantisa, we must have to move 3 numbers towards right side in the concluded binary number that is 011.1.

And after moving:

.0111

So, our Exponent is Positive 3 in excess notation 4 is 111

Our Final 8 bit floating Notation is

11110111

PART B:

Decode the following 8-bit floating point binary value to decimal fractional value.

00101100

Solution:

FOR MANTISA:

Using the strategy of dividing the given number in four bit pattern then Our Mantisa will be:

1100

FOR EXPONENT:

Our Exponent is 010

And in 3 bit Excess notation 010 is equal to -2.

Our Exponent is Negative that’s why we will shift our redix of .1100 towards the left Side.

Then we will get the below given result;

.101100

Now we will convert the given Binary value into Decimal value.

.101100 is equal to 1011.

.2-12-22-32-4
.1/21/41/81/16
 1011

1/2 + 0 + 1/8 + 1/16 =

8 + 2 + 1 / 16  =  11/16

=  0.6875 Answer

Perform the binary addition on the following decimal numbers:

  • 46 3

8

and 92 7

8

Solution:

As we have given data and Now we will convert this decimal data into binary addition but one by one:

PART 1:

46 3/8

252423222120
32168421
101110

And Redix:

2-12-22-32-4
1/21/41/81/16
0110

PART 2

92 7/8

26252423222120
6432168421
1101110

And Redix:

2-12-22-32-4
1/21/41/81/16
1110

Now Part One in Binary Digit is 101110.0110

While Part Two in Binary Digit is 1011100.1110

Now we will add these Binary Numbers:

Addition:

 1011100.1110
 0101110.0110
                                                                                                                                                 +
10001011 0100

So we Got the Final Binary Number

Answer is 10001011.0100

Question Number 3

CircuitsWhat would be the output when the upper input is 1 and the lower input is 0? What would be the output when upper input is 0 and the lower input is 1? 
A00
B01

CS101 Assignment 1 Solution Fall 2021 Perfect Solution

Related Posts

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.