Introduction to Numerical Analysis I MATH/CMPSC 455 Binary Numbers
B INARY N UMBERS Decimal system: Use digits 0,1,2,3,4,5,6,7,8,9 and base 10 to express numbers Binary system: Use digits 0,1 and base 2 to express numbers
Example:
Decimal to Binary Integer part Divide by 2 successively and record the reminders Fractional part Multiply by 2 successively and record the integer parts Binary to Decimal Integer part Add up powers of 2 Fractional part finite: Add up powers of 2 infinite: 1. Use the shift property of multiplication by 2 2. Add up powers of 2