Data r epresentation

1,837 views
1,760 views

Published on

Sanjeev Patel 4x

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,837
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
72
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Data r epresentation

  1. 1. DATA REPRESENTATION<br />BY-<br /> Ravi Sharma<br />
  2. 2. Binary number system- [ 0and 1 ] Radix-2 , e.g.-(101101)2<br />Decimal number system- [ 0 to 9 ] Radix-10 , e.g.-(243)10<br />Octal number system- [ 0 to 7 ] Radix-8 , e.g.-(736.4)8<br />Hexadecimal - [ 0 to 9 and A to F ]<br /> Radix-16, e.g.-(F3)16<br />NUMBER SYSTEMS:<br />
  3. 3. Conversion to decimal-<br />A number expressed in base r can be converted to its decimal equivalent by multiplying each coefficient by corresponding power of r and adding . The following is an example of octal to decimal conversion:<br />Conversion<br />
  4. 4. Conversion from decimal to ‘r’ :<br /> Conversion of decimal integer into a base r is done by successive divisions by r and accumulation of the remainders . The conversion of fraction is done by successive multiplication by r and accumulation of integer so obtained.<br />
  5. 5. Conversion from and to binary , octal , hexadecimal-<br />Since 23=8 and 24=16, each octal digits corresponds to three and each hexadecimal corresponds to 4 binary digits . The conversion from binary to octal and hexadecimal is done by partitioning the binary no. into groups of three and four bits respectively .<br />
  6. 6. (r-1)’s -<br /> - 9’s complement : <br />It follows that the 9’s complement of a decimal no. is obtained by subtracting each digit from 9.<br /> e.g.- 9’s complement of 546700 is 999999-546700=453299<br /> -1’s complement:<br />The 1’s complement of a binary no. is obtained by subtracting each digit by 1.<br /> e.g.- 1’s complement of 1011001 is 0100110.<br />Complements<br />
  7. 7. ( r’s ) –<br />-10’s complement : <br /> 10’s complement of a decimal number is obtained by adding 1 to the 9’s complement value.<br /> e.g.- 10’s complement of 2389 is 7610+1=7611.<br />-2’s complement : <br />2’s complement of binary number is obtained by adding 1 to the 1’s complement.<br />e.g. – 2’s complement of 101100 is 010011+1=010100.<br />
  8. 8. Subtraction of unsigned numbers<br />
  9. 9. Signed Numbers<br />
  10. 10.
  11. 11. An overflow condition can be detected by observing the carry into the sign bit position and carry out of the sign bit position . If these two carries are not equal an overflow is occurred .<br />carries: 0 1 carries: 1 0<br /> +70 0 1000110 -70 1 0111010<br />+800 1010000-801 0110000 <br />+150 1 0010110 -150 0 1101010<br />Overflow<br />
  12. 12. THANK YOU<br />THANK YOU<br />

×