Encoding Schemes and Number System Notes
Encoding Schemes and Number System Notes
INTRODUCTION
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.
Example 2.2 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.
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.
UNICODE
There were many encoding schemes, for character sets of different
languages. But they were not able to communicate with each other, as
each of them represented characters in their own ways. Hence, text
created using one encoding scheme was not recognised by another
machine using different encoding scheme.
Therefore, a standard called UNICODE has been developed to
incorporate all the characters of every written language of the world.
UNICODE provides a unique number for every character, irrespective of
device (server, desktop, mobile), operating system (Linux, Windows,
iOS) or software application (different browsers, text editors, etc.).
Commonly used UNICODE encodings are UTF-8, UTF-16 and UTF-32.
It is a superset of ASCII, and the values 0–128 have the same character
as in ASCII.
NUMBER SYSTEM
o Each key is representing character, special symbol, function keys, etc. of
the keyboard is internally mapped to an ASCII code following an
encoding scheme. This encoded value is further converted to its
equivalent binary representation so that the computer can understand it.
o In Figure 2.1, the code for character “A” belongs to the decimal number
system and its equivalent binary value belongs to the binary number
system. A number system is a method to represent (write) numbers.
o Every number system has a set of unique characters or literals. The count
of these literals is called the radix or base of the number system. The four
different number systems used in the context of computer are shown in
Figure 2.2.
• Number systems are also called positional number system because the value of
each symbol (i.e., digit and alphabet) in a number depends upon its position
within the number.
•Number may also have a fractional part similar to decimal numbers used by us.
The symbol at the right most position in the integer part in a given number has
position 0. The value of position (also called position value) in the integer part
increases from right to left by 1. On the other hand, the first symbol in the
fraction part of the number has position number –1, which decreases by 1 while
reading fraction part from left to right.
•Each symbol in a number has a positional value, which is computed using its
position value and the base value of the number system. The symbol at position
number 3 in a decimal system with base 10 has positional value 103. Adding the
product of positional value and the symbol value results in the given number.