[go: up one dir, main page]

0% found this document useful (0 votes)
21 views8 pages

Data Representation

Uploaded by

Shravan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views8 pages

Data Representation

Uploaded by

Shravan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

DATA REPRESENTATION

Number systems are the technique to represent numbers in the


computer system architecture, every value that you are saving or getting
into/from computer memory has a defined number system.

Computer architecture supports following number systems.

1) Binary Number System

A Binary number system has only two digits that are 0 and 1. Every
number (value) represents with 0 and 1 in this number system. The base
of binary number system is 2, because it has only two digits.

2) Octal number system

Octal number system has only eight (8) digits from 0 to 7. Every
number (value) represents with 0,1,2,3,4,5,6 and 7 in this number
system. The base of octal number system is 8, because it has only 8
digits.

3) Decimal number system

Decimal number system has only ten (10) digits from 0 to 9. Every
number (value) represents with 0,1,2,3,4,5,6, 7,8 and 9 in this number
system. The base of decimal number system is 10, because it has only
10 digits.

4) Hexadecimal number system

A Hexadecimal number system has sixteen (16) alphanumeric values


from 0 to 9 and A to F. Every number (value) represents with
0,1,2,3,4,5,6, 7,8,9,A,B,C,D,E and F in this number system. The base of
hexadecimal number system is 16, because it has 16 alphanumeric
values. Here A is 10, B is 11, C is 12, D is 13, E is 14 and F is 15.

NUMBER CONVERSIONS

Decimal to Binary:
Divide the number by the base 2 successively and write down the remainders
from bottom to top.

1
Decimal to Octal:
Divide the number by the base 8 successively and write down the remainders from bottom to
top.

Decimal to Hexadecimal:
Divide the number by the base 16 successively and write down the
remainders from bottom to top.

Binary to decimal conversion:


For this multiply each bit by its corresponding weight and sum it up. The
weights are power of 2.

Octal to decimal conversion:

2
For this multiply each bit by its corresponding weight and sum it up. The
weights are power of 8.
Eg: (1007)8 =()10?

1 × 83 + 0 × 82 + 0 × 81 + 7 × 80
= 512 + 0 + 0 + 7
=(519)10

Hexadecimal to decimal conversion:


For this multiply each bit by its corresponding weight and sum it up. The weights are power
of 16.
Eg: (100)16 = ()10?

= 1 × 162 + 0 × 161 + 0 × 160


= 256 + 0 + 0
= (256)10

Octal to binary conversion:


Convert each octal digit into its 3 bit binary equivalent. Consider the following table

3
Hexadecimal to binary conversion:
Convert each Hexadecimal digit into its 4 bit binary equivalent. Consider the following table

4
1010 1011 1100 (ABC)16=(101010111100)2
Binary to octal conversion:
Divide the binary number into groups of 3 bits starting from the right to
left(But in the fractional part start dividing from left to right). Insert
necessary zeros in the left side(or right side in the case of fractional
part)if needed and write down the corresponding octal equivalent.
eg: (10100110)2= ()8?
Insert one zero in the left side to form 3 bits group

(10100110)2= (246)8
Binary to Hexadecimal conversion:
Divide the binary number into groups of 4 bits starting from the right to
left(But in the fractional part start dividing from left to right). Insert
necessary zeros in the left side(or right side in the case of fractional
part)if needed and write down the corresponding Hexadecimal
equivalent.
eg: (100100110)2 = ()16?
Insert 3 zeros in the left side to form 4 bits group

(100100110)2 = (126)16
Octal to Hexadecimal conversion:
First convert octal number into binary(see 1.6.7), then convert this binary
into hexadecimal(also see 1.6.10)
eg: Convert (67)8 = ( )16
Step I: First convert this number into binary equivalent for this do the
following:

5
Step II: Next convert this number into hexadecimal equivalent for this do
the following.

So the answer is (67)8 = ( 37)16


Hexadecimal to octal conversion:
First convert Hexadecimal to binary(see 1.6.8), then covert this binary
into octal(also see 1.6.9)
eg: Convert (A1)16 = ( )8?
Step I: First convert this number into binary equivalent. For this do the
following

Step II. Next convert this number into octal equivalent. For this do the
following.
So the answer is (A1)16 = (241)8

Binary Arithmetic Operations

Like we perform the arithmetic operations in numerals, in the same way,


we can perform addition, subtraction, multiplication and division
operations on Binary numbers. Let us learn them one by one.

Binary Addition
Adding two binary numbers will give us a binary number itself. It is
the simplest method. Addition of two single-digit binary number is given
in the table below.

For example: Add 11012 and 10012.

6
EXAMPLE :
a) Here, 11111 + 10001
11111
+ 10001

110000

b) Here, 1111 + 1111


1111
+ 1111

11110

CHARACTER/STRING REPRESENTATION

ASCII:
Stands for "American Standard Code for Information Interchange."
ASCII is a character encoding that uses numeric codes to represent
characters. These include upper and lowercase English letters, numbers,
and punctuation symbols.

ISCII:
Indian Script Code for Information Interchange (ISCII) is a coding
scheme for representing various writing systems of India. It encodes the
main Indic scripts and a Roman transliteration. The supported scripts are:
Assamese, Bengali (Bangla), Devanagari, Gujarati, Gurmukhi,
Kannada, Malayalam, Oriya, Tamil, and Telugu.

UNICODE:
Unicode is a character encoding standard that has widespread acceptance. ...
They store letters and other characters by assigning a number for each one.
Before Unicode was invented, there were hundreds of different encoding

7
systems for assigning these numbers. No single encoding could contain enough
characters.

You might also like