introduction to numerical analysis i math/cmpsc 455 binary numbers

4
Introduction to Numerical Analysis I MATH/CMPSC 455 Binary Numbers

Upload: gabriella-king

Post on 16-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Numerical Analysis I MATH/CMPSC 455 Binary Numbers

Introduction to Numerical Analysis I

MATH/CMPSC 455

Binary Numbers

Page 2: Introduction to Numerical Analysis I MATH/CMPSC 455 Binary Numbers

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

Page 3: Introduction to Numerical Analysis I MATH/CMPSC 455 Binary Numbers

Example:

Example:

Example:

Example:

Page 4: Introduction to Numerical Analysis I MATH/CMPSC 455 Binary Numbers

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 22. Add up powers of 2