Dale & Lewis Chapter 2 Binary Numbers and Number Systems.

Slides:



Advertisements
Similar presentations
ECE 331 – Digital System Design
Advertisements

Thinking Mathematically
DATA REPRESENTATION CONVERSION.
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Lecture 3 Number System.
Homework Hints Algorithms.
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Chapter 02 Binary Values and Number Systems Nell Dale & John Lewis.
The Binary Number System
Converting Binary to Octal
Number Systems and Arithmetic
2.1 2 Number Systems Foundations of Computer Science  Cengage Learning.
Data Representation in Computers. Data Representation in Computers/Session 3 / 2 of 33 Number systems  The additive approach – Number earlier consisted.
CS105 INTRODUCTION TO COMPUTER CONCEPTS BINARY VALUES & NUMBER SYSTEMS Instructor: Cuong (Charlie) Pham.
Numbering Systems. CSCE 1062 Outline What is a Numbering System Review of decimal numbering system Binary representation range Hexadecimal numbering system.
Chapter 3 Data Representation
Supplemental Chapter Number Bases
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
Integer Conversion Between Decimal and Binary Bases Conversion of decimal to binary more complicated Task accomplished by –Repeated division of decimal.
Data Representation – Chapter 3 Section 3-1. Terminology “Digital” –Discrete, well defined values/steps –Opposite of analog –Analogy: digital is to analog.
46 Number Systems Problem: Implement simple pocket calculator Need: Display, adders & subtractors, inputs Display: Seven segment displays Inputs: Switches.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
Computer Arithmetic and the Arithmetic Unit Lesson 2 - Ioan Despi.
Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in other bases.
Number systems, Operations, and Codes
Positional Notation 642 in base 10 positional notation is:
Number Base Conversions
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
Data Representation – Chapter 3 Section 3-1. Terminology “Digital” –Discrete, well defined values/steps –Opposite of analog –Analogy: digital is to analog.
CPIT 201 Introduction to Computing
Chapter 2 Number Systems: Decimal, Binary, and Hex.
Octal to Decimal Hexadecimal DecimalOctal Binary.
Chapter 1  Number Systems Decimal System Binary System Octal System Hexadecimal System  Binary weighted cods Signed number binary order  1’s and 2’s.
1 Review on Number Systems Decimal, Binary, and Hexadecimal.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Discrete Mathematics Numbering System.
Lecture 2 Number Systems
1 Number Systems Decimal, Binary, and Hexadecimal.
MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.
Introduction To Number Systems Binary System M. AL-Towaileb1.
Division. Just as multiplication can be expressed as a series of additions, division can be seen as a series of subtractions. 21 ÷ 7 asks how many times.
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
Arithmetic Chapter 4 Subject: Digital System Year: 2009.
 2012 Pearson Education, Inc. Slide Chapter 4 NumerationSystems.
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
CSC 110 – Intro to Computing Lecture 3: Converting between bases & Arithmetic in other bases.
Number Systems and Binary Arithmetic Quantitative Analysis II Professor Bob Orr.
Chapter 5 NUMBER REPRESENTATION AND ARITHMETIC CIRCUITS.
CPIT 201 King AbdulAziz University Faculty of Computing & Information Technology Information Technology Department CH 2 Number Systems CPIT 201 Introduction.
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Week 1(Number System) Muhammad Ammad uddin Logic Design Lab I (CEN211)
Introduction To Number Systems
Digital Design Chapter One Digital Systems and Binary Numbers
Chapter 02 Nell Dale & John Lewis.
Octal to Decimal Decimal Octal Binary Hexadecimal.
Discrete Mathematics Numbering System.
Base ‘b’ number for i = 0 to n – 1 for an n digit quantity
CSE 102 Introduction to Computer Engineering
Number Systems Lab session 1 Xuan Guo.
Chapter 3 Data Representation
Number Systems and Binary Arithmetic
Digital Logic Design (CSNB163)
Chapter 2 Number Systems.
Binary Values and Number Systems
Chapter 2 Number System.
Introduction To Number Systems
Chapter 2 Number Systems.
Presentation transcript:

