You are on page 1of 27

Data Representation

Chapter 2

Suvetha CS
Introduction
Quantities???

In digital systems like computers , the quantities are


represented by symbols called digits

Many number system are in use in digital number


system that represent the digits in various forms.

Suvetha CS
Digital Number System
In digital representation various number system are
used
The most common number system used are
Decimal
Binary
Octal
Hexadecimal

Suvetha CS
Decimal Number System
 The number system that we use in our day-to-day life is the decimal
number system.
 Decimal number system has base 10 as it uses 10 digits from 0 to 9.
 Deca means 10
 The decimal system is a positional value system in which the value of
a digit depends on its position.
 The sequence of decimal number system 0,1,2,3,4,5,6,7,8,9,10,11,12……
(after 9 its combination of two or more unique symbols of the system)

Suvetha CS
Binary Number System
 Uses two digits, 0 and 1.
 Also called base 2 number system
 The binary system is also a positional value system, where in each
binary digit has its own value or weight expressed as a power of 2
 The sequence of binary number system 00,01,10,11,100,101….

Suvetha CS
Octal Number System
 Uses eight digits, 0,1,2,3,4,5,6,7.
 Also called base 8 number system
 The octal system is also a positional value system, where in each digit
has its own value or weight expressed as a power of 8
 The sequence of octal number system 0,1,2,3,4,5,6,7,10,11,12….

Suvetha CS
Hexadecimal Number System
 Uses 10 digits and 6 letters, 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.
 Letters represents numbers starting from 10. A = 10, B = 11, C = 12, D =
13, E = 14, F = 15.
 Also called base 16 number system.
 The hexadecimal system is also a positional value system, where in
each digit has its own value or weight expressed as a power of 16

Suvetha CS
Base and Symbols of the Number System

Suvetha CS
Relationship between various number
systems

Suvetha CS
Character / String Representation

Suvetha CS
ASCII Code
ASCII- American Standard Code for Information
Interchange
Most widely used alphanumeric code.
ASCII has 7-bit code
So 27 = 128 possible code points.

Suvetha CS
ASCII Code

Suvetha CS
ISCII Code
ISCII- Indian Standard Code for Information
Interchange
Used for Indian languages.
ISCII has 8-bit code
So 28 = 256 possible code points.

Suvetha CS
ISCII Code

Suvetha CS
Unicode

Suvetha CS
Unicode-important defintions

Suvetha CS
Unicode-UTF
UTF 8-1 octet (8 bits)

UTF 8-2 octet(16 bits)


UTF 8

UTF 8-3 octet(24 bits)


Unicode-UTF

UTF 8-4 octet(32 bits)

UTF 32

Suvetha CS
UTF 8-1 Octet(8 bits)

Suvetha CS
UTF 8-2 Octet(16 bits)

Suvetha CS
UTF 8-3 Octet(24 bits)

Suvetha CS
UTF 8-4 Octet(32 bits)

Suvetha CS
Unicode points

Suvetha CS
UTF 32

Suvetha CS
Differences of UTF 8 and UTF 32
UTF 8 UTF 32
 Variable length encoding Fixed length encoding
 It has control bits No control bits
 Types
 UTF 8-1octet
 UTF 8-2octet
 UTF 8-3octet
 UTF 8-4octet

Suvetha CS
Example

Suvetha CS
Example

Suvetha CS
Doubts??

Suvetha CS

You might also like