0 Up votes0 Down votes

18 views28 pagesConverting to Binary forms with scientific notation and reverting back to base 10. Highly detailed with plenty of examples

Jan 24, 2015

© © All Rights Reserved

PDF, TXT or read online from Scribd

Converting to Binary forms with scientific notation and reverting back to base 10. Highly detailed with plenty of examples

© All Rights Reserved

18 views

Converting to Binary forms with scientific notation and reverting back to base 10. Highly detailed with plenty of examples

© All Rights Reserved

- Steve Jobs
- Wheel of Time
- NIV, Holy Bible, eBook
- NIV, Holy Bible, eBook, Red Letter Edition
- Cryptonomicon
- The Woman Who Smashed Codes: A True Story of Love, Spies, and the Unlikely Heroine who Outwitted America's Enemies
- Contagious: Why Things Catch On
- Crossing the Chasm: Marketing and Selling Technology Project
- Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are
- Zero to One: Notes on Start-ups, or How to Build the Future
- Console Wars: Sega, Nintendo, and the Battle that Defined a Generation
- Dust: Scarpetta (Book 21)
- Hit Refresh: The Quest to Rediscover Microsoft's Soul and Imagine a Better Future for Everyone
- The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution
- Crushing It!: How Great Entrepreneurs Build Their Business and Influence—and How You Can, Too
- Make Time: How to Focus on What Matters Every Day
- Algorithms to Live By: The Computer Science of Human Decisions
- Wild Cards

You are on page 1of 28

Department of Mathematics, University of Manitoba

Math-2120-Winter-2015

Definition 1:

Numerical analysis is the part of applied mathematics that studies the methods using

Numerical approximation for solving mathematical problems (differential calculus, integral

calculus, differential equations, partial differential equations, optimization problems and

so on)

Definition 2:

Numerical methods are mathematical techniques used:

in numerical Algebra, to solve an equation or system of equations,

Math-2120-Winter-2015

Remark:

1)

2)

3)

4)

5)

Because of their power, computers and calculators play a capital role in numerical

analysis.

Solving a problem analytically (if possible) provides an exact solution, while numerical

methods (very often) provides an approximate solution.

Solving a problem analytically is not always possible

Approximate solutions involve errors due the numerical method used and how the data

are stored on the computer.

Math-2120-Winter-2015

Decimal system:

Decimal system uses the following ten digits, 0,1, , 9, to represent any number. A

number in decimal system (base 10) is given by a sequence of these 10 digits

Remark:

Math-2120-Winter-2015

Example 1:

3 103 4 102 5 101 6 100

Math-2120-Winter-2015

Binary system:

Binary system uses the following 2 digits, 0,1 to represent any number. A number in

binary system (base 2) is given by a sequence of these 2 digits.

Remark:

The popularity of the binary system is due to the rapid development of computer science

and Telecommunication.

Example 2:

1) 11101012

2) 1001.0112

Math-2120-Winter-2015

1.

2.

3.

4.

Take the decimal number (integer) and divide it by 2 keeping track of the remainder

(instead of decimal place).

Take the result and divide it by two in the same way, always keeping track of the

remainder.

Repeat Step 2 until you reach a result of 0.

Read the remainders (all 0 or 1) off in reverse order starting at the bottom with the one

you just finished. This is the answer.

Remark:

Your last step should always look like 1 / 2 = 0 r 1.

Math-2120-Winter-2015

Example 3:

Convert

5310in base 2.

53/2

26/2

13/2

6/2

3/2

1/2

26

13

6

3

1

0

=

=

=

=

=

=

R

R

R

R

R

R

1

0

1

0

1

1

1101012

Math-2120-Winter-2015

1.

2.

3.

Stop if the fractional part of the result obtained at step 2 is 0, otherwise go to step 4.

4.

Repeat previous step with the fractional part of the result obtained at step 2.

Remark:

The binary representation is given by the sequence of recorded integer part from the first to

the last.

Math-2120-Winter-2015

10

in base 2

8710 10101112

Result

Fractional part

Integer part

0.1874 x 2

0.375

0.375

0.375 x 2

0.75

0.75

0.75 x 2

1.5

0.5

0.5 x 2

1.00

0.00

Read

from

top to

bottom

0.187510 0.00112

Math-2120-Winter-2015

11

1.

2.

3.

4.

5.

Multiply by 2 the first digit to the left just before the decimal point

0

The next digit is multiply by 21 and repeat the process by increasing the exponent of 2

until the last digit

Multiply by 2 1 the first digit to the right just after the decimal point

The next digit is multiply by 2 2 , and repeat the process by decreasing the exponent of

2 until the last digit.

Add all results to get the number in base 10

Math-2120-Winter-2015

12

Example 5:

Convert in decimal the following numbers

1) 1011.01012

2) 1101012

Exercise:

1)

1

Find the binary representation of

5 10

2)

0.012

Math-2120-Winter-2015

13

Definition 3:

A number in decimal floating representation (or scientific representation) is a number

