© 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

30
© 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math

Transcript of © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

Page 1: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

© 2010 Cisco Systems, Inc. All rights reserved. 1

Network Math

Page 2: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

2© 2010 Cisco Systems, Inc. All rights reserved.

Decimal Numbers AKA

BASE 10 Numbers

Page 3: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

3© 2010 Cisco Systems, Inc. All rights reserved.

Decimal numbers are based on 10 digits:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Decimal Number Format

Ten Millions Millions

Hundred thousands

Tenthousands Thousands Hundreds Tens Ones

10,000,000 1,000,000 100,000 10,000 1,000 100 10 1

Page 4: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

4© 2010 Cisco Systems, Inc. All rights reserved.

Example:

7,469

7000 + 400 + 60 + 9 = 7469

Decimal Number Format

Thousands Hundreds Tens Ones

7 4 6 9

X 1000 X 100 X 10 X 1

7000 400 60 9

Page 5: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

5© 2010 Cisco Systems, Inc. All rights reserved.

Place holders for each digit are based on a power of 10

Decimal Number Format

Ten Millions Millions

Hundred thousands

Tenthousands Thousands Hundreds Tens Ones

10,000,000 1,000,000 100,000 10,000 1,000 100 10 1

107 106 105 104 103 102 101 100

Page 6: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

6© 2010 Cisco Systems, Inc. All rights reserved.

Example:

7,469

TOTAL7469

Decimal Number Format is a Base 10 Format

Thousands Hundreds Tens Ones

7 4 6 9

X 103 X 102 X 101 X 100

7000 400 60 9

Page 7: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

7© 2010 Cisco Systems, Inc. All rights reserved.

Binary Numbers AKA

Base 2 Numbers

Page 8: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

8© 2010 Cisco Systems, Inc. All rights reserved.

Binary numbers are based on 2 digits: 0 & 1

Place holders for each digit are based on a power of 2

Binary (BASE 2) Number Format

27 26 25 24 23 22 21 20

Page 9: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

9© 2010 Cisco Systems, Inc. All rights reserved.

Binary numbers are based on 2 digits: 0 & 1

The decimal value of each place in a binary number can be calculated by raising 2 to the appropriate power:

20 = 1

Binary (BASE 2) Number Format

1

27 26 25 24 23 22 21 20

Page 10: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

10© 2010 Cisco Systems, Inc. All rights reserved.

Binary numbers are based on 2 digits: 0 & 1

The decimal value of each place in a binary number can be calculated by raising 2 to the appropriate power:

21 = 2

Binary (BASE 2) Number Format

2 1

27 26 25 24 23 22 21 20

Page 11: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

11© 2010 Cisco Systems, Inc. All rights reserved.

Binary numbers are based on 2 digits: 0 & 1

The decimal value of each place in a binary number can be calculated by raising 2 to the appropriate power:

22 = 4

Binary (BASE 2) Number Format

4 2 1

27 26 25 24 23 22 21 20

Page 12: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

12© 2010 Cisco Systems, Inc. All rights reserved.

Binary numbers are based on 2 digits: 0 & 1

The decimal value of each place in a binary number can be calculated by raising 2 to the appropriate power:

23 = 8

Binary (BASE 2) Number Format

8 4 2 1

27 26 25 24 23 22 21 20

Page 13: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

13© 2010 Cisco Systems, Inc. All rights reserved.

Binary numbers are based on 2 digits: 0 & 1

The decimal value of each place in a binary number can be calculated by raising 2 to the appropriate power:

24 = 16

Binary (BASE 2) Number Format

16 8 4 2 1

27 26 25 24 23 22 21 20

Page 14: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

14© 2010 Cisco Systems, Inc. All rights reserved.

Binary numbers are based on 2 digits: 0 & 1

The decimal value of each place in a binary number can be calculated by raising 2 to the appropriate power:

25 = 32

Binary (BASE 2) Number Format

32 16 8 4 2 1

27 26 25 24 23 22 21 20

Page 15: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

15© 2010 Cisco Systems, Inc. All rights reserved.

Binary numbers are based on 2 digits: 0 & 1

The decimal value of each place in a binary number can be calculated by raising 2 to the appropriate power:

26 = 64

Binary (BASE 2) Number Format

64 32 16 8 4 2 1

27 26 25 24 23 22 21 20

Page 16: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

16© 2010 Cisco Systems, Inc. All rights reserved.

Binary numbers are based on 2 digits: 0 & 1

The decimal value of each place in a binary number can be calculated by raising 2 to the appropriate power:

27 = 128

Binary (BASE 2) Number Format

128 64 32 16 8 4 2 1

27 26 25 24 23 22 21 20

Page 17: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

17© 2010 Cisco Systems, Inc. All rights reserved.

