Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(1) Suppose a packet contains three 16-bit data, which are represented by hexade

ID: 3603603 • Letter: #

Question

(1) Suppose a packet contains three 16-bit data, which are represented by hexadecimal format as OxFD16, 0xABCD, Ox950C. Compute the checksum. Show all your work. (2) Suppose the Round-trip time between 2 computers is 180ms, the network bandwidth between these two computers is 10Mbps, each transmitted packet between them has a constant size of 1000 bytes. what is the TCP congestion window value in order to make the network utilization to reach 60%? (Hint: the size of congestion window dictates how many packets or bytes you can push to the network)

Explanation / Answer

The conversion is best done by first converting to binary.  We consider conversion of 23.375 from decimal to hexadecimal.  We have noted that the value is 10111.011 in binary.

To convert this binary number to hexadecimal we must group the binary bits in groups of four, adding leading and trailing zeroes as necessary.  We introduce spaces in the numbers in order to show what is being done.

         10111.011 = 1 0111.011.

To the left of the decimal we group from the right and to the right of the decimal we group from the left.  Thus 1.011101 would be grouped as 1.0111 01.

At this point we must add extra zero

Non-terminating Fractions

We now make a detour to note a surprising fact about binary numbers – that some fractions that terminate in decimal are non-terminating in binary.  We first consider terminating and non-terminating fractions in decimal.  All of us know that 1/4 = 0.25, which is a terminating fraction, but that 1/3 = 0.333333333333333333333333333333…, a non-terminating fraction.

We offer a demonstration of why 1/4 terminates in decimal notation and 1/3 does not, and then we show two proofs that 1/3 cannot be a terminating fraction.

Consider the following sequence of multiplications

         1/4 · 10 = 2½

         ½ · 10 = 5.  Thus 1/4 = 25/100 = 0.25.

es to form four bit groups.  So

         10111.011 = 0001 0111.0110.

Conversion to hexadecimal is done four bits at a time.  The answer is 17.6 hexadecimal.

Another (More Confusing Way) to Convert Decimal to Hexadecimal

Some readers may ask why we avoid the repeated division and multiplication methods in conversion from decimal to hexadecimal.  Just to show it can be done, here is an example.

Consider the number 7085.791748046875.  As an example, we convert this to hexadecimal.

The first step is to use repeated division to produce the whole–number part.

         7085 / 16         = 442          with remainder = 13            or hexadecimal D

           442 / 16           = 27          with remainder = 10            or hexadecimal A
             27 / 16             = 1          with remainder = 11            or hexadecimal B
               1 / 16             = 0            with remainder = 1            or hexadecimal 1.

The whole number is read bottom to top as 1BAD.

Now we use repeated multiplication to obtain the fractional part.

    0.791748046875 · 16 =        12.6679875      Remove the 12      or hexadecimal C

              0.6679875 · 16 =        10.6875            Remove the 10      or hexadecimal A

                    0.6875 · 16 =        11.00                Remove the 11      or hexadecimal B

                        0.00 · 16 =          0.0

The fractional part is read top to bottom as CAB.

The hexadecimal value is 1BAD.CAB, which is a small joke on the author’s part.

Long division is of very little use in converting the whole number part.  It does correctly produce the first quotient and remainder.