Error Detection and Correction in Data Communication

Error Detection and Correction in Data Communication

Before going toward error detection and correction, let bit explore the byte stuffing which accrues in packet transmission.

What is Byte Stuffing?

Byte stuffing is a data encoding technique used in computer networking to ensure the reliable transmission of information, particularly in the context of data framing. It involves the insertion of special control characters, known as “flag” or “escape” characters, into the data stream to distinguish them from the actual data.

The primary purpose of byte stuffing is to avoid ambiguity in data communication, especially when the data might contain patterns or sequences that could be misinterpreted as control characters by the receiving end. Here’s how byte stuffing works:

  1. Flag Characters: In byte stuffing, two special “flag” characters are defined, typically at the beginning and end of a frame. These flags are not part of the actual data but serve as delimiters to mark the start and end of a frame. Common flag characters are “01111110” in binary (or 0x7E in hexadecimal) and are also known as the “start-of-frame” and “end-of-frame” markers.
  2. Data Transmission: When data is sent, it can potentially include sequences that match the flag characters. If such sequences are not handled properly, it could lead to misinterpretation of the data’s boundaries.
  3. Byte Stuffing: To prevent this ambiguity, a technique called byte stuffing is employed. When the sender encounters a flag character within the data, it inserts an escape character before it. The escape character serves as an indicator that the following character should not be treated as a flag.
  4. Receiver Handling: The receiver, upon receiving the data, monitors for the escape character. When it encounters an escape character followed by another escape character, it treats the second character as the actual data and not a flag. If it encounters an escape character followed by the flag character, it interprets it as a flag and knows that it marks the start or end of a frame.
  5. De-Stuffing: To retrieve the original data, the receiver also removes the escape characters that were added during byte stuffing. This process is known as “de-stuffing.”

Byte stuffing ensures that the data and control characters are unambiguously separated within the transmitted information. It is commonly used in various networking protocols and communication systems to guarantee the integrity of the data. One well-known example is the High-Level Data Link Control (HDLC) protocol, which uses byte stuffing to delineate frames within a data stream.

Error Detection

Error detection is the process of identifying errors or data corruption that may occur during data transmission. Its primary purpose is to determine if any part of the transmitted data has been altered, lost, or corrupted in any way.

Techniques used for error detection are;

Parity Bit: In some cases, a single parity bit is used for error detection. The sender sets the parity bit to ensure that the total number of bits with a value of 1 in the data (including the parity bit) is either even or odd. The receiver checks the parity to detect errors.

Cyclic Redundancy Check (CRC): CRC is a more sophisticated error detection method used in various networking protocols. It involves polynomial division to generate a remainder, which is appended to the data. If the receiver’s calculated CRC matches the received CRC, the data is considered error-free.

Checksum: A common error detection technique involves calculating a checksum based on the data’s content. The sender generates a checksum value and sends it along with the data. The receiver also calculates its own checksum based on the received data. If the received checksum matches the calculated checksum, the data is assumed to be error-free. Otherwise, an error is detected.

How does Parity Bit Work?

A parity bit is a simple error-detection technique used in digital data communication and storage systems to help identify errors in transmitted data. It works by adding an extra bit (the parity bit) to a group of binary bits, usually a byte or word, to ensure that the total number of “1” bits in the data, including the parity bit, is either even or odd. The two common types of parity used are even parity and odd parity.

Here’s how the parity bit works:

Even Parity

  • In even parity, the total number of “1” bits, including the parity bit, must be even. If the data contains an odd number of “1” bits, the parity bit is set to “1” so that the total number of “1” bits is even.
  • Example: Suppose you want to transmit the binary data 1011001 using even parity. The number of “1” bits in the data is 4, which is even. So, the parity bit is set to “1” to make the total number of “1” bits in the combined data an even number. The transmitted data becomes 11011001.
  • Upon receiving the data, the receiver checks the parity by counting the “1” bits. If the total number is not even, an error is detected.

Odd Parity

  • In odd parity, the total number of “1” bits, including the parity bit, must be odd. If the data contains an even number of “1” bits, the parity bit is set to “1” to make the total number of “1” bits odd.
  • Example: If you want to transmit the binary data 1011001 using odd parity, you calculate that the number of “1” bits in the data is 4, which is even. To make it odd, the parity bit is set to “1,” resulting in the transmitted data 11011001.
  • At the receiving end, the receiver checks the parity by counting the “1” bits. If the total number is not odd, an error is detected.

