Description of the algorithm is in the documentation for the function
inet_ntoa, used by the ping command.
The address supplied in cp can have one of the following forms:
....
a.b.c
Parts a and b specify the first two bytes of the binary address. Part c is interpreted as a 16-bit value that defines the rightmost two bytes of the binary address. This notation is suitable for specifying (outmoded rated) Class B network addresses.
Ie 327 is treated as a two-byte integer. The bit representation, this number looks like this:
0000 0001 0100 0111
And further it is divided into two octets - 0000 0100 0001 and 0111, which, respectively, will be 1 and 71.