Chapter Binary Representation of Numbers

Similar documents
COE 202- Digital Logic. Number Systems II. Dr. Abdulaziz Y. Barnawi COE Department KFUPM. January 23, Abdulaziz Barnawi. COE 202 Logic Design

in this web service Cambridge University Press

A. Incorrect! You rounded to the nearest ten instead of the nearest tenth. B. Incorrect! Review how to round decimal numbers and try again.

The. Binary. Number System

Rational numbers as decimals and as integer fractions

Learning Log Title: CHAPTER 3: ARITHMETIC PROPERTIES. Date: Lesson: Chapter 3: Arithmetic Properties

Lecture 1: Digital Systems and Number Systems

Lesson 1: Arithmetic Review

Introduction to Computers and Programming. Numeric Values

Introduction to Computer Science (I1100) With 1 coin 2 possibilities: Head / Tail or 0/1

Number- Algebra. Problem solving Statistics Investigations

Chapter 4 Section 2 Operations on Decimals

Year 6 Mathematics Overview

Unit 2: Accentuate the Negative Name:

Rules of Exponents Part 1[Algebra 1](In Class Version).notebook. August 22, 2017 WARM UP. Simplify using order of operations. SOLUTION.

Section 2.3 Rational Numbers. A rational number is a number that may be written in the form a b. for any integer a and any nonzero integer b.

Number Mulitplication and Number and Place Value Addition and Subtraction Division

2 Number Systems 2.1. Foundations of Computer Science Cengage Learning

Positional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal

CHAPTER 2 Number Systems

New Swannington Primary School 2014 Year 6

Unit 7 Number System and Bases. 7.1 Number System. 7.2 Binary Numbers. 7.3 Adding and Subtracting Binary Numbers. 7.4 Multiplying Binary Numbers

To begin this textbook, we need to start with a refresher of the topics of numbers and numbering systems.

Y6 MATHEMATICS TERMLY PATHWAY NUMBER MEASURE GEOMETRY STATISTICS

EXAMPLE 1. Change each of the following fractions into decimals.

College Prep Algebra II Summer Packet

COE 202: Digital Logic Design Number Systems Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

1. Let n be a positive number. a. When we divide a decimal number, n, by 10, how are the numeral and the quotient related?

Year 6 Maths Long Term Plan

Course Learning Outcomes for Unit I. Reading Assignment. Unit Lesson. UNIT I STUDY GUIDE Number Theory and the Real Number System

2 Developing. 2 Developing

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Name: Date: Review Packet: Unit 1 The Number System

MATHEMATICS Key Stage 2 Year 6

TOPIC: NUMBER SYSTEMS

Number Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris Hui-Ru Jiang Spring 2010

Year 6.1- Number and Place Value 2 weeks- Autumn 1 Read, write, order and compare numbers up to and determine the value of each digit.

Chapter 1 Review of Number Systems

Rational and Irrational Numbers

Example 2: Simplify each of the following. Round your answer to the nearest hundredth. a

Exponent Properties: The Product Rule. 2. Exponential expressions multiplied with each other that have the same base.

Lesson 3 5 Dividing Rational Numbers

Moodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System

Study Guide For use with pages

CS & IT Conversions. Magnitude 10,000 1,

Concepts of Conversion of Base 10 Number to Base 2 Fixed Point Register Binary Number Representation

EE292: Fundamentals of ECE

Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8 Week 9 Week 10 Week 11 Week 12 Week 13 Week14. Number- addition subtraction,

Intro to Module 3. Video. September 22, Intro to Module 3 and Lesson 3 1 General.notebook

CORE BODY OF KNOWLEDGE MATH GRADE 6

Objectives. Connecting with Computer Science 2

(-,+) (+,+) Plotting Points

Year 6 Term 1 and

Summer Assignment Glossary

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr

Benjamin Adlard School 2015/16 Maths medium term plan: Autumn term Year 6

Long Term Maths Plan 2013/2014 Year 6

SINGAPORE CORE COMMON CORE STATE STANDARDS BOY ASSESSMENT UNIT 1: BILLIONS. -recognize place value up to billions

Basic Arithmetic Operations

Korea University of Technology and Education

Number Systems. Both numbers are positive

Section 3.1 Factors and Multiples of Whole Numbers:

NUMBERS AND NUMBER RELATIONSHIPS

Expected Standards for Year 6: Mathematics Curriculum (taken from ncetm progression maps)

