Would you like to react to this message? Create an account in a few clicks or log in to continue.
83 8 Create Your Own Encoding Codehs Answers Exclusive -
The Goal of the Assignment
The objective of "Create Your Own Encoding" is to help students understand how computers represent complex data (like text or colors) using binary numbers.
In this specific exercise:
- You are given a Message (a string of text).
- You need to convert that message into a list of Numbers based on a custom cipher or existing standards (like ASCII).
- Optionally, you may need to convert those numbers into Binary strings to simulate how data is stored electronically.
4. Encoding Algorithm (Pseudocode)
function encode83_8(input):
alphabet = [list of 83 symbols]
indexMap = symbol: idx for idx, symbol in enumerate(alphabet)
padding = '~'
blockSize = 8
output = ""
for i from 0 to len(input) step blockSize:
block = input[i : i+blockSize]
if len(block) < blockSize:
block = block + padding * (blockSize - len(block))
// Convert block to base-83 number as array of digits
for ch in block:
output += alphabet[indexMap[ch]]
return output
Note: This simplified pseudocode outputs the mapped symbols directly; an alternative is to compute a single integer per block: 83 8 create your own encoding codehs answers exclusive
value = 0
for ch in block:
value = value * 83 + indexMap[ch]
// Optionally, store or transmit 'value' as needed
Concept of the Exercise
In “Create Your Own Encoding,” you typically: The Goal of the Assignment The objective of
- Design a custom encoding scheme (e.g., map letters → custom symbols, numbers, or bit patterns).
- Write a program that encodes a given string using your scheme.
- Write a program that decodes an encoded message back to the original text.
2. Definition of the 83-8 Encoding
- Alphabet: 83 symbols consisting of:
- Uppercase A–Z (26)
- Lowercase a–z (26)
- Digits 0–9 (10)
- Space (1)
- Common punctuation: . , ? ! ' " - _ (8)
- A special padding symbol: ~ (1)
- Additional symbols to reach 83 total: @ # $ % ^ & * (6)
(Total = 26+26+10+1+8+1+6 = 78 — to make exactly 83, add five more symbols: + = / \ |)
Final count: 83 symbols.
- Each symbol is assigned an index 0..82.
- Encoding process:
- Map each input character to its index.
- Pack indices into a single large integer per block by interpreting the sequence as base-83 digits.
- Output each block as an 8-digit base-83 number (left-padded with index-0 symbol if needed), represented in a human-readable form by converting each base-83 digit back to the corresponding symbol.
- Block size: 8 symbols per block (hence "83-8"). Short final block is padded with the padding symbol (~).
Example Approach (Python)
Common student mistakes & how to correct them
- Not ensuring fixed-length codes (e.g., mixing 1- and 2-digit tokens) — require delimiters or fixed width.
- Forgetting wrap-around in shift encodings — show modular arithmetic.
- Reusing code units for multiple characters — emphasize one-to-one mapping.
- Ignoring space or punctuation — include them in the alphabet or define placeholder tokens.
Example
msg = "hello world"
encoded = encode(msg)
decoded = decode(encoded)
print("Original:", msg)
print("Encoded: ", encoded)
print("Decoded: ", decoded)
You are given a Message (a string of text)