CHAPTER - 2 (Data Representation)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Class – XI (CS-Python) CHAPTER-2 (Data Representation) Page 1 of 8

CHAPTER-2
DATA REPRESENTATION

Digital Number System: In digital representation various number systems are used. The most common number
systems are decimal, octal, and hexadecimal systems. 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.

Number Conversion:
1. Decimal to Binary Conversion:
Class – XI (CS-Python) CHAPTER-2 (Data Representation) Page 2 of 8

Example:

2. Binary to Decimal Conversion:


Class – XI (CS-Python) CHAPTER-2 (Data Representation) Page 3 of 8

3. Decimal to Octal Conversion:

4. Octal to Decimal Conversion:


Class – XI (CS-Python) CHAPTER-2 (Data Representation) Page 4 of 8
Class – XI (CS-Python) CHAPTER-2 (Data Representation) Page 5 of 8

5. Binary to Octal & Octal to Binary Conversion:

6. Decimal to Hex Conversion:

7. Hex to Decimal Conversion:


Class – XI (CS-Python) CHAPTER-2 (Data Representation) Page 6 of 8

8. Binary to Hex Conversion:

9. Hex to Binary Conversion:


Class – XI (CS-Python) CHAPTER-2 (Data Representation) Page 7 of 8

Representing Unsigned Integers in Binary: An unsigned integer can be either a positive integer or zero but
never a negative integer.
 In a single decimal digit, we can write a number between 0 and 9 (Maximum number is 9).
 In two decimal digit, we can write a number between 0 and 99 (Maximum number is 99).
 In three decimal digit, we can write a number between 0 and 999 (Maximum number is 999). and so on.

Table: Unsigned binary integer ranges


Binary Addition: There are four points or steps to remember before proceeding through the operation.
These are

Representing Character/String in Memory: A computer can handle numeric and non numeric data like
letters, punctuation marks and other special characters. Some predefined codes are used to represent numeric and non
numeric characters.
ASCII: ASCII stands for American Standard Code for Information Interchange. 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. It is an
extended form of ASCII-7.
For Ex:
ASCII Value for A is 65 which is equivalent to 1000001 in binary.

ISCII: A lot of efforts have gone into facilitating the use of Indian languages on computers. In 1991, the
Bureau of Indian Standards adopted the ISCII. It is an 8 bit code which allows English and Indian Scripts
alphabets to be used simultaneously. Characters coded in ISCII need 8 bits for each character.
Class – XI (CS-Python) CHAPTER-2 (Data Representation) Page 8 of 8

Unicode: The new universal coding standard being adopted all newer platforms. Unicode provides a unique
number for every character.
“No matter what the platform,
No matter what the program,
No matter what the language. “
This standard has been adopted by such industry leaders as Apple, HP, IBM etc. Unicode version 3.0
represented 49,194 characters, whereas Unicode version 3.1 has added many more characters, making the
character count to 94,140.

You might also like