ENEL 573 Lecture Notes - Lecture 1: Error Detection And Correction, Parity Bit, Checksum
Document Summary
Used when the end of frame sequence accidentally shows up in the data. Example: assume end of frame is 0 1 1 1 1 1 1 0. Consider this payload: 0 1 1 0 1 1 1 1 1 1 0 1. Some protocols work on the byte level (i. e. frames must be multiples of 8 bits) We don"t have the option to stuff single bits so we stuff bytes instead. Example: assume the start/stop byte is 0 1 1 1 1 1 1 0 -> 0x7e. If 0x7e shows up in the payload, it is replaced by (0x7d, 0x5e) If 0x7d shows up in the payload, it"s replaced by (0x7d, 0x5d) Example payload: 0x12, 0x7e, 0x67, 0x7d, 0x5e, 0x7d, 0x5d. 0x7e : 0x12, 0x7d, 0x5e, 0x67, 0x7d, 0x5d, 0x5e, 0x7d, 0x5d, 0x5d : 0x7e. At receiver, the start and end bytes are removed, and the replacements are reversed.