Class XI Computer Science(083) Chapter 2: Data Representation (Number System)


Chapter 2: Data Representation

Introduction

  • As we know that computer system stores any data in binary form that’s why we use to add the word DIGITAL with all the work related to computer. The data stored in computer is knows as Digital Data.
  • In this chapter we will see various techniques to represent data in a computer system.
  • Human beings have adopted Decimal Number System in their day to day life. In the same manner, computer system has adopted Binary Number System, Octal Number System and Hexadecimal Number System which are combinedly known as Digital Number System.

These Number Systems are -

Decimal Number System

Decimal system is consists of 10 digits which are as under

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

Base of this system is 10 and it is to be shown as-

           (5479)10

This technique is based on positional value where the weightage of a digit is as per its position. 
For ex- in number 526, the value of 5 is 500, value of 2 is 20 and value of 6 is 6. (it is as per the method of hundreds , tens and ones).
We can write above given example as-

 486 = 4 X 102 + 8 X 101 + 6 X 100

  • The left most digit is called MSD (Most Significant Digit ).
  • The right most digit is called LSD (Least Significant Digit )

Binary Number System

Binary system consists of 2 digits 0,1 known as bit.
Base of this system is 2 and it is to be shown as    (1001010101)2
In Digital systems, use of decimal system is impossible therefore use of binary system for a computer system is meaningful. Use of circuit to maintain two voltage level is very easy.
See the examples of binary number method-

1010 = 1 X 23 + 0 X 22 + 1 X 21 + 0 X 20

10.11 = 1 X 21 + 0 X 20 + 1 X 2-1 + 1 X 2-2

  • The left most digit is called MSB (Most Significant Bit ). 
  • The right most digit is called LSB (Least Significant Bit ).

Octal Number System

Octal system consists of 8 digits which are as under.
  • 0,1,2,3,4,5,6,7
Base of this system is 8 and it is to be shown as    (564)8
See the examples of Octal number method-

2256 =2 X 83 + 2 X 82 + 5 X 81 + 6 X 80

Hexadecimal Number System

Octal system consists of 16 digits which are as under.
  • 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
    Here A=10, B=11, C=12, D=13, E=14, F=15

Base of this system is 16 and it is to be shown as    (BCD54)16
See the examples of Hexadecimal number method-

AC23 =10 X 163 + 12 X 162 + 2 X 161 + 3 X 160


Relation between different Number Systems

Number Conversion
Follow the following diagram to convert a number from one system to another.





QUESTION /ANSWER 

Question 1

What are the bases of decimal, octal, binary and hexadecimal systems ?

Answer

The bases are:

  1. Decimal — Base 10
  2. Octal — Base 8
  3. Binary — Base 2
  4. Hexadecimal — Base 16

Question 2

What is the common property of decimal, octal, binary and hexadecimal number systems ?

Answer

Decimal, octal, binary and hexadecimal number systems are all positional-value system.

Question 3

Complete the sequence of following binary numbers : 100, 101, 110, ............... , ............... , ............... .

Answer

100, 101, 110, 111 , 1000 , 1001 .

Question 4

Complete the sequence of following octal numbers : 525, 526, 527, ............... , ............... , ............... .

Answer

525, 526, 527, 530 , 531 , 532 .

Question 5

Complete the sequence of following hexadecimal numbers : 17, 18, 19, ............... , ............... , ............... .

Answer

17, 18, 19, 1A , 1B , 1C .

Question 6

Convert the following binary numbers to decimal and hexadecimal:

(a) 1010

(b) 111010

(c) 101011111

(d) 1100

(e) 10010101

(f) 11011100

Answer

(a) 1010

Converting to decimal:

Binary
No
PowerValueResult
(LSB)2010x1=0
12121x2=2
02240x4=0
(MSB)2381x8=8

Equivalent decimal number = 8 + 2 = 10

Therefore, (1010)2 = (10)10

Converting to hexadecimal:

Grouping in bits of 4:

1010undefined

Binary
Number
Equivalent
Hexadecimal
1010A (10)

Therefore, (1010)2 = (A)16

(b) 111010

Converting to decimal:

Binary
No
PowerValueResult
(LSB)2010x1=0
12121x2=2
02240x4=0
12381x8=8
124161x16=16
(MSB)25321x32=32

Equivalent decimal number = 32 + 16 + 8 + 2 = 58

Therefore, (111010)2 = (58)10

Converting to hexadecimal:

Grouping in bits of 4:

0011undefined

Binary
Number
Equivalent
Hexadecimal
1010A (10)
00113

Therefore, (111010)2 = (3A)16

(c) 101011111

Converting to decimal:

Binary
No
PowerValueResult
(LSB)2011x1=1
12121x2=2
12241x4=4
12381x8=8
124161x16=16
025320x32=0
126641x64=64
0271280x128=0
(MSB)282561x256=256

