| |
|
Home | Links ( Motorcycles, Computers ) |
IP Address Conversions
All of the information, instructions, and recommendations on this Web site are offered on a strictly "as is" basis. Remember "Murphy's Law." Please take the proper precautions before attempting any of the tips or modifications listed here.
| How to: Convert a Decimal Number to a Base-256 dotted-decimal / dotted-quad |
| How to: Convert an IPv4 Address to a Decimal Number |
| Computer Tips index |
| CS 607: LAN Connectivity |
Step |
|
1 |
Evaluate the number:
|
2 |
Divide the decimal number by 256 |
3 |
Multiply the decimal portion of the result from step 2 by 256 |
4 |
Subtract the result of step 3 from the original decimal number to yield the Base-256 octet |
5 |
Examine the decimal portion of the result from step 2
|
Find the last address in an IPv4 subnet with a network address of 16.0.0.0, with 32,768 addresses per subnet.
First, convert the number of addresses - 1 to Base 256 (dotted-decimal). 32,768 - 1 = 32,767
Using zeroes for the remaining octets yields a Base-256 value of: 0.0.127.255
Once the conversion is complete, add that Base 256 dotted-decimal value to the 1st address to determine the last address in the subnet.
First address in the 1st subnet: |
|
16 |
. |
0 |
. |
0 |
. |
0 |
Number of addresses (32,768 per subnet) -1 : |
|
0 |
. |
0 |
. |
127 |
. |
255 |
Last address in the 1st subnet: |
|
16 |
. |
0 |
. |
127 |
. |
255 |
| 2563 | 2562 | 2561 | 2560 |
| 16,777,216 | 65,536 | 256 | 1 |
| w | x | y | z |
An IPv4 address is a 32-bit number. It is generally written in the "dotted-decimal" notation: w.x.y.z. To convert an IP address to base 10, use the following:
w * 16,777,216 + x * 65,536 + y * 256 + z = Decimal IP Address
| All items Copyright ©1996 - 2012 Mr. N. Chin. All Rights reserved | Conscious Vibes developed and maintained by Mr. Chin | Duplication of links and/or content is strictly prohibited. See: Terms of use |