2.1 Introduction
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 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 2.1 When the key ‘A’ is pressed (Figure 2.1), 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.
2.1.1 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.
Click on the below link to download NCERT Class 11 Computer Science Encoding Schemes and Number System