Equivalent decimal number = 256 + 64 + 16 + 8 + 4 + 2 + 1 = 351

Therefore, (101011111)2 = (351)10

Converting to hexadecimal:

Grouping in bits of 4:

0001undefined

Binary
Number
Equivalent
Hexadecimal
1111F (15)
01015
00011

Therefore, (101011111)2 = (15F)16

(d) 1100

Converting to decimal:

Binary
No
PowerValueResult
(LSB)2010x1=0
02120x2=0
12241x4=4
(MSB)2381x8=8

Equivalent decimal number = 8 + 4 = 12

Therefore, (1100)2 = (12)10

Converting to hexadecimal:

Grouping in bits of 4:

1100undefined

Binary
Number
Equivalent
Hexadecimal
1100C (12)

Therefore, (1100)2 = (C)16

(e) 10010101

Converting to decimal:

Binary
No
PowerValueResult
(LSB)2011x1=1
02120x2=0
12241x4=4
02380x8=0
124161x16=16
025320x32=0
026640x64=0
(MSB)271281x128=128

Equivalent decimal number = 1 + 4 + 16 + 128 = 149

Therefore, (10010101)2 = (149)10

Converting to hexadecimal:

Grouping in bits of 4:

1001undefined

Binary
Number
Equivalent
Hexadecimal
01015
10019

Therefore, (101011111)2 = (95)16

(f) 11011100

Converting to decimal:

Binary
No
PowerValueResult
(LSB)2010x1=0
02120x2=0
12241x4=4
12381x8=8
124161x16=16
025320x32=0
126641x64=64
(MSB)271281x128=128

Equivalent decimal number = 4 + 8 + 16 + 64 + 128 = 220

Therefore, (11011100)2 = (220)10

Converting to hexadecimal:

Grouping in bits of 4:

1101undefined

Binary
Number
Equivalent
Hexadecimal
1100C (12)
1101D (13)

Therefore, (11011100)2 = (DC)16

Question 7

Convert the following decimal numbers to binary and octal :

(a) 23

(b) 100

(c) 145

(d) 19

(e) 121

(f) 161

Answer

(a) 23

Converting to binary:

2QuotientRemainder
2231 (LSB)
2111
251
220
211 (MSB)
 0 

Therefore, (23)10 = (10111)2

Converting to octal:

8QuotientRemainder
8237 (LSB)
822 (MSB)
 0 

Therefore, (23)10 = (27)8

(b) 100

Converting to binary:

2QuotientRemainder
21000 (LSB)
2500
2251
2120
260
231
211 (MSB)
 0 

Therefore, (100)10 = (1100100)2

Converting to octal:

8QuotientRemainder
81004 (LSB)
8124
811 (MSB)
 0 

Therefore, (100)10 = (144)8

(c) 145

Converting to binary:

2QuotientRemainder
21451 (LSB)
2720
2360
2180
291
240
220
211 (MSB)
 0 

Therefore, (145)10 = (10010001)2

Converting to octal:

8QuotientRemainder
81451 (LSB)
8182
822 (MSB)
 0 

Therefore, (145)10 = (221)8

(d) 19

Converting to binary:

2QuotientRemainder
2191 (LSB)
291
240
220
211 (MSB)
 0 

Therefore, (19)10 = (10011)2

Converting to octal:

8QuotientRemainder
8193 (LSB)
822 (MSB)
 0 

Therefore, (19)10 = (23)8

(e) 121

Converting to binary:

2QuotientRemainder
21211 (LSB)
2600
2300
2151
271
231
211 (MSB)
 0 

Therefore, (121)10 = (1111001)2

Converting to octal:

8QuotientRemainder
81211 (LSB)
8157
811 (MSB)
 0 

Therefore, (121)10 = (171)8

(f) 161

Converting to binary:

2QuotientRemainder
21611 (LSB)
2800
2400
2200
2100
251
220
211 (MSB)
 0 

Therefore, (161)10 = (10100001)2

Converting to octal:

8QuotientRemainder
81611 (LSB)
8204
822 (MSB)
 0 

Therefore, (161)10 = (241)8

EXCERCISE

A. Convert the following Hexadecimal numbers to Binary Number:

(a) A6

(b) A07

(c) 7AB4

(d) BE

(e) BC9

(f) 9BC8

B. Convert the following Decimal numbers to Binary Number:

(a) 543

(b) 796

(c) 1654

(d) 7654

(e) 7432

(f) 7453

C. Convert the following Binary numbers to Decimal Number:

(a) 1000111

(b) 111101

(c) 1010101

(d) 11011001

(e) 101010101

(f) 10001001

D. Convert the following Octal numbers to Decimal Number:

(a) 524

(b) 354

(c) 745

(d) 7532

(e) 1234

(f)  6524