Escaping reserved payload bytes once

A device serializes binary messages using byte escaping, a reversible replacement of reserved payload bytes with special byte sequences. Every byte below is written in hexadecimal.


The format reserves byte 7E as a message delimiter and byte 7D as an escape marker. Apply these rules to each original payload byte exactly once:

  • Replace 7E with 7D 5E.
  • Replace 7D with 7D 5D.
  • Copy every other byte unchanged.

Complete the table with each escaped payload and its byte count. Enter byte sequences as two-digit hexadecimal values separated by single spaces, and counts as exact integers. Do not include message delimiters in either answer.

PayloadOriginal payload bytesEscaped payload bytesEscaped byte count
A7E 20 7D
B7D 5E
C00 7E 7E

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Serialization Questions: