Binary Representation of Numbers Autar Kaw



Similar documents
Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

LECTURE #05. Learning Objective. To describe the geometry in and around a unit cell in terms of directions and planes.

Graphs on Logarithmic and Semilogarithmic Paper

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.

Module Summary Sheets. C3, Methods for Advanced Mathematics (Version B reference to new book) Topic 2: Natural Logarithms and Exponentials

SPECIAL PRODUCTS AND FACTORIZATION

Experiment 6: Friction

15.6. The mean value and the root-mean-square value of a function. Introduction. Prerequisites. Learning Outcomes. Learning Style

MATH 150 HOMEWORK 4 SOLUTIONS

Factoring Polynomials

Unit 6: Exponents and Radicals

Vectors Recap of vectors

4.11 Inner Product Spaces

Babylonian Method of Computing the Square Root: Justifications Based on Fuzzy Techniques and on Computational Complexity

Section 5-4 Trigonometric Functions

EQUATIONS OF LINES AND PLANES

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:

Operations with Polynomials

6.2 Volumes of Revolution: The Disk Method

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

Homework 3 Solutions

AREA OF A SURFACE OF REVOLUTION

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes

RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS

Rotating DC Motors Part II

FUNCTIONS AND EQUATIONS. xεs. The simplest way to represent a set is by listing its members. We use the notation

Regular Sets and Expressions

9 CONTINUOUS DISTRIBUTIONS

Math 135 Circles and Completing the Square Examples

Section 7-4 Translation of Axes

Review guide for the final exam in Math 233

Algebra Review. How well do you remember your algebra?

Reasoning to Solve Equations and Inequalities

Lec 2: Gates and Logic

5.2. LINE INTEGRALS 265. Let us quickly review the kind of integrals we have studied so far before we introduce a new one.

Physics 43 Homework Set 9 Chapter 40 Key

Treatment Spring Late Summer Fall Mean = 1.33 Mean = 4.88 Mean = 3.

Solving BAMO Problems

Basic Analysis of Autarky and Free Trade Models

e.g. f(x) = x domain x 0 (cannot find the square root of negative values)

Cypress Creek High School IB Physics SL/AP Physics B MP2 Test 1 Newton s Laws. Name: SOLUTIONS Date: Period:

Exponential and Logarithmic Functions

Warm-up for Differential Calculus

Chapter. Contents: A Constructing decimal numbers

ALGEBRAIC FRACTIONS,AND EQUATIONS AND INEQUALITIES INVOLVING FRACTIONS

Answer, Key Homework 10 David McIntyre 1

Integration. 148 Chapter 7 Integration

NQF Level: 2 US No: 7480

Radius of the Earth - Radii Used in Geodesy James R. Clynch February 2006

10.6 Applications of Quadratic Equations

Module 2. Analysis of Statically Indeterminate Structures by the Matrix Force Method. Version 2 CE IIT, Kharagpur

COMPLEX FRACTIONS. section. Simplifying Complex Fractions

Or more simply put, when adding or subtracting quantities, their uncertainties add.

Multiplication and Division - Left to Right. Addition and Subtraction - Left to Right.

1. In the Bohr model, compare the magnitudes of the electron s kinetic and potential energies in orbit. What does this imply?

P.3 Polynomials and Factoring. P.3 an 1. Polynomial STUDY TIP. Example 1 Writing Polynomials in Standard Form. What you should learn

Helicopter Theme and Variations

One Minute To Learn Programming: Finite Automata

Novel Methods of Generating Self-Invertible Matrix for Hill Cipher Algorithm

Geometry 7-1 Geometric Mean and the Pythagorean Theorem

Introduction. Teacher s lesson notes The notes and examples are useful for new teachers and can form the basis of lesson plans.

COMPARISON OF SOME METHODS TO FIT A MULTIPLICATIVE TARIFF STRUCTURE TO OBSERVED RISK DATA BY B. AJNE. Skandza, Stockholm ABSTRACT

10 AREA AND VOLUME 1. Before you start. Objectives

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 16 th May Time: 14:00 16:00

trademark and symbol guidelines FOR CORPORATE STATIONARY APPLICATIONS reviewed

Quick Reference Guide: One-time Account Update

5.6 POSITIVE INTEGRAL EXPONENTS

Lectures 8 and 9 1 Rectangular waveguides

19. The Fermat-Euler Prime Number Theorem

3 The Utility Maximization Problem

1.2 The Integers and Rational Numbers

Review Problems for the Final of Math 121, Fall 2014

Applications to Physics and Engineering

, and the number of electrons is -19. e e C. The negatively charged electrons move in the direction opposite to the conventional current flow.

A.7.1 Trigonometric interpretation of dot product A.7.2 Geometric interpretation of dot product

Section 1: Crystal Structure

Brillouin Zones. Physics 3P41 Chris Wiebe

Decision Rule Extraction from Trained Neural Networks Using Rough Sets

LECTURE #05. Learning Objectives. How does atomic packing factor change with different atom types? How do you calculate the density of a material?

AntiSpyware Enterprise Module 8.5

Orbits and Kepler s Laws

Pure C4. Revision Notes

Newton-Raphson Method of Solving a Nonlinear Equation Autar Kaw

ClearPeaks Customer Care Guide. Business as Usual (BaU) Services Peace of mind for your BI Investment

MA Lesson 16 Notes Summer 2016 Properties of Logarithms. Remember: A logarithm is an exponent! It behaves like an exponent!

Econ 4721 Money and Banking Problem Set 2 Answer Key

Lecture 3 Gaussian Probability Distribution

COMPONENTS: COMBINED LOADING

How fast can we sort? Sorting. Decision-tree model. Decision-tree for insertion sort Sort a 1, a 2, a 3. CS Spring 2009

AA1H Calculus Notes Math1115, Honours John Hutchinson

Derivatives and Rates of Change

Transcription:

Binry Representtion of Numbers Autr Kw After reding this chpter, you should be ble to: 1. convert bse- rel number to its binry representtion,. convert binry number to n equivlent bse- number. In everydy life, we use number system with bse of. For exmple, look t the number 57.56. Ech digit in 57.56 hs vlue of 0 through 9 nd hs plce vlue. It cn be written s 57.76= + 5 1 + 7 0 + 7 + 6 In binry system, we hve similr system where the bse is mde of only two digits 0 nd 1. So it is bse system. A number like (11.0011) in bse- represents the deciml number s 3 1 0 ((1 + 0 + 1 + 1 ) + (0 + 0 + 1 + 1 )) ( 11.0011) = = 11.1875 in the deciml system. To understnd the binry system, we need to be ble to convert binry numbers to deciml numbers nd vice-vers. We hve lredy seen n exmple of how binry numbers re converted to deciml numbers. Let us see how we cn convert deciml number to binry number. For exmple tke the deciml number 11.1875. First, look t the integer prt: 11. 1. Divide 11 by. This gives quotient of 5 nd reminder of 1. Since the reminder is 1, 0 = 1.. Divide the quotient 5 by. This gives quotient of nd reminder of 1. Since the reminder is 1, 1 = 1. 3. Divide the quotient by. This gives quotient of 1 nd reminder of 0. Since the reminder is 0, = 0. 4. Divide the quotient 1 by. This gives quotient of 0 nd reminder of 1. Since the reminder is, 1. 3 = Sylor URL: http://www.sylor.org/courses/me05/ Pge 1 of 1

Since the quotient now is 0, the process is stopped. The bove steps re summrized in Tble 1. Sylor URL: http://www.sylor.org/courses/me05/ Pge of 1

Tble 1 Converting bse- integer to binry representtion. Quotient Reminder 11/ 5 1= 0 5/ 1= 1 / 1 0= 1/ 0 1= 3 Hence (11) = ( 3 = (11) 1 0 ) For ny integer, the lgorithm for finding the binry equivlent is given in the flow chrt on the next pge. Now let us look t the deciml prt, tht is, 0.1875. 1. Multiply 0.1875 by. This gives 0.375. The number before the deciml is 0 nd the number fter the deciml is 0.375. Since the number before the deciml is 0, =0.. Multiply the number fter the deciml, tht is, 0.375 by. This gives 0.75. The number before the deciml is 0 nd the number fter the deciml is 0.75. Since the number before the deciml is 0, = 0. 3. Multiply the number fter the deciml, tht is, 0.75 by. This gives 1.5. The number before the deciml is 1 nd the number fter the deciml is 0.5. Since the number before the deciml is 1, = 1. 4. Multiply the number fter the deciml, tht is, 0.5 by. This gives 1.0. The number before the deciml is 1 nd the number fter the deciml is 0. Since the number before the deciml is 1, = 1. Since the number fter the deciml is 0, the conversion is complete. The bove steps re summrized in Tble. Tble. Converting bse- frction to binry representtion. Sylor URL: http://www.sylor.org/courses/me05/ Pge 3 of 1

Number Number fter deciml Number before deciml 0.1875 0.375 0.375 0= 0.375 0.75 0.75 0= 0.75 1.5 0.5 1= 0.5 1.0 0.0 1= Sylor URL: http://www.sylor.org/courses/me05/ Pge 4 of 1

Strt Input (N) Integer N to be converted to binry formt i = 0 Divide N by to get quotient Q & reminder R i = i+1 i = R No Is Q = 0? Yes n = i (N) = (... ) Sylor URL: http://www.sylor.org/courses/me05/ STOP Pge 5 of 1

Hence (0.1875) ( = = (0.0011) ) The lgorithm for ny frction is given in flowchrt on the next pge. Hving clculted nd we hve ( 11) = (11 ) ( 0.1875) = (0.0011, ) ( 11.1875) = (11.0011. ) In the bove exmple, when we were converting the frctionl prt of the number, we were left with 0 fter the deciml number nd used tht s plce to stop. In mny cses, we re never left with 0 fter the deciml number. For exmple, finding the binry equivlent of 0.3 is summrized in Tble 3. Tble 3. Converting bse- frction to pproximte binry representtion. Number Number fter deciml Number before deciml 0.3 0.6 0.6 0= 0.6 1. 0. 1= 0. 0.4 0.4 0= Sylor URL: http://www.sylor.org/courses/me05/ Pge 6 of 1

0.4 0.8 0.8 0= 0.8 1.6 0.6 1= 5 As you cn see the process will never end. In this cse, the number cn only be pproximted in binry formt, tht is, ( 0.3) = ( 5) (0.001) Q: But wht is the mthemtics behinds this process of converting deciml number to binry formt? A: Let z be the deciml number written s where z = x. y x is the integer prt nd y is the frctionl prt. We wnt to find the binry equivlent of x. So we cn write Sylor URL: http://www.sylor.org/courses/me05/ Pge 7 of 1

Strt Input (F) Frction F to be converted to binry formt i= Multiply F by to get number before deciml, S nd fter deciml, T i= i i = R No Is T = 0? Yes n = i (F) = (... ) Sylor URL: http://www.sylor.org/courses/me05/ STOP Pge 8 of 1

x= n n 0 n + n 1 +... + 0 If we cn now find 0,..., in the bove eqution then n ( x) = ( nn 1... 0) We now wnt to find the binry equivlent of y. So we cn write y= b + b +... b If we cn now find 1 + m ( y) = ( b 1b... b m) m m b 1,..., b in the bove eqution then Let us look t this using the sme exmple s before. Exmple 1 Convert ( 11.1875) to bse. Solution To convert ( 11) to bse, wht is the highest power of tht is prt of 11. Tht power is 3, s 3 = 8 to give 11= 3 + 3 Wht is the highest power of tht is prt of 3. Tht power is 1, s 1 = to give So 3= 11= 1 + 3 1 + 3= 3 + 1 + 1 Wht is the highest power of tht is prt of 1. Tht power is 0, s 0 = 1 to give Hence 0 1= Sylor URL: http://www.sylor.org/courses/me05/ Pge 9 of 1

( 11) = 3 1 3 1 0 3 1 0 = + + 1= + + = 1 + 0 + 1 + 1 (11) To convert ( 0.1875) to the bse, we proceed s follows. Wht is the smllest negtive power of tht is less thn or equl to 0.1875. Tht power is 3 s 3 =0.15. So 0.1875= + 0.065 Wht is the next smllest negtive power of tht is less thn or equl to 0.065. Tht power is 4 s =0. 065. So Hence Since nd we get 0.1875= 3 + ( 0.1875) = ( 11) = (11 = + 0.065= + = 0 + 0 + 1 + 1 (0.0011) ) ( 0.1875) = (0.0011 ) ( 11.1875) = (11.0011 ) Cn you show this lgebriclly for ny generl number? Exmple Convert ( 13.875) to bse. Solution For ( 13), conversion to binry formt is shown in Tble 4. Sylor URL: http://www.sylor.org/courses/me05/ Pge of 1

Tble 4. Conversion of bse- integer to binry formt. Quotient Reminder 13/ 6 1= 0 6/ 3 0= 1 3/ 1 1= 1/ 0 1= 3 So ( 13) = (11. ) Conversion of ( 0.875) to binry formt is shown in Tble 5. Tble 5. Converting bse- frction to binry representtion. Number Number fter deciml Number before deciml 0.875 1.75 0.75 1= 0.75 1.5 0.5 1= 0.5 1.0 0.0 1= So ( 0.875) = (0.111 ) Sylor URL: http://www.sylor.org/courses/me05/ Pge 11 of 1

Hence ( 13.875) = (11.111 ) Sylor URL: http://www.sylor.org/courses/me05/ Pge 1 of 1