D

written under the form d 0 .d1d 2 d s 10 , where

and 0. d1d 2 d s is called the mantissa

Example 6:

Math-2120-Winter-2015

14

Definition 3:

In binary floating representation a number written as

Example 7:

1) 1.1001 2101

2) 1.01101 210

Exercise:

Find the binary floating representation of

10012

Math-2120-Winter-2015

15

Remark:

1)

2)

3)

4)

Since the memory of computers is limited, then all numbers cannot be represented on

computers.

Math-2120-Winter-2015

16

Let D be a number in base 10. To represent it in binary floating point, one carry out the

following steps:

1.

2.

3.

Find respectively the binary representation of the mantissa and the exponent.

2d ;

2d

D

2 d 1.d1d 2 d s 2d

d

2

Math-2120-Winter-2015

17

Example 8:

Find the binary floating point of the following numbers

1)

40

2)

0.15625

Remark:

When a number is in binary floating point representation, computers store the sign of the

mantissa, the mantissa and the exponent according to IEEE-754 standard.

Math-2120-Winter-2015

18

A) Single precision format: 32 bits

Exponent (8 bits)

Mantissa (23 bits)

Exponent (8 bits)

Sign

(1 bit)

Math-2120-Winter-2015

19

Remark:

1.

2.

3.

4.

Since in binary floating point all numbers start by 1, then this leading 1 is not

represented on the computer.

The largest number that can be stored with 8 bits (for the exponent) is 28 1 255

Numbers from 0 to 255 will be used to represent exponents between -127 and 128.

In single precision format, a bias of 127 is added to any exponent and the result is

stored as the exponent (for example -127 is stored as 0).

Math-2120-Winter-2015

20

Example 8:

Find how a computer store the number 16.5 by using single precision format

01000001100001000000000000000000

Exponent

Mantissa

Math-2120-Winter-2015

21

B) Double precision format: 64 bits

Sign (1 bit)

Exponent (11 bits)

Mantissa (52 bits)

Sign (1 bit)

Math-2120-Winter-2015

22

Remark:

1.

2.

3.

The largest number that can be stored with 11 bits (for the exponent) is 211 1 2047

Numbers from 0 to 2047 will be used to represent exponents between -1023 and

1024.

In single precision format, a bias of 1023 is added to any exponent and the result is

stored as the exponent (for example -1023 is stored as 0).

Math-2120-Winter-2015

23

Example 9:

Find how a computer store the number -50 by using double precision format

1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0

Exponent (11 bits)

0 0

Math-2120-Winter-2015

24

Two types of error occur frequently when one deals with numerical methods: Truncation

error and round-off error.

A.

Truncation Error:

It refers to the errors caused by the method itself. This kind of error occurs when the

numerical method uses an approximate mathematical procedure.

Example 10:

Lets use Taylor series to approximate

cos x 1

x2

2!

x4

4!

cos 3

x6

6!

x8

8!

Math-2120-Winter-2015

25

cos 0.5

cos 1

cos 1

2

18

2

18

0.451688

4

1944

0.501796

Math-2120-Winter-2015

26

B.

Round-off Error

Since a finite number of bits is used to store, the mantissa longer than the number of bits

available have to be chopped or rounded. In such case, the true value of the number is not

stored and the error made is called round-off error.

Remark:

Since the true value is usually unknown then the value of the truncation error is also

unknown.

For some numerical methods the truncation error can be approximated (see next

chapters).

Math-2120-Winter-2015

27

END OF CHAP 1

Math-2120-Winter-2015

28

