Introduction to Data Communications
Previous 54d. Network Masking (cont'd) Next

Subnetting a network

Subnet masks can divide networks into smaller networks than the 254 hosts discussed previously. In order to understand this process, a discussion on binary to decimal number conversion is required.

The typical subnet mask 255.255.255.0 represents 4 bytes of data. Each number represents 1 byte and is displayed as a decimal number. One byte of information can represent a range of 0 - 255. One byte consists of 8 bits where 0000 0000 represents 0 in decimal and 1111 1111 represents 255 in decimal.

Note: The convention for displaying bits is to group in nibbles (4 bits) to make it easier to read.

Each bit position has a weighting, where the weighting is equal to 2 to the power of the position starting at position 0 on the right. The easiest way to determine the decimal weighting is to start on the right with the number 1 (which is 2^0) and double it at each bit position. The weighting for each position is follows:

Each position has its weighting multiplied by the binary bit value (0 or 1). For example, if bit position 23 had its bit set to 0, its decimal value would be 0 x 8 = 0. If bit position 25 had its bit set to 1, its decimal value would be 1 x 32 = 32.

To determine the decimal value of a binary number, add up all the decimal weighting values where ever there is a 1 in the binary number. For the following binary number 1111 1111, the decimal value would equal 255:

For the binary number 0000 0000 the decimal value would equal 0:

For the binary number 1010 1001 the decimal value would equal 169:

The significance of the decimal weighting to network routing becomes more evident when the method of rolling over the binary count is examined. For example, the decimal number 63 compared to 64 in binary produces an interesting observation:

	Decimal 63	=	0011 1111

	Decimal 64	=	0100 0000

The decimal number 63 is represented by all 1s in the first 6 bit locations. The decimal number 64 is represented by only bit 6 being a logical 1. If the count was further increased, similar relationships would occur at

	Decimal 127	=	0111 1111

	Decimal 128	=	1000 0000

and

	Decimal 191	=	1011 1111

	Decimal 192	=	1100 0000

and

	Decimal 255	=	1111 1111

	Decimal 0	=	0000 0000

Notice that bit 7 and 6 are the only bits that are changing from the initial example of 63 and 64. What this means is that the network can be subdivided into 4 logical networks of 64 hosts each. In actual fact the number is 62 hosts due to address 0 not being allowed (network address) and address 63 not being allowed (broadcast address).


Introduction to Data Communications
Previous Table of Contents Next