1 of 21

NAVODAYA VIDYALAYA SAMITI� NOIDA

E-CONTENT

COMPUTER SCIENCE CLASS XI

2 of 21

INFORMATION REPRESENTATION

In order to work with data, the data must be represented inside the computer.

Digital computers represent data by means of a digit

3 of 21

Numbering Systems

Each number system has a base, also called a Radix.

A decimal number system is a system of base 10

Binary is a number system of base 2

Octal is a number system of base 8 and

Hexadecimal is a number system of base 16.

4 of 21

Symbols used in different number system

Number System

Base

Symbols used

Binary

2

0,1

Octal

8

0,1,2,3,4,5,6,7

Decimal

10

0,1,2,3,4,5,6,7,8,9

 

Hexadecimal

16

0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

Where A=10, B=11, C=12, D=13, E=14, F=15

5 of 21

Numbers in different number systems�

Decimal Number

Binary number

Octal

number

Hexadecimal

Number

0

0

0

0

1

1

1

1

2

10

2

2

3

11

3

3

4

100

4

4

5

101

5

5

6

110

6

6

7

111

7

7

8

1000

10

8

9

1001

11

9

10

1010

12

A

11

1011

13

B

12

1100

14

C

6 of 21

Converting a number from� one number system to another

We can very easily convert a number in one number system

to another.

To convert a number from decimal number system to any

other number system , repeated division method is used .

7 of 21

Converting a Decimal number to Binary number

REPEATED DIVISION METHOD

  • Repeatedly divide the decimal number with base 2, take the remainders, arrange the remainders in reverse order.

Example

Convert (37)10 to binary

37/2 =18 1

18/2 =9 0

9/2 =4 1

4/2 =2 0

2/2 =1 0

1/ 2 =0 1

(37)10 = (100101)2

8 of 21

Converting a Decimal number to Octal number

REPEATED DIVISION METHOD

  • Repeatedly divide the decimal number with base 8, take the remainders, arrange the remainders in reverse order.

Example

Convert (150)10 to octal

150/8 = 18 6

18/8 = 2 2

2/8 = 0 2

(150)10 =(226)8

9 of 21

Converting a Decimal number to Hexadecimal number�

REPEATED DIVISION METHOD

  • Repeatedly divide the decimal number with base 16, take the remainders, arrange the remainders in reverse order.

Example

Convert (175)10 to Hexadecimal

175/16 = 10 15 (F)

10/ 16 = 0 10(A)

( 175 )10 = ( AF )16

10 of 21

Converting a Binary number to Decimal number�

  • Start from the rightmost bit. Multiply each bit by its positional value and then take the sum.

Example

  • Convert the Binary number 110011 to its Decimal equivalent.

1 1 0 0 1 1

25 24 23 22 21 20

(positional values)

1 * 25 + 1 * 24 + 0 * 23 + 0 * 22 + 1 *

21 + 1 * 20

32 + 16 + 0 + 0 +2 + 1 = (51)10

(110011)10 = (51)10

11 of 21

Converting an Octal number to Decimal number�

  • Start from the rightmost bit. Multiply each bit by its positional value and then take the sum.

Example

  • Convert the Octal number 341 to its Decimal equivalent.

3 4 1

82 81 80

  • 3 * 82 + 4 * 81 + 1 * 80
  • 192+32+1 = 225

(341)8 = (225)10

12 of 21

Converting a Hexadecimal number to Decimal number�

  • Start from the rightmost bit. Multiply each bit by its positional value and then take the sum.

Example

  • Convert the Hexadecimal number (21A)16 to its Decimal equivalent.

2 1 A

162 161 160

2 * 162 + 1 * 161 + A * 160

=2 * 162 + 1 * 161 + 10 * 160

=512+16+10= (538)10

( 21A )16 = ( 538 )10

13 of 21

BINARY ADDITION

Computers work with binary numbers 0 and 1. They understand only binary numbers. So addition of these binary digits is very important .

14 of 21

There are 5 basic cases for binary addition�

1. 0+0 = 0

2. 0+1 = 1

3. 1+0 = 1

4. 1+1 = 10

i.e , binary 1+ binary 1

equals 0 with a carry 1

5. 1+1+1 = 11

i.e, binary 1 + binary 1 +binary 1

equals 1 with a carry 1

Example

1 carry 1

1 0 1 1

1 1 1 0

1 1 0 0 1

15 of 21

CHARACTER/STRING REPRESENTATION

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. Some of the standards are discussed below :

16 of 21

ASCII

ASCII stands for American Standard Code for Information Interchange. ASCII-7 is a 7-bit code and 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.

17 of 21

ISCII: (Indian Standard Code for Information Interchange)�

A lot of efforts have done to facilitate 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.

.

18 of 21

������� UNICODE

Unicode is a new universal coding standard adopted by all new platforms. It is promoted by Unicode Consortium which is a non profit organization. Unicode provides a unique number for every character irrespective of the platform, program and the language. It is a character coding system designed to support the worldwide interchange, processing, and display of the written texts of the diverse languages.

19 of 21

Unicode encoding schemes�

Unicode defines multiple encoding systems to represent characters. UTF-8

and UTF-32 are Unicode encoding systems.

UTF-8

  • UTF-8 is a variable width encoding to represent Unicode characters.
  • The code unit of UTF-8 is 8 bits, called an octet.
  • UTF-8 can use 1 to maximum 6 octets.
  • It is a type of multi-byte encoding.

UTF-32

  • UTF-32 is a fixed length encoding scheme.
  • This uses exactly 4 bytes to represent all Unicode characters.

20 of 21

………..THANK YOU……………..

21 of 21

BIBLIOGRAPHY:

1. Computer Science Textbook for class XI

by NCERT

2. Computer Science with Python

by Sumitha Arora

3. Computer Science with Python

by Preeti Arora