
Representation of non-numeric data in computer
A. Representation of alphanumeric data
• There are 4 types of alphanumeric data: letters, digits, special
symbols and control characters.
• The most common codes to represent alphanumeric data is
ASCII code
• American Standard Code for Information Interchange (ASCII)
• Each character uses 7 bits e.g.
• ‘A’ is represented by ‘1000001’ (65 in decimal)
• ‘a’ is represented by ‘1100001’ (90 in decimal)
• ‘1’ is represented by ‘0110001’ (49 in decimal)
• ‘?’ is represented by ‘0111111’ (63 in decimal)
• Delete is represented by ‘1111111’ (127 in decimal)
B. Representation of Chinese characters
• Chinese characters are non-alphanumeric characters
• There are over ten thousand Chinese characters that are
commonly used
• Since 16 bits can represent 216 (65536) patterns, 16 bits (2
bytes) are needed to represent a Chinese character.
• Common code used to represent traditional Chinese characters
is BIG-5
• Common codes used to represent simplified Chinese
characters is GB(Guobiao), used in Taiwan and HZ(Hanzi) used
in Mainland China.
C. Representation of non-alphanumeric characters
•Unicode can represent characters of different languages and
is accepted globally. It includes Chinese (traditional and
simplified), English, French, Japanese, Korean and many others.
Exercise
1. Write down the ASCII codes (in decimal) of the following
message.
‘Hello! John’
2. Write down the message represented by the following ASCII
codes.
67 111 109 112 117 116 101 114 32 63
3. How many bits are used to represent a character in ASCII code?
4. How many bytes are used to represent a Chinese character in
BIG-5 code?
5. Write down the hexadecimal BIG-5 codes of the following Chinese
characters?
再叫古仔
6. Write down the binary BIG-5 codes of the following Chinese
characters?
再叫古仔