Error Detection

  • When the data is received, the receiver calculates the parity by counting the “1” bits, including the received parity bit. If the parity doesn’t match the expected parity (even or odd), an error is detected, indicating that the data may have been corrupted during transmission.

Parity bits are a simple and effective means of detecting errors in data transmission. They can identify errors caused by single-bit flips or other minor disruptions. However, they are not suitable for correcting errors, as they can only detect the presence of errors. More advanced error-correction techniques, such as Hamming codes or Reed-Solomon codes, are used when both error detection and correction are required.

How Does Cyclic Redundancy Check (CRC) Work?

A Cyclic Redundancy Check (CRC) is an error-detection technique used in digital data communication and storage systems to identify errors or data corruption that may occur during the transmission of binary data. CRC is a more sophisticated and powerful method compared to simple parity checks. It works by generating a CRC code, also known as a CRC checksum or CRC remainder, which is appended to the data to create a codeword. The receiving end can then use this code to check for errors and detect whether the data has been corrupted during transmission. Here’s how CRC works:

Data word to be sent – 100100
Key – 1101 [ Or generator polynomial x3 + x2 + 1]
Sender Side:

The remainder is 001 and hence the encoded data sent is 100100001.

Receiver Side:
Code word received at the receiver side 100100001

The remainder is all zeros. Hence, the data received has no error.

CRC is widely used in various networking protocols, data storage systems, and communication applications. It offers a high level of error detection capability, but it should be noted that CRC is primarily for error detection, not correction. If error correction is needed, more advanced error-correcting codes, such as Reed-Solomon codes, are employed.

How Does Checksum Work?

A checksum is a simple and effective way to ensure data integrity during transmission or storage. It works by calculating a unique value, often a sum or mathematical function, based on the data being checked. This value, known as the checksum, is then sent or stored along with the data. This method makes use of the Checksum Generator on the Sender side and the Checksum Checker on the Receiver side.

Example – 
If the data unit to be transmitted is 10101001 00111001, the following procedure is used at the Sender site and Receiver site. 

10101001 subunit 1
00111001 subunit 2
11100010 sum (using 1s complement)
00011101 checksum (complement of sum)

So data transmitted to the receiver is: 10101001 00111001+ 00011101 (Data + Checksum)

Receiver Side:

10101001 subunit 1
00111001 subunit 2
00011101 checksum
11111111 sum
00000000 sum’s complement

Result is zero, it means no error.

Self Evaluation

  • Why do byte stuffing is used in data communication?
  • What is the primary purpose of bit parity in error detection?
  • How does CRC differ from other error detection techniques like bit parity and checksum?
  • What is the purpose of a checksum in data communication?

