Showing posts with label Data Representation. Show all posts
Showing posts with label Data Representation. Show all posts

A computer works on different characters like Alphabets, Punctuation marks, Numeric characters, and other special characters. But the computer or other devices can not understand these characters so it uses some encoding standards to represent characters. Some standards are discussed below:-

 

character encoding,ascii,iscii,unicode


ASCII

ASCII stands for American Standard Code for Information Interchange and pronounced as “ask-ee”. This code is the most widely used alphanumeric code in computers. It is available in two forms 7- bit and 8-bit code. ASCII-7 can represent 128 characters. Out of 7 bits, 3 are zone bits and 4 are numeric bits. ASCII-8 can represent 256 characters. Out of 8 bits, 4 are zone bits and 4 are numeric bits. It is an extended form of ASCII-7. It represents all of the standard keyboard characters as well as control functions.

Eg: 0(41) – 0101001 , a(97) – 1100001 , 1(49) – 0110001 , A(65) – 1000001

-----------------------------------------ASCII-7------------------------------------------

! 33 ) 41 1 49 ? 63 ^ 94
“ 34 * 42 2 50 @ 64 _ 95
# 35 + 43 9 57 A 65 ` 96
$ 36 , 44 : 58 B 66 a97
% 37 - 45 ; 59 Z 90 z122
& 38 . 46 < 60 [ 91 { 123
‘ 39 / 47 = 61 \ 92 | 124
( 40 0 48 > 62 ] 93 }, ~ 125 ,126

-------------------------------------------------------------------------------------------


ISCII

It stands for Indian Standard Code for Information Interchange. It was developed in 1991 to use the Indian language on computers and the Bureau of Indian Standards adopted the ISCII. It is an 8-bit code capable of encoding 256 characters. These codes are used for 10 Indian scripts Devanagari, Punjabi, Gujarati, Odia, Bengali, Asami, Telgu, Kannad, Malayalam, and Tamil. ISCII code retains all ASCII characters also.

Unicode

Unicode is a new universal coding standard adopted by all new platforms. Unicode provides a unique number for every character irrespective of the platform, program, and language. It is a character coding system designed to support the worldwide interchange, processing, and display of the written texts of diverse languages. Unicode is a 16-bit code capable of representing more than 65000 characters.

 

 Number System

Each number system has a base also called a Radix. A decimal number system is a system of base 10, binary is a system of base 2, octal is a system of base 8, and hexadecimal is a system of base 16. 
These bases are the maximum number that the numbering system allows. For Example in base 10, we can count from 0 to 9, that is,10 digits. 

number system, number system conversion


Conversion between different Number Systems

Decimal To Binary

Method to convert a Decimal number into its Binary equivalent:
1. Divide the decimal number by 2.
2. Take the remainder and write it on the other side.
3. Again divide the quotient by 2.
4. Repeat the same process until the decimal number cannot be divided further.
5. Write the remainders in reverse order and you get the resultant binary number.
 

Example : 

Q1: Convert the Decimal number 201 into its Binary equivalent.

201 / 2 = 100          1
100 / 2 = 50            0
50 / 2 = 25              0
25 / 2 = 12              1
12/ 2 = 6                 0
6 / 2 = 3                  0
3 / 2 = 1                  1
1 / 2 = 0                  1

Answer: (11001001)2

Fractional Decimal to Binary

The conversion of the number before the point is similar to the above method but the conversion of the number after the point is done differently. 

Example

Q. Convert Decimal number 201.47 into its binary equivalent.

The binary for 201 is simply done in the above example. So, (201)10  = (11001001)2

Let us convert (0.47)10 
 
Multiply 0.47 By 2                                                         0.94
Again multiply fraction part 0.94 by 2                             1.88
Again multiply fraction part 0.88 by 2                             1.76
Same as above 0.76 X 2                                                1.52
Same, 0.52 X 2                                                             1.04

Repeat this process until the fraction part become 0. But like above in some cases, it can be a long process so we will calculate only 5-6 digits. And write all integer values from top to bottom.

So, the Final Result is (201.47)10 = (11001001.01111)2