0% found this document useful (0 votes)
249 views2 pages

CS432 Assignment 2 Solution

The document contains solutions to two questions. Question 1 involves calculating checksums using 1's complement for given data bytes. Question 2 involves calculating total bandwidth for a given route by multiplying bandwidth demand and number of hops.

Uploaded by

Haya Aira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
249 views2 pages

CS432 Assignment 2 Solution

The document contains solutions to two questions. Question 1 involves calculating checksums using 1's complement for given data bytes. Question 2 involves calculating total bandwidth for a given route by multiplying bandwidth demand and number of hops.

Uploaded by

Haya Aira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Student id#bc210418903

Assignment CS432 no:2


Solution:

Question No. 1:

(a) Compute the checksum using 1’s complement for each of the following data bytes:

01010100 01011001 10100010 10100100


1’s complement of all values
10101011 10100110 01011101 01011011

Add 1’s complement of each of the data bytes one by one.


10101011
+ 10100110

101010001

Now this not 8 bit so we will fold the carry

10101011
+ 10100110

01010001
+ 1

Now we will add third complement


01010010
+
01011101

1 0 1 0 11 1 1
+
01011011

100001010
Now we will fold the caryy
1 0 1 0 11 1 1
+
01011011

00001010
+1

0 0 0 0 1 0 1 1 →checksum
1 1 1 1 0 1 0 0 →1’s complement
Final value:
Now we will add them
0 0 0 0 1 0 1 1 →checksum
+
1 1 1 1 0 1 0 0 →1’s complement

11111111

Question No. 2:
Suppose the shortest path = Min hop Routing is shown in red color i.e. x to b whose bandwidth’s
demand d is 27 Mbps. Calculate the Total bandwidth for the route x to b (shown in red color)
considering the following criteria.
 x = start node
 b = end node
 H = no. hops on chosen route
Moreover, the MINHOP – based on the minimum hops to each node where the path length is
optimized (i.e., shortest path available).
Note: Write all necessary formulas and show calculations.

Formulas:

MINHOPE=H=5

H=5 hops
Total bandwidth for the route=d*H
Total bandwidth for the route=27*5
Total bandwidth for the route=135Mbps

You might also like