This preview shows pages 1–7. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Number Systems Again
(ch 2 +) CMPE12 1 Cyrus Cyrus Bazeghi Positional Fractions
Mesopotamians used positional fractions
Sqrt(2) = 1.24,51,1060 = 1 x 600 + 24 x 601 + 51 x 602 + 10 x 603 = 1.414222 Most accurate approximation until the Renaissance CMPE12 2 Cyrus Cyrus Bazeghi Positional Fractions Generalized Representation
For a number “f” with “n” digits to the left and “m” to the right of the decimal place fn1 fn2 … f2 f1 f0 f1 f2 f3 … fm1 Decimal point Position is the power CMPE12 3 Cyrus Cyrus Bazeghi Fractional Representation
• What is 3E.8F16? = 3 x 161 + E x 160 + 8 x 161 + F x 162
= 48 + 14 + 8/16 + 15/256 • How about 10.1012? = 1 x 21 + 0 x 20 + 1 x 21 + 0 x 22 + 1 x 23 = 2 + 0 + 1/2 + 1/8
CMPE12 4 Cyrus Cyrus Bazeghi Converting Decimal > Binary fractions
• Consider left and right of the decimal point separately. • The stuff to the left can be converted to binary as before. • Use the following table/algorithm to convert the fraction
CMPE12 5 Cyrus Cyrus Bazeghi For 0.810 to binary
Fraction 0.8 0.6 Fraction x 2 1.6 1.2 Digit left of decimal point 1 most significant (f1) 1 0.2
0.4 0.8 0.4
0.8 (it must repeat from here!!) 0
0 •Different bases have different repeating fractions. •0.810 = 0.110011001100…2 = 0.11002 •Numbers can repeat in one base and not in another.
CMPE12 6 Cyrus Cyrus Bazeghi What is 2.210 in: •Binary •Hex CMPE12 7 Cyrus Cyrus Bazeghi ...
View
Full
Document
This note was uploaded on 12/14/2009 for the course CMPE 12/l taught by Professor Bazeghi during the Fall '09 term at UCSC.
 Fall '09
 Bazeghi

Click to edit the document details