Integers and Rational Numbers

Name Course Days/Start Time

Maths Mastery Curriculum. Adapted from The White Rose Hub Maths Curriculum

Number and Place Value

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence

Chapter 2 Binary Values and Number Systems

Algebra Homework: Chapter 1 (Homework is listed by date assigned; homework is due the following class period) Day Date In-Class Homework

TOPICS. Other Number Systems. Other Number Systems 9/9/2017. Octal Hexadecimal Number conversion

Octal & Hexadecimal Number Systems. Digital Electronics

Accuplacer Arithmetic Study Guide

Basic Definition INTEGER DATA. Unsigned Binary and Binary-Coded Decimal. BCD: Binary-Coded Decimal

Unit 3: Multiplication and Division Reference Guide pages x 7 = 392 factors: 56, 7 product 392

Increasing/Decreasing Behavior

Module 1: Information Representation I -- Number Systems

ECOM 2325 Computer Organization and Assembly Language. Instructor: Ruba A.Salamah INTRODUCTION

ST MARY S COLLEGE FORM ONE COURSE OUTLINE MATHEMATICS. Term 1. Addition and subtraction. Multiplication and division facts

Year 6 programme of study

KS3 MATHEMATICS THRESHOLD DESCRIPTORS NUMBER (Incl. RATIO & PROPORTION)

Data Representation COE 301. Computer Organization Prof. Muhamed Mudawar

Beyond Competent (In addition to C)

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 01, SPRING 2013

The Rational Number System: Investigate Rational Numbers: Play Answer Sheet

ISLEWORTH & SYON BOYS SCHOOL

Corporation Road Primary School Maths Medium-Term Planning Year 6

World Inside a Computer is Binary

NZ Mathematics Level 1-Yr 9 Curriculum Objectives Addressed Within Numbers Up! Volcanic Panic

NUMBER SENSE AND OPERATIONS. Competency 0001 Understand the structure of numeration systems and multiple representations of numbers.

UNIT 6 OPERATIONS WITH DECIMALS

6-8 Math Adding and Subtracting Polynomials Lesson Objective: Subobjective 1: Subobjective 2:

Number representations

2.Simplification & Approximation

Unit 1 Integers, Fractions & Order of Operations

NFC ACADEMY MATH 600 COURSE OVERVIEW

PRE-ALGEBRA PREP. Textbook: The University of Chicago School Mathematics Project. Transition Mathematics, Second Edition, Prentice-Hall, Inc., 2002.

CS321. Introduction to Numerical Methods

Fraction to Percents Change the fraction to a decimal (see above) and then change the decimal to a percent (see above).

Transcription:

