10.07.2015 Views

Data Communications Networking Devices - 4th Ed.pdf

Data Communications Networking Devices - 4th Ed.pdf

Data Communications Networking Devices - 4th Ed.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1.12 ERROR DETECTION AND CORRECTION _________________________________________ 51resulted in the probability of a random bit error occurring of approximately 1 in100 000 bits at a data transmission rate of 1200 bps. If you desired to upload ordownload a 1000-line program containing an average of 40 characters per line,atotal of 320 000 data bits would have to be transmitted. During the 4.4 minutesrequired to transfer this ®le you could expect 3.2 bit errors to occur,probablyresulting in several program lines being received incorrectly if the errors occurrandomly. In such situations you would prefer an alternative to visual inspection.Thus,a more ef®cient error detection and correction method was needed for largedata transfers.Block checkingIn this method,data is grouped into blocks for transmission. A checksum characteris generated and appended to the transmitted block and the checksum is alsocalculated at the receiver,using the same algorithm. If the checksums match,thedata block is considered to be received correctly. If the checksums do not match,the block is considered to be in error and the receiving station will request thetransmitting station to retransmit the block.One of the most popular asynchronous block checking methods is included inthe XMODEM protocol,which was the ®rst method developed to facilitate ®letransfer and is still extensively used in personal computer communications.Although the operation of this protocol is covered in detail later in this chapter,wewill focus our attention at his time on its error detection and correction capability.For information concerning the actual operation of data transfers under theXMODEM protocol the reader is referred to Section 1.15.Under the XMODEM protocol groups of asynchronous characters are blockedtogether for transmission and a checksum is computed and appended to the end ofthe block. The checksum is obtained by ®rst summing the ASCII value of eachdata character in the block and dividing that sum by 255. Then,the quotient isdiscarded and the remainder is appended to the block as the checksum. Thus,mathematically the XMODEM checksum can be represented as2Checksum ˆ R64X 12813ASCII value of characters25575where R is the remainder of the division process.When data is transmitted using the XMODEM protocol,the receiving device atthe other end of the link performs the same operation upon the block beingreceived. This `internally' generated checksum is compared to the transmittedchecksum. If the two checksums match,the block is considered to have beenreceived error-free. If the two checksums do not match,the block is considered tobe in error and the receiving device will then request the transmitting device toresend the block.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!