Download presentation

Presentation is loading. Please wait.

Published byDarlene Hines Modified over 4 years ago

1
8/15/2015 http://numericalmethods.eng.usf.edu 1 Binary Representation Major: All Engineering Majors Authors: Autar Kaw, Matthew Emmons http://numericalmethods.eng.usf.edu Transforming Numerical Methods Education for STEM Undergraduates

2
Binary Representation http://numericalmethods.eng.usf.edu http://numericalmethods.eng.usf.edu

3
3 How a Decimal Number is Represented

4
http://numericalmethods.eng.usf.edu4 Base 2

5
http://numericalmethods.eng.usf.edu5 Convert Base 10 Integer to binary representation Table 1 Converting a base-10 integer to binary representation. QuotientRemainder 11/25 5/22 2/21 1/20 Hence

6
http://numericalmethods.eng.usf.edu6 Start Input (N) 10 i = 0 Divide N by 2 to get quotient Q & remainder R a i = R Is Q = 0? n = i (N) 10 = (a n...a 0 ) 2 STOP Integer N to be converted to binary format i=i+1,N=Q No Yes

7
http://numericalmethods.eng.usf.edu7 Fractional Decimal Number to Binary Number Number after decimal Number before decimal 0.375 0.75 1.50.5 1.00.0 Table 2. Converting a base-10 fraction to binary representation. Hence

8
http://numericalmethods.eng.usf.edu8 Start Input (F) 10 Multiply F by 2 to get number before decimal, S and after decimal, T a i = R Is T =0? n = i (F) 10 = (a -1...a -n ) 2 STOP Fraction F to be converted to binary format No Yes

9
http://numericalmethods.eng.usf.edu9 Decimal Number to Binary and we have Since

10
http://numericalmethods.eng.usf.edu10 All Fractional Decimal Numbers Cannot be Represented Exactly Number Number after decimal Number before Decimal 0.6 1.20.2 0.4 0.8 1.60.6 Table 3. Converting a base-10 fraction to approximate binary representation.

11
http://numericalmethods.eng.usf.edu11 Another Way to Look at Conversion Convert to base 2

12
http://numericalmethods.eng.usf.edu12

13
Additional Resources For all resources on this topic such as digital audiovisual lectures, primers, textbook chapters, multiple-choice tests, worksheets in MATLAB, MATHEMATICA, MathCad and MAPLE, blogs, related physical problems, please visit http://numericalmethods.eng.usf.edu/topics/binary_repr esentation.html

14
THE END http://numericalmethods.eng.usf.edu

Similar presentations

© 2019 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google