Professional Documents
Culture Documents
Electrónica
Julio Solano
CCNA rev4 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1
Sistemas
Numericos
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 2
Network Math
www.thinkgeek.com
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 3
Base 10 number system – The Math
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 4
Base 10 (Decimal) Number System
Digits (10): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Number of:
104 103 102 101 100
10,000’s 1,000’s 100’s 10’s 1’s
1,309 1 3 0 9
99 9 9
100 1 0 0
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 5
Rick’s Number System Rules
1. All digits start with 0
2. A Base-n number system has n number of digits:
–Decimal: Base-10 has 10 digits
–Binary: Base-2 has 2 digits
–Hexadecimal: Base-16 has 16 digits
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 6
Base 2 number system – The Math
101102 = (1 x 24 = 16) + (0 x 23 = 0) + (1 x 22 = 4) + (1 x 21 =
2) + (0 x 20 = 0) = 22 (16 + 0 + 4 + 2 + 0)
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 7
Base 2 (Binary) Number System
Digits (2): 0, 1
Number of:
27 ___ ___ ___ 23 22 21 20
128’s 8’s 4’s 2’s 1’s
Dec.
2 1 0
10 1 0 1 0
17
70
130
255
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 8
Base 2 (Binary) Number System
Digits (2): 0, 1
Number of:
27 26 25 24 23 22 21 20
128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s
Dec.
2 1 0
10 1 0 1 0
17 1 0 0 0 1
70 1 0 0 0 1 1 0
130 1 0 0 0 0 0 1 0
255 1 1 1 1 1 1 1 1
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 9
Converting between Decimal and Binary
Digits (2): 0, 1
Number of:
27 26 25 24 23 22 21 20
128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s
Dec.
1 0 0 0 1 1 0
1 0 1 0 0 0
0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0
172
192
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 10
Converting between Decimal and Binary
Digits (2): 0, 1
Number of:
27 26 25 24 23 22 21 20
128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s
Dec.
70 1 0 0 0 1 1 0
40 1 0 1 0 0 0
0 0 0 0 0 0 0 0 0
128 1 0 0 0 0 0 0 0
172 1 0 1 0 1 1 0 0
192 1 1 0 0 0 0 0 0
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 11
Computers do Binary
0 1
If this is new to you, see me after class.
Bits have two values: OFF and ON
The Binary number system (Base-2) can represent OFF and ON very
well since it has two values, 0 and 1
–0 = OFF
–1 = ON
Understanding Binary to Decimal conversion is critical in networking.
Although we use decimal numbers in networking to display information
such as IP addresses (LATER), they are transmitted as OFF’s and ON’s
that we represent in binary.
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 12
Rick’s Program
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 13
Rick’s Program
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 14
Rick’s Program
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 15
Base 16 (Hexadecimal) Number System
Digits (16):
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
7 7 15 F
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 16
Base 16 (Hexadecimal) Number System
Digits (16):
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Number of:
___ ___ 161 160
Dec. 16’s 1’s
8
9
10
15
16
17
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 17
Base 16 (Hexadecimal) Number System
Digits (16):
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Number of:
163 162 161 160
Dec. 4,096’s 256’s 16’s 1’s
8 8
9 9
10 A
15 F
16 1 0
17 1 1
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 18
Base 16 (Hexadecimal) Number System
Digits (16):
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Number of:
163 162 161 160
Dec. 4,096’s 256’s 16’s 1’s
25
66
100
254
255
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 19
Base 16 (Hexadecimal) Number System
Digits (16):
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Number of:
163 162 161 160
Dec. 4,096’s 256’s 16’s 1’s
25 1 9
66 4 2
100 6 4
254 F E
255 F F
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 20
Base 16 (Hexadecimal) Number System
Digits (16):
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Number of:
163 162 161 160
Dec. 4,096’s 256’s 16’s 1’s
1 A C
2 0 3
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 21
Base 16 (Hexadecimal) Number System
Digits (16):
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Number of:
163 162 161 160
Dec. 4,096’s 256’s 16’s 1’s
428 1 A C
515 2 0 3
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 22
Hexadecimal
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 23
Why Hexadecimal?
Hexadecimal is perfect for matching 4 bits.
16 Hex values which means 16 4 bit possibilities.
4 bits can be represented by 1 Hex value
8 bits (1 byte or octet) can be represented by 2 Hex values
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 24
Why Hexadecimal?
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 25
Why Hexadecimal?
Dec. Hex. Binary Dec. Hex. Binary
0 0 0000 8 8 1000
1 1 0001 9 9 1001
2 2 0010 10 A 1010
3 3 0011 11 B 1011
4 4 0100 12 C 1100
5 5 0101 13 D 1101
6 6 0110 14 E 1110
7 7 0111 15 F 1111
-----------------------------------------------------
Here are 48 bits being transmitted:
0000000000100000011010110001011101100010
Break them up into 4 bit chunks:
0000 0000 0010 0000 1110 0000 0110 1011 0001 0111 0110 0010
Convert each 4 bits to Hexadecimal:
0 0 2 0 E 0 6 B 1 7 6 2
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 26
Why Hexadecimal?
Dec. Hex. Binary Dec. Hex. Binary
0 0 0000 8 8 1000
1 1 0001 9 9 1001
2 2 0010 10 A 1010
3 3 0011 11 B 1011
4 4 0100 12 C 1100
5 5 0101 13 D 1101
6 6 0110 14 E 1110
7 7 0111 15 F 1111
-----------------------------------------------------
Here are 48 bits being transmitted:
0000000000100000011010110001011101100010
Break them up into 4 bit chunks:
0000 0000 0010 0000 1110 0000 0110 1011 0001 0111 0110 0010
Convert each 4 bits to Hexadecimal:
0 0 2
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 27
Why Hex?
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 29
Converting Decimal, Hex, and Binary
Dec. Hex. Binary Dec. Hex. Binary
0 0 0000 8 8 1000
1 1 0001 9 9 1001
2 2 0010 10 A 1010
3 3 0011 11 B 1011
4 4 0100 12 C 1100
5 5 0101 13 D 1101
6 6 0110 14 E 1110
7 7 0111 15 F 1111
-----------------------------------------------------
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 30
Converting Hex, and Binary
Dec. Hex. Binary Dec. Hex. Binary
0 0 0000 8 8 1000
1 1 0001 9 9 1001
2 2 0010 10 A 1010
3 3 0011 11 B 1011
4 4 0100 12 C 1100
5 5 0101 13 D 1101
6 6 0110 14 E 1110
7 7 0111 15 F 1111
-----------------------------------------------------
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 33
RGB Colors and Binary Representation
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 34
Each Color intensity of red, green and blue represented as a quantity from 0
through 255.
Higher the number the more intense the color.
Black has no intensity or no color and has the value (0, 0, 0)
White is full intensity and has the value (255, 255, 255)
Between these extremes is a whole range of colors and intensities.
Grey is somewhere in between (127, 127, 127)
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 35
RGB Colors and Binary Representation
You can use your favorite program that allows you to choose colors to
view these various red, green and blue values.
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 36
www.december.com
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 37
Color Codes
http://www.december.com/html/spec/colorcodes.html
This page shows a variety of notations used to represent color including
ways you can define colors in HTML or style sheets.
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 38
HTML
With HTML (Hypertext Markup
Language), colors are
sometime described using
their RGB color specification
in hexadecimal.
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 39
HTML
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 40
Why Hexadecimal?
Dec. Hex. Binary Dec. Hex. Binary
0 0 0000 8 8 1000
1 1 0001 9 9 1001
2 2 0010 10 A 1010
3 3 0011 11 B 1011
4 4 0100 12 C 1100
5 5 0101 13 D 1101
6 6 0110 14 E 1110
7 7 0111 15 F 1111
-----------------------------------------------------
We said the hexadecimal RGB code for Carrot Orange is #FF8E2A or in decimal (255, 142,
42)
Remember that this is using 24 bits for color or 3 bytes.
Carrot Orange is
In binary: 1111 1111 , 1000 1110 , 0010 1010
In hexadecimal: F F , 8 E , 2 A
In decimal: 255 , 142 , 42
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 41
Color Codes
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 42
Chili
Powder
C 7 3 F 1 7
1100 0111 0011 1111 0001 0111
199 63 23
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 43
CCNA rev5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 44