background image
140
Chapter 3
Internet Protocols
Binary-to-Decimal Conversion Review
Prior to learning about IP addressing, you must have a fundamental under-
standing of binary-to-decimal conversions. Here is how it works: Binary
numbers use 8 bits to define a decimal number. These bits are weighted
from right to left in an increment that doubles in value.
Here's an example of 8 bits and the value assigned to each bit:
128 64 32 16 8 4 2 1
Here's an example of binary-to-decimal conversion:
128 64 32 16 8 4 2 1 Binary value
0 0 1 0 0 1 1 0 Byte in binary
Add the value of the bits that are turned on:
32
4
2
= 38
Any time you find a bit turned on (a one), you add the values of each bit
position. Let's practice on a few more:
01010101 = 85
64
16
4
1
= 85
Try a few on your own:
00001111 = 15
10001100 = 140
11001100 = 204
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com