Dale & Lewis Chapter 2 Binary Numbers and Number Systems

Number categories Definition of −Number  Unit of a mathematical system subject to arithmetic −Natural numbers  0, 1, 2, 3, 4… −Negative numbers  Number less then 0, i.e. -1, -2, -3, -4… −Integers  …-4, -3, -2, -1, 0, 1, 2, 3, 4… −Rational numbers  Fraction of integers, except division by 0, i.e. ¼, ½, -7/13…

The idea of a positional number system 4357 four thousand, three hundred and fifty seven four units of a thousand ( 4 x 1000) 4000 three units of a hundred ( 3 x 100) 300 five units of ten ( 5 x 10) 50 seven units of one ( 7 x 1) 7 4 x x x x same digits, different positions, different number The position of each digit determines that digit’s contribution to the number.

The idea of a positional number system base: b any integer > 1 digits: 0, 1,..., b−1 number: d n-1 d n-2 …d 2 d 1 d 0 its definition d n-1 x b n-1 + d n-2 x b n-2 + … + d 2 x b 2 + d 1 x b 1 + d 0 x b 0 Examples: BaseDigits 20, 1 50, 1, 2, 3, 4 80, 1, 2, 3, 4, 5, 6, 7 100, 1, 2, 3, 4, 5, 6, 7, 8, 9 160, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

Binary, Octal and Hexadecimal Comparison of first natural numbers in four different bases etc...

…So what base was used in the data in the Matrix movies?

Arithmetic in other bases All the familiar rules of pencil-and-paper decimal arithmetic carry over to any other base Addition Subtraction Decimal Grid Binary Grid

Octal Grid Hexadecimal Grid

Examples of arithmetic In Octal: In Hexadecimal: 3B6F89FCD FD In Decimal:

Conversion between Decimal and Binary Binary to Decimal −Use the definition of a number in a positional number system with base 2 −Evaluate the definition formula using decimal arithmetic Example = 1 x x x x x x 2 0 = 43 (decimal)

Conversion between Decimal and Binary Decimal to Binary −Repeatedly divide by 2 −Quotient Carries −Remainder is the next digit −Binary number is developed right to left Example (Quotient) (Remainder) (Binary) 173 ÷ ÷ ÷ ÷ ÷ ÷ ÷ ÷

Generalization: Conversion between Decimal and base b Base b to Decimal −Use the definition of a number in a positional number system with base b −Evaluate the definition formula using decimal arithmetic Decimal to base b −Repeatedly divide by b −Quotient carries −Remainder is the next digit −Base b number is developed right to left

Conversion between Binary and Octal/Hexadecimal Binary to Octal −Group bits into threes, right to left −Convert each group into an octal digit Example = = 1327 (octal) Binary to Hexadecimal −Group bits into fours, right to left −Convert each group into a hexadecimal digit Example = = 2CB (hexadecimal)

Conversion between Binary and Octal/Hexadecimal Octal to Binary −Convert each digit to a three-bit binary representation Example 705 = = (binary) Hexadecimal to Binary −Convert each digit to a four-bit binary representation Example 10AF = = (binary) Conversion tables can be reconstructed in the margins of a test paper when needed

What about converting between Octal and Hexadecimal? Hexadecimal is not base 8, so grouping won’t work as in binary  octal or binary  hexadecimal Octal to Hexadecimal −Convert octal to binary and then binary to hexadecimal Hexadecimal to Octal −Convert hexadecimal to binary and then to octal

DecimalBinaryOctalHexadecimal A B C D E F

ABCDEF A0B0C0D0E0F A0B0C0D0E0F A0B0C0D0E0F A0B0C0D0E0F A0B0C0D0E0F A0B0C0D0E0F A0B0C0D0E0F A0B0C0D0E0F A0B0C0D0E0F A0B0C0D0E0F A0A0B0C0D0E0F B0B0C0D0E0F A C0C0D0E0F A1B D0D0E0F A1B1C E0E0F A1B1C1D F0F A1B1C1D1E