Alterna · учебный материал

Decoding

Decode the prefix codes, step-by-step decoder, EGE assignments.

Что в этом материале

Содержание и основные понятия

Back to the table of contents
Alterna · Chapter 26 · page 26.3
Decoding
Step-by-step decoding of the prefix codes.
Decoding
- Recovery of the original message from the bit line using the code tree.
GEF
OGE No. 2.4
EEG No. 4
Communications.
Decoding is a reverse process to coding, using the same tree, but moving from the root to reading bits.
01
Decoded algorithm
Algoritm
(for the Prefix code):
Start with the root of the tree.
Read the following bit: 0 to left, 1 to right.
If you have reached the page, remove the symbol, return to the root.
Repeat until all bits are processed.
For non-prefix code decoding
mixed
- One bit line can produce different texts.
Example
Code: A=0, B=10, C=110, D=111.
01101110
:
Read 0 page A. Result:
A
Code:
1101110
Read 1 to right, read 1 to the right, Read 0 to the page C. Result:
A C
Code:
1110
Read 1 to right, read 1 to the right, Read 1 ~ to the law, read 0 to sheet D. The result is:
A C D
Code:
0
Read 0 page A. Result:
A C D A
02
Walking decoder
📡
Decoder with step-by-step withdrawal
Codes (A=0;B=10;C=110;D=111)
Bits
Введите коды и биты.
03
EGE Task No. 4
📋
EEG No. 4 - Interactive Tasks
04
Decoding errors
Non-prescriptive Code — Ambivalence
If the code doesn't meet the Fano condition, one bit line can decode differently.
Example: code {0, 01}
Line
01
:
Like 0 + 01 A + B AB
Like 01 ♪ C ♪ "C"
Two options!
Such a code cannot be decoded unequivocally.
Decodeability test
For the precursor code, decoded is always unambiguous, the root root leaf root algorithm gives the result.

Structural map of textbooks