Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need a JAVA program Consider a stream R of bits to send. An n-bit Internet Checksum of the stream S is computed as follows: 1)

Need a JAVA program Consider a stream R of bits to send. An n-bit Internet Checksum of the stream S is computed as follows: 1) Break the stream R of bits in n-bit words w1, w2, ..., and wm. 2) Compute the n-bit word S = w1 + w2, if there is a carry then set S = S + 1 3) Compute S = S + w3, if there is a carry then set S = S + 1 ........ n) Compute S = S + wn, if there is a carry then set S = S + 1 Finally, the Internet Checksum = ~S (one-complement of S) Example: suppose you must send the stream R = 01011100 01111010 00011010. To compute a 8-bit checksum, 1) Break the stream R of bits in 8-bit words w1, w2, ..., and wm. In this case, we will obtain: w1 = 01011100 and w2 = 01111010 w3 = 00011010 Go to Step 2.... Compute the n-bit word S = w1 + w2, if there is a carry then set S = S + 1 ..... How to check that your checksum is right?: if you add all words wi and the checksum, the sum should be equal to 111....1 (all ones).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

3319712721, 978-3319712727

Students also viewed these Databases questions

Question

Apply your own composing style to personalize your messages.

Answered: 1 week ago

Question

Format memos and e-mail properly.

Answered: 1 week ago