50 likes | 253 Views
Introduction to Numerical Analysis I. Binary Numbers. MATH/CMPSC 455. Binary Numbers. 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:. Example:. Example:. Example:.
E N D
Introduction to Numerical Analysis I Binary Numbers MATH/CMPSC 455
Binary Numbers • 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: Example: Example: 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: • Use the shift property of multiplication by 2 • Add up powers of 2