Binary numbers are based on 2 digits: 0 & 1

The decimal value of each place in a binary number can be calculated by raising 2 to the appropriate power:

27 = 128

Binary (BASE 2) Number Format

128 64 32 16 8 4 2 1

27 26 25 24 23 22 21 20

Page 18: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

18© 2010 Cisco Systems, Inc. All rights reserved.

8-BIT BINARY NUMBERS

What do 8-bit binary numbers look like? They will use the digits 0 and 1

They will be 8 bits long

Page 19: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

19© 2010 Cisco Systems, Inc. All rights reserved.

8-BIT BINARY NUMBERS

Here are some examples of 8-bit binary numbers.

00000101

10101010

11001100

11100111

Page 20: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

20© 2010 Cisco Systems, Inc. All rights reserved.

8-BIT BINARY NUMBERS

There are 256 combinations of 8-bit binary numbers:

Smallest: 00000000

Largest: 11111111

Page 21: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

21© 2010 Cisco Systems, Inc. All rights reserved.

What is the decimal value of the smallest 8-bit binary number? 00000000

Since zero is a factor when multiplying each place value, there are 8 zeros to add together:

0+0+0+0+0+0+0+0 = 0 converted to Base 10

8-BIT BINARY NUMBERS

0 0 0 0 0 0 0 0

128 64 32 16 8 4 2 1

0x128=0 0x64=0 0x32=0 0x16=0 0x8=0 0x4=0 0x2=0 0x1=0

27 26 25 24 23 22 21 20

Page 22: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

22© 2010 Cisco Systems, Inc. All rights reserved.

What is the decimal value of the largest 8-bit binary number? 11111111

Since each place value is multiplied by 1, the 8 place values are added together:

128+64+32+16+8+4+2+1=255 converted to Base 10

8-BIT BINARY NUMBERS

1 1 1 1 1 1 1 1

128 64 32 16 8 4 2 1

1x128=128 1x64=64 1x32=32 1x16=16 1x8=8 1x4=4 1x2=2 1x1=1

27 26 25 24 23 22 21 20

Page 23: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

23© 2010 Cisco Systems, Inc. All rights reserved.

What is the decimal value of this 8-bit binary number? 00000101

Each zero factor will result in a zero value when multiplying the place value, but the factors of 1 will be added together:

0+0+0+0+0+4+0+1 = 5 converted to Base 10

8-BIT BINARY NUMBERS

0 0 0 0 0 1 0 1

128 64 32 16 8 4 2 1

0x128=0 0x64=0 0x32=0 0x16=0 0x8=0 1x4=0 0x2=0 1x1=0

27 26 25 24 23 22 21 20

Page 24: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

24© 2010 Cisco Systems, Inc. All rights reserved.

What is the decimal value of this 8-bit binary number? 10101010

Each zero factor will result in a zero value when multiplying the place value, but the factors of 1 will be added together:

128+0+32+0+8+0+2+0 = 170 converted to Base 10

8-BIT BINARY NUMBERS

1 0 1 0 1 0 1 0

128 64 32 16 8 4 2 1

1x128=128 0x64=0 1x32=32 0x16=0 1x8=8 0x4=0 1x2=2 0x1=0

27 26 25 24 23 22 21 20

Page 25: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

25© 2010 Cisco Systems, Inc. All rights reserved.

What is the decimal value of this 8-bit binary number? 11001100

Each zero factor will result in a zero value when multiplying the place value, but the factors of 1 will be added together:

= converted to Base 10

8-BIT BINARY NUMBERS

1 1 0 0 1 1 0 0

128 64 32 16 8 4 2 1

27 26 25 24 23 22 21 20

Page 26: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

26© 2010 Cisco Systems, Inc. All rights reserved.

What is the decimal value of this 8-bit binary number? 11100111

Each zero factor will result in a zero value when multiplying the place value, but the factors of 1 will be added together:

= converted to Base 10

8-BIT BINARY NUMBERS

1 1 1 0 0 1 1 1

128 64 32 16 8 4 2 1

27 26 25 24 23 22 21 20

Page 27: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

27© 2010 Cisco Systems, Inc. All rights reserved.

CONVERSIONS Binary to Decimal Decimal to Binary

Page 28: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

28© 2010 Cisco Systems, Inc. All rights reserved.

Remember the decimal values for each placeholder in an 8-bit binary number:

Converting from Binary to Decimal and

Converting from Decimal to Binary utilize this

These conversions will be necessary numerous times!

IMPORTANT TO REMEMBER!

128 64 32 16 8 4 2 1

Page 29: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

29© 2010 Cisco Systems, Inc. All rights reserved.

Page 30: © 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.

30© 2010 Cisco Systems, Inc. All rights reserved.