Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 22

Paper I Unit 1.4.

1
DATA REPRESENTATION
Number Systems

Binary
Denary

What number system do we follow in our


daily life?

Octal
Hexadecimal
Denary Number System
• A denary number has a base of 10
hence called denary.
• It consists of ten digits : 0 – 9

• Each digit in a base ten number


system represent’s a place value
like units, tens, hundred etc as
shown in the figure

• These values represent powers of


the base number i.e. 10
Binary Number System
• Binary number system is used by virtually all
the digital systems

• It is base 2 system and consists of only two


digits : 0 & 1

• This number system is important for all the


microprocessor based systems.
Binary words
• Bit : A bit is a single binary digit. It can be
either 0 or 1.

• Nibble : A group of 4 bits is called a nibble.



• Byte : A group of 8 bits is called a Byte

• Word : A group of 16 bits is called a word.


CONVERSION BETWEEN
BINARY AND DENARY
Denary to Binary
• Divide the denary number by 2 until you get
a 0 as quotient.

• Write the remainders in the reverse order to


obtain the Binary equivalent of the denary
number.
Denary to Binary

• (152)10 to ()2 Divisor Quotient Remainder


2 152
2 76 0
2 38 0
2 19 0
2 9 1
2 4 1
2 2 0
2 1 0
2 0 1
= (10011000)2
Basic rule
While converting a denary number to any
other number system we should :

• Divide the denary number by the base of the


number system to which it is to be
converted.

• Division is continued till we get zero as a


quotient.
Exercise
Convert the following numbers
from Denary to Binary number
system:

1. 456
2. 87
3. 99
4. 56
5. 1734
Binary to Denary
Binary Number Representation
• Like the denary
numbers, each
digit of a binary
number signifies
some power of its
base i.e. 2.

• Figure shows the


bit positions of a
binary number
Binary to Denary
• To convert given binary number to denary :

• Multiply the bit value with its corresponding


bit position value .

• Add the product of each place to obtain the


denary value.
Binary to Denary
Exercise
Convert the following numbers
from Binary to Denary number
system:

1. 101010
2. 11001
3. 00101
4. 111001
5. 1001
Representing Characters in Binary
form
• Computer follows only the binary language
consisting of 0 & 1.

• Hence representing alphabets and special


symbols require special consideration.

• They can’t be stored as characters, but need to


be converted to numeric values.
Standards for representation
• Various standards are used to represent characters. Few of
the commonly used are:

• ASCII – American Standard Code for Information


Interchange

• EBCDIC – Extended Binary Coded Decimal Interchange


Code

• UNICODE – Universal Code


ASCII
• ASCII is a code for representing
English characters as numbers,
with each letter assigned a
number from 0 to 127.

• For example, the ASCII code


for uppercase M is 77.

• Most computers use ASCII codes


to represent text, which makes it
possible to transfer data from one
computer to another.
ASCII
• The standard ASCII character set uses just
7 bits for each character.

• There are several larger character sets that use 8


bits, which gives them 128 additional characters.

• The extra characters are used to represent non-


English characters, graphics symbols, and
mathematical symbols.
EBCDIC
• EBCDIC is an IBM code
for representing characters
as numbers.

• Although it is widely used


on large IBM computers,
most other computers,
including PCs and Macinto
shes, use ASCII codes.
UNICODE
• Unlike ASCII, which uses 7 bits for each
character, Unicode uses 16 bits,
• It can represent more than 65,000 unique
characters.
• It is necessary for some other languages, such
as Greek, Chinese and Japanese
Next topic

Data types

You might also like