Number Systems & Binary

Slides:



Advertisements
Similar presentations
Scientific Notations - Operations Addition and Subtraction 1 st Convert one of the numbers so the exponents match 2 nd Add or subtract the decimal numbers.
Advertisements

Calculating in Other Bases
DATA REPRESENTATION CONVERSION.
Whole numbers: How to Dissect and Solve word problems
Number Systems. 2 The total number of allowable symbols in a number system is called the radix or base of the system. Decimal Numbers: radix = 10 (symbols:
Multiplying and Dividing Decimals
Binary Numbers Converting Decimal to Binary Binary to Decimal.
Simplifying Exponents
Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.
Chapter One PROBLEM SOLVING WITH MATH Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
2.1 2 Number Systems Foundations of Computer Science  Cengage Learning.
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
Decimals By: Sandy Denson.
Chapter 2.2 Scientific Notation. Expresses numbers in two parts: A number between 1 and 10 Ten raised to a power Examples: 2.32 x x
Tally, Babylonian, Roman And Hindu-Arabic
Place value and ordering
Pharmacology I Math Review.
Place Value and Multiplication
Place Value and dividing by 10, 100, etc
Computer Arithmetic and the Arithmetic Unit Lesson 2 - Ioan Despi.
Operations on Scientific Notation Addition and Subtraction 1. If they have the same exponent - add/subtract the number in front - keep the same exponent.
Operations with Scientific Notation. Addition and Subtraction Format Addition (N * 10 x ) + (M * 10 x ) = (N + M) * 10 x Subtraction (N * 10 y ) - (M.
CPIT 201 Introduction to Computing
Scientific Notation AP Chemistry August 11 th, 2015.
Partial Quotient Method In this division algorithm the children record on the right side of the problem. The first thing they do is divide. They ask themselves.
Discrete Mathematics Numbering System.
MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.
Introduction To Number Systems Binary System M. AL-Towaileb1.
Unit 1 Review Order of Operations and Whole Numbers.
Scientific Notation. Scientific (Exponential) Notation A number is written as the product of two numbers, a coefficient and 10 raised to a power 36,000.
SCIENTIFIC NOTATION RULES. Rules for converting to Scientific Notation One non-zero number before the decimal One digit after the decimal If you are making.
 2012 Pearson Education, Inc. Slide Chapter 4 NumerationSystems.
Chapter 1 Whole Numbers Digit – number from 0-9
Everyday Math Algorithms
Number Systems & Binary How to count. How do we represent numbers? Early systems: – Actual count : ||||| = 5 – Roman numers : XI = 11 Hard to do math:
Chapter 4 Numeration and Mathematical Systems © 2008 Pearson Addison-Wesley. All rights reserved.
The four written methods Column addition To do Colum addition fist you must ad the units together 1+7= 8 Next add the tens 8+9= 17 You cant put a two.
Number systems. Binary system. Bits and bytes. Modern computers “speak” in a digital language composed of 2 digits. The machine language of modern computers.
Binary & Hex Review.
Draw two number lines from 0 – 5.
Discrete Mathematics Numbering System.
Scientific Notation.
Binary Positional Notation
Scientific notation APES Math Topics 1 and 2.
Chapter 3 Decimals. Chapter 3 Decimals Learning Unit Objectives #3 Decimals Learning Unit Objectives Rounding Decimals; Fraction and Decimal Conversions.
Chapter R Prealgebra Review Decimal Notation.
ITE102 – Computer Programming (C++)
Number Systems Lab session 1 Xuan Guo.
Tools of Web Development 1: Module A: Numbering Systems
Addition, Subtraction, Multiplication and Division
Decimal Operations.
SCIENTIFIC NOTATION.
Objectives To show how very large or very small numbers can be expressed in scientific notation To learn the English, metric, and SI systems of measurement.
Scientific Notation.
This lesson explains how to read and work with decimals.
Whole Numbers: How to Dissect and Solve Problems
Powers of 10 Add 1 to the power Subtract 1 from the power
23 ×
Multiplying and Dividing in Scientific Notation
BASIC MATH.
Math Jeopardy $10 $20 $30 $40 $50 Addition Subtraction Multiplication
5.1 - Scientific Notation & Units
Converting from Base-n to Base-10
Binary & Hex Review.
Place Value and Writing Numbers
Math Mystery.
Sets and Subsets Cornell Notes
Introduction To Number Systems
§4.2, Number Bases in Positional Systems
Presentation transcript:

Number Systems & Binary How to count

How do we represent numbers? Early systems: Actual count : ||||| = 5 Roman numbers : XI = 11 Hard to do math: MCXXIII + CLXXIV = ????

Place Value Systems What we are used to Digits that have different meaning based on place: = 1 * 10000 + 2 * 1000 + 0 * 100 + 5 * 10 + 9 * 1 = 12059 ten thousands thousands hundreds tens ones 1 2 5 9

Decimal Numbers Base 10 : Each place increases by a power of 10 1 2 5 ten thousands 104 thousands 103 hundreds 102 tens 101 ones 100 1 2 5 9

Why Base 10? Only one thing special about base 10: Other systems have been used: Mayans : Base 20 Babylonians : Base 60

Other Bases Base determines the multiplier from one column to next = 1 * 160000 + 2 * 8000 + 0 * 400 + 5 * 20 + 9 * 1 = 176109 160-thousands 204 eight-thousands 203 four-hundreds 202 twentys 201 ones 200 1 2 5 9

Other Bases Base also determines how many digits needed: Base 10 : 10 digits : 0-9 Base 2 : 2 digits : 0-1 Base 8 : 8 digits : 0-7

Base 2 Base two Only 1 and 0 Places are powers of 2 1 = 1 * 32 + 0 * 16 + 1 * 8 + 1 * 4 + 0 * 2 + 1 * 1 = 32 + 8 + 4 + 1 = 45 thirty-twos 25 sixteens 24 eights 23 fours 22 twos 21 ones 20 1

Notation Subscript used to indicate base: 1012  101 in base 2 (numeric value of 5) 10110  101 in base 10 (numeric value of 101)

More digits = bigger numbers 4 digits we can represent values 0-15 15: 8 digits can represent 0-255 16 digits can represent 0-65535 n digits can represent 0 to (2n-1) 8 4 2 1

Counting to ten in binary Values for 1-10 (decimal) in binary: 1 0001 6 0110 2 0010 7 0111 3 0011 8 1000 4 0100 9 1001 5 0101 10 1010

Binary -> Decimal with Table Make a table like this one Write in the binary number Add up all the numbers from the top that have a 1 under them: 64 + 32 + 4 + 1 = 101 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1

Decimal -> Binary with Table Make a table like this one Say we are converting 83: Look for largest number that is smaller than our value 128 64 32 16 8 4 2 1

Decimal -> Binary with Table Make a table like this one Say we are converting 83: Look for largest number that is smaller than our value We have 1 of those (0 of anything bigger) Subtract that from our number 83 – 64 = still have 19 to make 128 64 32 16 8 4 2 1

Decimal -> Binary with Table Make a table like this one Say we are converting 83: Look for largest number that is smaller than our value We have 1 of those (0 of anything bigger) Subtract that from our number 83 – 64 = still have 19 to make Look for largest value smaller than that… Now have 19 – 16 = 3 left 128 64 32 16 8 4 2 1

Decimal -> Binary with Table Make a table like this one Say we are converting 83: Look for largest number that is smaller than our value We have 1 of those (0 of anything bigger) Subtract that from our number 83 – 64 = still have 19 to make Look for largest value smaller than that… Now have 19 – 16 = 3 left Continue… need a 2, have one left… 128 64 32 16 8 4 2 1

Decimal -> Binary with Table Make a table like this one Say we are converting 83: 0101 0011 means 64 + 16 + 2 + 1 = 83 128 64 32 16 8 4 2 1

Conversion With Division/ Multiplication Binary works in powers of 2 Multiplying/dividing by 2 shifts digits

Decimal -> Binary with Division Step 1: Start with a blank answer and the number your are converting Step 2: Divide your number by 2 to make a quotient and a remainder Step 3: Place your remainder on the left side of your answer Step 4: If your quotient is 0, you are done Otherwise, make the quotient your new number and go back to step 2 Convert 105 to binary:  Number ÷ 2 Q R Answer 105

Decimal -> Binary with Division Step 1: Start with a blank answer and the number your are converting Step 2: Divide your number by 2 to make a quotient and a remainder Step 3: Place your remainder on the left side of your answer Step 4: If your quotient is 0, you are done Otherwise, make the quotient your new number and go back to step 2 Convert 105 to binary:  Number ÷ 2 Q R Answer 105 ÷ 2 52 1

Decimal -> Binary with Division Step 1: Start with a blank answer and the number your are converting Step 2: Divide your number by 2 to make a quotient and a remainder Step 3: Place your remainder on the left side of your answer Step 4: If your quotient is 0, you are done Otherwise, make the quotient your new number and go back to step 2 Convert 105 to binary:  Number ÷ 2 Q R Answer 105 ÷ 2 52 1

Decimal -> Binary with Division Step 1: Start with a blank answer and the number your are converting Step 2: Divide your number by 2 to make a quotient and a remainder Step 3: Place your remainder on the left side of your answer Step 4: If your quotient is 0, you are done Otherwise, make the quotient your new number and go back to step 2 Convert 105 to binary:  Number ÷ 2 Q R Answer 105 ÷ 2 52 1 52 ÷ 2

Decimal -> Binary with Division Step 1: Start with a blank answer and the number your are converting Step 2: Divide your number by 2 to make a quotient and a remainder Step 3: Place your remainder on the left side of your answer Step 4: If your quotient is 0, you are done Otherwise, make the quotient your new number and go back to step 2 Convert 105 to binary:  Number ÷ 2 Q R Answer 105 ÷ 2 52 1 52 ÷ 2 26 01

Decimal -> Binary with Division Step 1: Start with a blank answer and the number your are converting Step 2: Divide your number by 2 to make a quotient and a remainder Step 3: Place your remainder on the left side of your answer Step 4: If your quotient is 0, you are done Otherwise, make the quotient your new number and go back to step 2 Convert 105 to binary:  Number ÷ 2 Q R Answer 105 ÷ 2 52 1 52 ÷ 2 26 01 26 ÷ 2 13 001

Decimal -> Binary with Division Step 1: Start with a blank answer and the number your are converting Step 2: Divide your number by 2 to make a quotient and a remainder Step 3: Place your remainder on the left side of your answer Step 4: If your quotient is 0, you are done Otherwise, make the quotient your new number and go back to step 2 Convert 105 to binary:  Number ÷ 2 Q R Answer 105 ÷ 2 52 1 52 ÷ 2 26 01 26 ÷ 2 13 001 13 ÷ 2 6 1001 6 ÷ 2 3 01001 3 ÷ 2 101001 1 ÷ 2 1101001

Decimal -> Binary with Division Step 1: Start with a blank answer and the number your are converting Step 2: Divide your number by 2 to make a quotient and a remainder Step 3: Place your remainder on the left side of your answer Step 4: If your quotient is 0, you are done Otherwise, make the quotient your new number and go back to step 2 Convert 105 to binary:  Number ÷ 2 Q R Answer 105 ÷ 2 52 1 52 ÷ 2 26 01 26 ÷ 2 13 001 13 ÷ 2 6 1001 6 ÷ 2 3 01001 3 ÷ 2 101001 1 ÷ 2 1101001 128 64 32 16 8 4 2 1 = 105

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 0 * 2

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 0 * 2 + 1

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 1

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 1 1 * 2

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 1 01 1 * 2 + 1

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 1 01 3

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 1 01 3 3 * 2

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 1 01 3 3 * 2 + 0

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 1 01 3 6

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 1 01 3 6 6 * 2

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 1 01 3 6 _ 6 * 2 + 1

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 1 01 3 6 _ 13

Binary -> Decimal with Multiplication Step 1: Start with the number your are converting and the answer of 0 Step 2: Multiply your answer by 2 Step 3: Remove the leftmost digit of number and add it to your answer Step 4: If number has no more digits, you are done Otherwise, go back to step 2 Convert 11012 to decimal:  Number Answer 1101 101 1 01 3 6 _ 13 128 64 32 16 8 4 2 1 = 13