388 thoughts on “Error Detection and Correction in Data Communication

  1. Wonderful goods from you, man. I have understand your stuff previous to and you’re just extremely
    excellent. I really like what you’ve acquired here, certainly like what you
    are stating and the way in which you say it. You make it entertaining and you still care for to keep it wise.
    I can’t wait to read much more from you. This is really a tremendous site.

    Here is my web page 바카라사이트

  2. F*ckin’ amazing things here. I am very glad to see your article. Thanks a lot and i am looking forward to contact you. Will you please drop me a mail?

  3. I have read a few excellent stuff here. Definitely worth bookmarking for revisiting. I wonder how a lot effort you place to create such a great informative web site.

  4. For lack of having an IPv6 ISP, I set up a ULA on my internal network for the exercise of itIf you try to reason about it like an IPv4 network, you’re going to have a bad time You just need to embrace IPv6 for what it actually is, and then enjoy the benefits I would consider link-local IPv6 a clear improvement over IPv4 I don’t need to remember any IPv6 addresses because the vast majority of my devices support mDNS I just use hostnames internally

  5. The following time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I do know it was my choice to learn, but I really thought youd have something fascinating to say. All I hear is a bunch of whining about something that you could fix if you happen to werent too busy looking for attention.

  6. I discovered your weblog site on google and test a couple of of your early posts. Continue to maintain up the very good operate. I just extra up your RSS feed to my MSN News Reader. In search of ahead to reading more from you afterward!…

  7. I simply could not depart your website before suggesting that I actually enjoyed the usual information a person supply on your guests? Is going to be again steadily in order to investigate cross-check new posts.

  8. Thank you for some other informative site. The place else could I get that type of information written in such a perfect means? I have a venture that I am simply now working on, and I’ve been at the glance out for such info.

  9. I’d have to examine with you here. Which is not one thing I usually do! I take pleasure in reading a post that may make folks think. Additionally, thanks for permitting me to comment!

  10. The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my choice to read, but I actually thought youd have something interesting to say. All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention.

  11. Hello very nice site!! Man .. Excellent .. Wonderful .. I will bookmark your web site and take the feeds also…I’m happy to seek out a lot of helpful information here in the put up, we’d like develop extra techniques on this regard, thank you for sharing.

  12. I am now not sure where you’re getting your information, however good topic. I needs to spend some time studying much more or working out more. Thanks for magnificent info I was looking for this information for my mission.

  13. Hey There. I found your blog using msn. This is an extremely well written article. I will make sure to bookmark it and return to read more of your useful info. Thanks for the post. I’ll definitely comeback.

  14. After examine a number of of the weblog posts on your website now, and I truly like your way of blogging. I bookmarked it to my bookmark web site checklist and can be checking again soon. Pls check out my web page as effectively and let me know what you think.

  15. Thanks for your marvelous posting! I definitely enjoyed reading it, you could be a great author.I will always bookmark your blog and definitely will come back at some point. I want to encourage yourself to continue your great writing, have a nice holiday weekend!

  16. Fantastic goods from you, man. I’ve understand your stuff previous to and you’re simply extremely excellent. I really like what you’ve got right here, certainly like what you’re stating and the way in which you assert it. You’re making it enjoyable and you continue to care for to keep it wise. I can’t wait to read much more from you. That is actually a tremendous site.

  17. After I initially left a comment I seem to have clicked on the -Notify me when new comments are added- checkbox and now each time a comment is added I get 4
    emails with the exact same comment. Is there an easy method you are
    able to remove me from that service? Many thanks!

  18. жекеменшік құқығының және оған қолсұқпаудың
    маңыздылығы, жекеменшік қалай пайда болды гипсовая голова
    – купить, гипсовые фигуры астана уромед
    уральск, уромед уральск инстаграм ыбыкты сай, ыбыкты сай мангистау

  19. символы автомобильных марок,
    пдд рк 2022 скачать pdf бесплатно франция климат по
    месяцам, климат франции кратко суретте жіпке ілінген жүктің астыңғы жағына жіп байланған, автокөлікпен келе жатқан жолаушылар айша
    бибі өмір баяны, айша биби туралы малимет

  20. сіз қастандықтарға сенесіз бе игры
    на двоих на пк с джойстиком на
    одном экране, рпг игры на двоих на одном пк абай жолы қат қабатта қысқаша мазмұны, абай жолы қат
    қабатта композициялық талдау еуразия сарқырамасы,
    еуразия теңіздері

  21. bgibola 2 bgibola 2
    bgibola 2 bgibola 2 (https://northernfortplayhouse.com/)
    Good day! I could have sworn I’ve visited this site before but after looking at many of the
    posts I realized it’s new to me. Anyhow, I’m definitely
    pleased I found it and I’ll be book-marking it and checking back regularly!

  22. 7upbet login 7upbet login 7upbet
    login
    When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each time
    a comment is added I get several e-mails with the same comment.
    Is there any way you can remove people from that service?
    Appreciate it!

  23. erek 40
    Fascinating blog! Is your theme custom made or did you download it from somewhere?
    A design like yours with a few simple adjustements would really make
    my blog stand out. Please let me know where you got your design.
    Thanks a lot

  24. bromo77 bromo77 bromo77 bromo77
    you are actually a excellent webmaster. The web site loading pace
    is amazing. It seems that you’re doing any unique trick.
    In addition, The contents are masterpiece. you’ve performed a
    wonderful process on this subject!

  25. online138 online138 online138
    online138
    Just desire to say your article is as amazing. The clarity to your publish is just excellent and that i could
    suppose you are knowledgeable on this subject. Well together with your permission let me to
    snatch your RSS feed to stay up to date with impending post.
    Thanks a million and please keep up the rewarding work.

  26. akun demo akun demo akun demo
    akun demo
    Whoa! This blog looks exactly like my old one! It’s on a completely different
    topic but it has pretty much the same page layout and
    design. Wonderful choice of colors!

  27. sobatgaming sobatgaming sobatgaming
    I do not even understand how I ended up here, however I assumed this post was once great.
    I do not understand who you might be however definitely you are going to a famous
    blogger if you are not already. Cheers!

  28. My brother recommended I might like this website. He was totally right. This post actually made my day. You can not imagine just how much time I had spent for this info! Thanks!

  29. Nice post. I was checking constantly this blog and I’m impressed! Very useful info specially the last part 🙂 I care for such info a lot. I was seeking this certain information for a very long time. Thank you and best of luck.

  30. обновление 1с 8.3 скачать бесплатно,
    обновление 1с 8.3 последняя версия
    жолда жүру ережесі жоспары 5 сынып, жолда жүру
    ережесі жоспары 7 сынып көркем жазу өнер, көркем жазу дағдыларын қалыптастыру жаттығулары бір
    жігіт тойда бір қызбен жауабы, бір күні жігіт қызды кездесуге шақырады

  31. құт береке, құтты деген не сынып
    жетекшінің проблемалық тақырыбы сынып
    сөзіне сөйлем құрау, өзім сөзіне сөйлем құрау ене
    мен келін арасындағы қарым-қатынас,
    ене мен келін туралы нақыл сөздер

  32. ораза кезінде тіс қанаса, ораза кезінде насыбай атуға болама призыв в армию в казахстане 2022 отсрочка, отсрочка от армии рк по семейным обстоятельствам дамыған елдер эссе, дамыған 10 мемлекет
    тізімі қазақстанның этносаралық саясаты, этносаралық деген не

  33. slot demo slot demo slot demo
    Hello there, I believe your site may be having web browser compatibility issues.
    When I take a look at your blog in Safari, it
    looks fine but when opening in IE, it’s got some overlapping issues.
    I merely wanted to give you a quick heads up! Besides
    that, wonderful site!

  34. ой топчик, скачать песни новинки мәскеуді өртеген
    хандар, тоқтамыс хан қай жерде қаза болды?
    музыкалық ойын сабақтар,
    ырғақты ойындар телу әдісін ойлап тапқан ғалым, абиссиния орталығынан шығарылған іріктемелер

  35. гадание о нем на цыганских картах таро раху козерог 4 кету рак 10 ншви
    25-16, ншви 16-18
    что означает красная нить на левой
    руке, красная нить значение приснилась цыганка с маленьким ребенком

  36. приснилась картошка к чему во
    сне преследует цифра 47 тест давление твердых тел, жидкостей и газов, тест давление
    твердых тел, жидкостей и газов ответы
    что означает во сне целоваться с покойником
    к чему снится во сне коза женщине белая

  37. Hi, I think your site might be having browser compatibility issues. When I look at your website in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, fantastic blog!

  38. A lot of what you mention is supprisingly precise and it makes me ponder why I had not looked at this with this light previously. This particular article really did turn the light on for me personally as far as this specific subject matter goes. Nonetheless there is actually just one position I am not too comfy with and while I try to reconcile that with the actual main idea of the point, allow me see exactly what all the rest of the subscribers have to say.Nicely done.

  39. You get the horny a visit today next door. No fake nails and no silicone tits, just pure natural horniness. Just come to my chat and we will live out our hottest secret fantasies.

  40. waktogel waktogel waktogel
    I feel that is among the so much significant information for me.

    And i’m glad reading your article. But should
    observation on some normal issues, The web
    site taste is wonderful, the articles is in point of fact great :
    D. Excellent process, cheers

  41. аппараты для маникюра алматы,
    аппарат для маникюра маратон лечение акне отзывы форум, косметолог прыщи цена мопеды в казахстане,
    купить мопед альфа в казахстане импорт
    из кореи в казахстан, поставщики из кореи в
    казахстан

  42. Whats up are using WordPress for your site platform?
    I’m new to the blog world but I’m trying to get started and create my own. Do
    you need any coding expertise to make your own blog?
    Any help would be greatly appreciated!

  43. Hi, Neat post. There is an issue with your web site in internet explorer, would check this… IE still is the market leader and a huge part of other people will leave out your great writing due to this problem.

  44. к чему снится личинки и черви к чему снится
    своя смерть выстрел в голову к
    чему снится что ты ругаешься с
    незнакомым человеком
    заговор молитва чтобы муж любил только жену сниться бежать от
    преследований

  45. I’m not sure why but this web site is loading
    extremely slow for me. Is anyone else having this problem or is
    it a problem on my end? I’ll check back later on and see if the problem
    still exists.

  46. компенсация расходов на дистанционную работу когда можно
    проводить шумовые работы в жилых домах как быстро
    заработать в тик токе денег подработка на машине оренбург

  47. Hey, you used to write wonderful, but the last several posts have been kinda boring?K I miss your super writings. Past few posts are just a little out of track! come on!

  48. May I simply say what a relief to uncover an individual who really understands what they’re discussing over the internet.
    You definitely understand how to bring a problem to light and make
    it important. More and more people really
    need to look at this and understand this side of
    the story. I was surprised that you aren’t more popular because you most certainly possess
    the gift.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this:
Verified by MonsterInsights