Chapter 4 Binary Representation of Numbers After reading this chapter, you should be able to: convert a base- real number to its binary representation,. convert a binary number to an equivalent base- number. In everyday life, we use a number system with a base of. For example, look at the number 57.56. Each digit in 57.56 has a value of through 9 and has a place value. It can be written as 1 57.76 = + 5 + 7 + 7 + 6 In a binary system, we have a similar system where the base is made of only two digits and it is a base system. A number like (111 in base- represents the decimal number as 3 1 ( 111 = ((1 + + 1 + 1 + ( + + 1 + 1 = 11875 in the decimal system. To understand the binary system, we need to be able to convert binary numbers to decimal numbers and vice-versa. We have already seen an example of how binary numbers are converted to decimal numbers. Let us see how we can convert a decimal number to a binary number. For example take the decimal number 11875. First, look at the integer part: 1 Divide 11 by. This gives a quotient of 5 and a remainder of Since the remainder is 1, a = 1.. Divide the quotient 5 by. This gives a quotient of and a remainder of Since the remainder is 1, a = 1 1. 3. Divide the quotient by. This gives a quotient of 1 and a remainder of. Since the remainder is, a =. 4. Divide the quotient 1 by. This gives a quotient of and a remainder of Since the remainder is, a = 3 1. Since the quotient now is, the process is stopped. The above steps are summarized in Table 4.1

4. Chapter 4 Table 1 Converting a base- integer to binary representation. Quotient Remainder 11/ 5 1 = a 5/ 1= a1 / 1 = a 1/ 1 = a3 (11 = ( a3aa1a = (11 For any integer, the algorithm for finding the binary equivalent is given in the flow chart on the next page. Now let us look at the decimal part, that is,.1875. Multiply.1875 by. This gives.375. The number before the decimal is and the number after the decimal is.375. Since the number before the decimal is, a =.. Multiply the number after the decimal, that is,.375 by. This gives.75. The number before the decimal is and the number after the decimal is.75. Since the number before the decimal is, a =. 3. Multiply the number after the decimal, that is,.75 by. This gives 5. The number before the decimal is 1 and the number after the decimal is.5. Since the number before the decimal is 1, a = 4. Multiply the number after the decimal, that is,.5 by. This gives. The number before the decimal is 1 and the number after the decimal is. Since the number before the decimal is 1, a = Since the number after the decimal is, the conversion is complete. The above steps are summarized in Table. Table. Converting a base- fraction to binary representation. Number Number after Number before decimal decimal.1875.375.375 = a.375.75.75 = a.75 5.5 1 = a.5. 1 = a

Binary Representation of Numbers 4.3 Start Input (N Integer N to be converted to binary format i = Divide N by to get quotient Q & remainder R i = i+1 a i = R No Is Q =? Yes n = i (N = (a n...a STOP

4.4 Chapter 4 (.1875 = ( a 1a aa = (.11 The algorithm for any fraction is given in a flowchart on the next page. Having calculated ( 11 = (11 and (.1875 = (.11, we have ( 11875 = (111. In the above example, when we were converting the fractional part of the number, we were left with after the decimal number and used that as a place to stop. In many cases, we are never left with a after the decimal number. For example, finding the binary equivalent of.3 is summarized in Table 3. Table 3. Converting a base- fraction to approximate binary representation. Number after Number before Number decimal decimal.3.6.6 = a.6. 1 = a..4.4 = a.4.8.8 = a.8 6.6 1 = a 5 As you can see the process will never end. In this case, the number can only be approximated in binary format, that is, (.3 ( a a aaa 5 = (.1 Q: But what is the mathematics behinds this process of converting a decimal number to binary format? A: Let z be the decimal number written as z = x. y where x is the integer part and y is the fractional part. We want to find the binary equivalent of x. we can write

Binary Representation of Numbers 4.5 Start Input (F Fraction F to be converted to binary format i = Multiply F by to get number before decimal, S and after decimal, T i = i a i = R No Is T =? Yes n = i (F = (a -1...a -n STOP

4.6 Chapter 4 x = a n n n + an 1 +... + a If we can now find a,...,a n in the above equation then ( x = ( anan.. a We now want to find the binary equivalent of y. we can write y = b + b +... b 1 + If we can now find b 1,..., b m in the above equation then ( y = ( b 1b... b m Let us look at this using the same example as before. m m Example 1 Convert (11875 to base. lution To convert (11 to base, what is the highest power of that is part of 1 That power is 3, as 3 = 8 to give 11 = 3 + 3 What is the highest power of that is part of 3. That power is 1, as 1 = to give 3 = 1 + 1 3 3 1 11 = + 3 = + + 1 What is the highest power of that is part of That power is, as = 1 to give 1 = 3 1 3 1 3 1 ( 11 = + + 1 = + + = 1 + + 1 + 1 = (11 To convert (.1875 to the base, we proceed as follows. What is the smallest negative power of that is less than or equal to.1875. That power is 3 as 3 =.15..1875 = +.65 What is the next smallest negative power of that is less than or equal to.65. That power is 4 as =. 65. 3.1875 = + (.1875 = +.65 = + = + + 1 + 1 = (.11 Since ( 11 = (11 and (.1875 = (.11 we get

Binary Representation of Numbers 4.7 ( 11875 = (111 Can you show this algebraically for any general number? Example Convert (13.875 to base. lution For (13, conversion to binary format is shown in Table 4. Table 4. Conversion of base- integer to binary format. Quotient Remainder 13/ 6 1 = a 6/ 3 = a1 3/ 1 1 = a 1/ 1 = a3 ( 13 = (11. Conversion of (.875 to binary format is shown in Table 5. Table 5. Converting a base- fraction to binary representation. Number Number after Number before decimal decimal.875 75.75 1 = a.75 5.5 1 = a.5. 1 = a (.875 = (.111 ( 13.875 = (1111 INTRODUCTION TO NUMERICAL METHODS Topic Binary representation of number Summary Textbook notes on binary representation of numbers Major General Engineering Authors Autar Kaw Date December 7, 8 Web Site http://numericalmethods.eng.usf.edu