IP address format and presentation

①IP address format and presentation

IP address (IPv4) a 32-bit binary number, is divided into 4 sections (4 bytes), each piece of 8-bit binary number (1 byte)
each an eight-bit binary intermediate English punctuation. " "separated

Since the binary number is too long, in order to facilitate identification and memory, to each piece of 8-bit binary to decimal size of 0-255.
IP address This notation is called " dotted decimal notation ."
IP address is expressed as: xxx.xxx.xxx.xxx
For chestnut: 210.21.196.6 that represents an IP address.

② understand the exponential power of 2

2 is also referred to as a power exponent of 2, may also be referred to as a power of 2, 2 power, 3 power of 2 such as 2, etc., any number equal to one of 0 th.
In IP address, just 0 th to 7 th 8-bit, which is very convenient for the IP address of the decimal binary conversion.
For chestnut: 11010010 = 1 × 2 ^ 7 + 1 × 2 ^ 6 + 0 × 2 ^ 5 + 1 × 2 ^ 4 + 0 × 2 ^ 3 + 0 × 2 ^ 2 + 1 × 2 ^ 1 + 0 × 2 ^ 0 = 128 + 16 + 64 + 0 + 0 + 0 + 2 + 0 = 210

Guess you like

Origin www.cnblogs.com/zlnb/p/11946163.html