3 Representing Numbers HOF 4.pdf - Representing Real...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
EECS 1520 Week-04.3 – January 26, 2018 page 1 Representing Real Numbers Fractions base: b any integer > 1 digits: 0 , 1 , ..., b 1 number 0 1 2 2 1 d d d d d n n . 3 2 1 d d d its definition 3 3 2 2 1 1 0 0 1 1 2 2 2 2 1 1 × + × + × + × + × + × + + × + × b d b d b d b d b d b d b d b d n n n n Example 3.14 = 3 × 10 0 + 1 × 10 - 1 + 4 × 10 - 2 = 3 + .1 + .04
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
EECS 1520 Week-04.3 – January 26, 2018 page 2 Conversions between Decimal and Binary Binary to Decimal Technique use the definition of a number in a positional number system with base 2 evaluate the definition formula using decimal arithmetic Example 10.1011 = 1 × 2 1 + 0 × 2 0 + 1 × 2 - 1 + 0 × 2 - 2 + 1 × 2 - 3 + 1 × 2 - 4 = 1 × 2 + 0 × 1 + 1 × 0.5 + 0 × 0.25 + 1 × 0.125 + 1 × 0.0625 = 2.6875 (decimal)
Image of page 2