Presentation is loading. Please wait.

Presentation is loading. Please wait.

Number Systems & Binary

Similar presentations


Presentation on theme: "Number Systems & Binary"— Presentation transcript:

1 Number Systems & Binary
How to count

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

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

4 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

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

6 Other Bases Base determines the multiplier from one column to next
= 1 * * * * * 1 = 160-thousands 204 eight-thousands 203 four-hundreds 202 twentys 201 ones 200 1 2 5 9

7 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

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

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

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

11 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

12 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: = 101 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1

13 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

14 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

15 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

16 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

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

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

19 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

20 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

21 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

22 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

23 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

24 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

25 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

26 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 128 64 32 16 8 4 2 1 = 105

27 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 to decimal:  Number Answer 1101

28 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 to decimal:  Number Answer 1101 0 * 2

29 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 to decimal:  Number Answer 1101 101 0 * 2 + 1

30 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 to decimal:  Number Answer 1101 101 1

31 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 to decimal:  Number Answer 1101 101 1 1 * 2

32 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 to decimal:  Number Answer 1101 101 1 01 1 * 2 + 1

33 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 to decimal:  Number Answer 1101 101 1 01 3

34 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 to decimal:  Number Answer 1101 101 1 01 3 3 * 2

35 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 to decimal:  Number Answer 1101 101 1 01 3 3 * 2 + 0

36 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 to decimal:  Number Answer 1101 101 1 01 3 6

37 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 to decimal:  Number Answer 1101 101 1 01 3 6 6 * 2

38 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 to decimal:  Number Answer 1101 101 1 01 3 6 _ 6 * 2 + 1

39 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 to decimal:  Number Answer 1101 101 1 01 3 6 _ 13

40 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 to decimal:  Number Answer 1101 101 1 01 3 6 _ 13 128 64 32 16 8 4 2 1 = 13


Download ppt "Number Systems & Binary"

Similar presentations


Ads by Google