Encoding Schemes

 Encoding Schemes 

Have you ever thought how the keys on the computer keyboard that are in human recognisable form are interpreted by the computer system? This section briefly discusses text interpretation by the computer.

We owe a lot to the Indians, who taught us how to count, without which no worthwhile scientific discovery could have been made.”–Albert Einstein

We have learnt in the previous chapter that computer understands only binary language of 0s and 1s. Therefore, when a key on the keyboard is pressed, it is internally mapped to a unique code, which is further converted to binary.

Example : When the key ‘A’ is pressed, it is internally mapped to a decimal value 65 (code value), which is then converted to its equivalent binary value for the computer to understand.

Similarly, when we press alphabet ‘अ’ on hindi keyboard, internally it is mapped to a hexadecimal value 0905, whose binary equivalent is 0000100100000101. 

So what is encoding? The mechanism of converting data into an equivalent cipher using specific code is called encoding. It is important to understand why code value 65 is used for the key “A” and not any other value? Is it same for all the keyboards irrespective of their make?

Yes, it is same for all the keyboards. This has been possible because of standard encoding schemes where each letter, numeral and symbol is encoded or assigned a unique code. Some of the well-known encoding schemes are described in the following sections.

American Standard Code for Information Interchange (ASCII)

In the early 1960s, computers had no way of communicating with each other due to different ways of representing keys of the keyboard. Hence, the need for a common standard was realised to overcome this shortcoming. Thus, encoding scheme ASCII was developed for standardising the character representation. ASCII is still the most commonly used coding scheme.

Initially ASCII used 7 bits to represent characters. Recall that there are only 2 binary digits (0 or 1). Therefore, total number of different characters on the English keyboard that can be encoded by 7-bit ASCII code is 27 = 128. Table 2.1 shows some printable characters for ASCII code. But ASCII is able to encode character set of English language only.

Table 2.1 ASCII code for some printable characters  
Character Decimal Value
Space 32
! 33
# 35
$ 36
% 37
& 38
( 40
) 41
@ 64
A 65
B 66
C 67
D 68
E 69
F 70
G 71
H 72
I 73
` 96
a 97
b 98
c 99
d 100
e 101
f 102
g 103
h 104
i 105

Example : Encode the word DATA and convert the encoded value into binary values which can be understood by a computer.

• ASCII value of D is 68 and its equivalent 7-bit binary code = 1000100

• ASCII value of A is 65 and its equivalent 7-bit binary code = 1000001

• ASCII value of T is 84 and its equivalent 7-bit binary code = 1010100

• ASCII value of A is 65 and its equivalent 7-bit binary code = 1000001

Replace each alphabet in DATA with its ASCII code value to get its equivalent ASCII code and with 7-bit binary code to get its equivalent binary number as shown in Table 2.2.

Indian Script Code for Information Interchange (ISCII)

In order to facilitate the use of Indian languages on computers, a common standard for coding Indian scripts called ISCII was developed in India during mid 1980s. It is an 8-bit code representation for Indian languages which means it can represent 28=256 characters. It retains all 128 ASCII codes and uses rest of the codes (128) for additional Indian language character set. Additional codes have been assigned in the upper region (160– 255) for the ‘aksharas’ of the language. 

Leave a Comment