ASCII Flashcards
ord()
Function it takes a character and returns the ASCII decimal value (an integer) of the character.You can show this with the type() function.
chr()
Converts the ASCII decimal value and converts the character it represents.
Encryption
Is the process of encoding information for security purposes
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding standard used in computers and other devices to represent text.
How many bits does ASCII use?
ASCII uses 7 bits to represent 128 characters.
What types of characters does ASCII include?
ASCII includes control characters (non-printable) and printable characters such as uppercase and lowercase English letters, digits, punctuation marks, and special characters.
What is the ASCII code for the letter ‘A’?
The ASCII code for the letter ‘A’ is 65.
What is the ASCII code for the number ‘1’?
The ASCII code for the number ‘1’ is 49.
What is the limitation of ASCII?
ASCII is limited to basic characters used in English, prompting the development of other encoding systems like Unicode.
What is Unicode?
Unicode is a universal standard character set, with the first 128 characters being the same as ASCII.
What is UTF-8?
UTF-8 (Unicode Transformation Format - 8-bit) is a character encoding system that encodes all possible characters in the Unicode character set.
What are the key features of UTF-8?
Key features of UTF-8 include variable-length encoding, backward compatibility with ASCII, efficiency for English, and universal support.
How does UTF-8 encode ASCII characters?
UTF-8 encodes all ASCII characters (values 0–127) as a single byte.
How many bytes does UTF-8 use for other characters?
UTF-8 uses 2 to 4 bytes for characters beyond ASCII, including symbols and letters from other languages.
Why is UTF-8 efficient for English?
UTF-8 is efficient for representing text in English since ASCII characters only require 1 byte.
Why is UTF-8 widely used?
UTF-8 is the most common encoding format used on the web and in modern systems because it can handle any character from the Unicode standard.
What is an example of UTF-8 encoding?
The letter ‘A’ (ASCII value 65) is encoded as 01000001 in UTF-8 (1 byte).