- T714Uploaded bybhanu455
- SEMI-DETAILED LESSON PLAN INCARRY OT MENSURATION AND CALCULATION.docxUploaded byLileth Lastra Quirido
- Introduction to Computer System OrganizationUploaded byjhe04
- Digital Logic ReviewUploaded bysara_lolo
- Modelling and experimental verification of an asymmetric Jeffcott rotor with radial clearanceUploaded byluizomar
- Visual Math, See How Math Makes SenseUploaded byrestunuc
- binaryhexaoctalUploaded byrokhan
- mtechvlsi230209Uploaded byPadmasree Sappa
- mtechvlsi230209Uploaded byJinu Madhavan
- BBM114 Fundamentals of Computing((QB) Sem I - CopyUploaded byRaja Manickam
- Chapter 5 Data RepresentationUploaded byBijay Mishra
- Digital Systems 002Uploaded byDavid B Mwathy
- 1720110Uploaded byAmit Thoriya
- 210624Uploaded byAJier CHuky
- A Dedicated Fourier Analysis for the SimulationUploaded byA Lamperouge
- Number SystemUploaded byKila Hamzah
- lesson plan-co-teaching-one teach one drift on converting binary hexadecimal numbers-jmeck wfed495c-2 v4a9Uploaded byapi-312884329
- Comp Comp1 Comp2Uploaded bynenuinthey001
- Computation of the Base Two Logarithm of Binary Numbers.pdfUploaded byssaft
- Numerical methods I.pdfUploaded byRahul Pinnamaneni
- The Ring programming language version 1.4 book - Part 4 of 30Uploaded byMahmoud Samir Fayed
- Bisection MethodUploaded byFrederico De Carvalho
- Week 6-8Uploaded bysiti suraya
- VIRTUAL PROTOTYPE WITH RIGID AND FLEXI-BODY CONCEPT TO DEVELPOMENT OF MULTIFUNCTIONAL ROBOTUploaded byJournal 4 Research
- BS Computer ScienceUploaded bySaqib Hanif
- data aanalysis and algorithms unit 1 aktuUploaded byDravid Nagi
- Handling Sparse Matrices Feb 272017Uploaded byJayden K. Amolli
- 5a (Digital System) Number System AJ 01.pdfUploaded byLove Strike
- Foe Unit3 Number SystemsUploaded byrupesh
- Digital logicUploaded byvigneshwar R

- Lecture Notes for Vibrations and accousticsUploaded byboobybobert
- Transverse Shear for project 2Uploaded byboobybobert
- Math Analysis 3 sample testUploaded byboobybobert
- Section 3.2 Algebraic PropertiesUploaded byboobybobert
- ASRock Z77 Extreme4 User ManualUploaded byMarian Bucur
- Section 3.4 Discontinuous NonhomogeneitiesUploaded byboobybobert
- Section 3.1 the Laplace Transform and Its InverseUploaded byboobybobert
- Section 2.6 Homogeneous Linear Differential EquationsUploaded byboobybobert
- Section 3.3 Laplace Transforms and Differential EquationsUploaded byboobybobert
- Section 2.9 Applications of Linear Differential EquationsUploaded byboobybobert
- Section 2.2 Separable Differential EquationsUploaded byboobybobert
- Section 2.3 Linear First Order Differential EquationsUploaded byboobybobert
- Section 2.8 Nonhomogeneous With Constant CoefficientsUploaded byboobybobert
- Section 2.7 Homogeneous With Constants CoefficientsUploaded byboobybobert
- Section 1.7 Applications of Taylor SeriesUploaded byboobybobert
- Section 2.5 Linear Differential EquationsUploaded byboobybobert
- Section 1.5 Taylor Series Expansions of FunctionsUploaded byboobybobert
- Section 2.4 Second Order Reducible to First OrderUploaded byboobybobert
- Section 2.1 IntroductionUploaded byboobybobert
- Section 1.1 Infinite Sequences.pdfUploaded byboobybobert
- Section 1.3 Taylor Polynomials and SeriesUploaded byboobybobert
- Section 1.8 Alternating SeriesUploaded byboobybobert
- Section 1.2 Infinite Series of NumbersUploaded byboobybobert
- Section 1.4 Power SeriesUploaded byboobybobert
- Section 1.6 Sums of Power SeriesUploaded byboobybobert
- ch02Uploaded bySalman Khalid Chauhan
- Top 10 Myths About EvolutionUploaded byst27383

- SEG_ERPUploaded bychirayus_3
- Alstom Otcf Ansi Web (2)Uploaded byReji Kurian
- What is a IMAPUploaded byNaveen Pandey
- UnderstandingtheAdafruitMotorShie...Uploaded bytoutiwai
- SV8100 System Maint_1Uploaded byJessie
- 723 SC - 02877bUploaded byEduardo Steffens
- Samsung Gear 3 ManualUploaded byhugtheslug
- SunMaxx TitanPower-AL2 Flush Mounting InstructionsUploaded bySunMaxx Solar
- p2015Uploaded byDiego Varela
- Run Issue 45 1987 SepUploaded byGeoffrey de Vlugt
- 05771809Uploaded bypierre_dantas
- KHLB2 Service ManualUploaded byDimitra Atsalakoti
- Epiphone Les Paul Special II Electric Guitar, WhiteUploaded byrangga
- msm6280_chipsetUploaded byIgor Sorocean
- Hydril K10 K20 Installation Manual.pdfUploaded byTitanBOP
- Introduction to Frame RelayUploaded byjp0075
- sg186r3Uploaded bygeniunet
- 4240Uploaded byvenkatesh_svss
- Matco Tools Promo #19Uploaded byJamie Middleton
- AVZ217 SpecUploaded byIpin ITu AriPin
- Thermadyne P-Wee 200GTSUploaded byShaun Hartzel
- TopSURV 7 3 Release NotesUploaded byChilo Perez
- Manual Monitor SamsungUploaded byMarius Berinde
- AfterTouch-1986-10Uploaded bySteveDF
- DR201-Instruction de TRADUSUploaded byDrajneanu Gelu
- 3 1 keytermsUploaded byapi-305968165
- Company Analysis-By Akshay Agarwal (IBM)Uploaded byAkshay Aggarwal
- UCS Family Poster Slide2Uploaded byAlan VC
- Trace Log 20141023193103Uploaded bydsghafdsha
- Afficheur LCD 4x16 JM164AUploaded bySidi

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.