ASCII Conceptual Questions and Answers

  1. What is the difference between ASCII and Unicode?
    Answer: ASCII uses 7 bits to represent 128 characters, including English letters, digits, and control codes. Unicode is a much larger character encoding system that includes over 140,000 characters, supporting nearly all writing systems in the world. Unicode is backward-compatible with ASCII in its first 128 characters.
  2. Why are ASCII values helpful in sorting text?
    Answer: ASCII assigns a unique numeric value to each character, so when text is sorted, it uses these numeric codes. This allows consistent and predictable ordering of characters, which is especially useful in databases, programming, and search algorithms.
  3. How are ASCII codes used in network protocols?
    Answer: ASCII codes are used to format and interpret control messages and headers in protocols like HTTP, SMTP, and FTP. For example, HTTP status lines (e.g., "HTTP/1.1 200 OK") and email commands (like HELO, MAIL FROM) are encoded using ASCII for compatibility and readability across systems.