1 / 9

Fixed Point Representation

Fixed Point Representation. OBJECTIVES. You should be able to: Convert binary fractions to a decimal Convert decimal fractions to binary. Fixed Point Representation.

reuben
Download Presentation

Fixed Point Representation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fixed Point Representation

  2. OBJECTIVES You should be able to: • Convert binary fractions to a decimal • Convert decimal fractions to binary

  3. Fixed Point Representation • We have previously dealt with converting between decimal and binary integers (whole numbers). We shall now deal with converting between decimal and binary fractions (real numbers). • Recapping : The number 5.385 can be broken up into:

  4. Binary Fraction • Binary fractions operate in a similar way. See the table below:

  5. Converting a binary fraction to decimal Using the value for each binary digit in a binary fraction we can find the decimal equivalent. eg. Convert the binary fraction 101.1112 to decimal. Starting from the left of the binary fraction, we record the digits down the table. TOTAL = 5.875 10

  6. Exercise 1 Convert the following binary fractions to decimal: • 11.10112 6. 1.112 • 1.101012 7. 1111.101012 • 101.112 8. 1001.11012 • 111.1012 9. 1.1010112 • 11.11112 10. 10.1101012

  7. Converting decimal fractions to binary • In order to convert a decimal fraction to binary the fraction must be multiplied by 2 after which the 0 or 1 produced to the left of the decimal point is recorded. This process is repeated until the fraction part becomes zero or the fraction part starts to repeat itself. eg. Convert the decimal fraction 0.75 to binary. STEP 1: 0.75 x 2= 1.50 so the first bit is 1, with 0.50 remaining STEP 2: 0.50 x2= 1.00 so the second bit is 1 (fraction part becomes zero) Therefore 0.7510= .112 ( Counting bits starting from the top)

  8. Converting decimal fractions to binary continued eg. Convert .6510 to binary (5 bit representation). STEP 1: .65 x 2= 1.30 so the first bit is 1, remainder is .30 STEP 2:.30 x 2= 0.60 so the second bit is 0, remainder is .60 STEP 3: .60 x 2= 1.20 so the third bit is 1, remainder is .20 STEP 4:.20 x 2= 0.40 so the fourth bit is 0, remainder is .40 STEP 5:.40 x 2= 0.80 so the fifth bit is 0, remainder is .80 STEP 6:.80 x 2= 1.60 so the sixth bit is 1, remainder is .60 STEP 7:.60 x 2= 1.20 so the seventh bit is 1, remainder is .20 The remainders begin to repeat in STEP 6 and STEP 7 therefore this pattern is repeating itself. The answer can be written as .101002ignoring any bits after the fifth bit (truncated) or as .101012round off the result.

  9. Exercise 2 Convert the following decimal fractions to binary: 1. .25 2. .375 3. 5.435 4. 9.857 5. .35

More Related