8.IP and binary conversion
IP is called the network protocol, the full name Internet Protocol,IP protocol belongs to the network layer protocol, is for the network to connect and communicate with each other.
Mailing address:
V IP address: is a logical address, variable address, a total of 32Bit.
V MAC address: is a physical address, burned in the hardware, immutable, a total of 42Bit.
Note: IP addresses are used for global communication (different network segments), while MAC addresses are used for local communications (the same network segment)
IP address format: dotted decimal, IP address consists of 32-bit binary numbers, easy to remember and convert to decimal.
IP address classification:
Class A: 1 '126 Mask: 255.0.0.0
Class B: 128 '191 Mask: 255.255.0.0
Class C: 192 mask: 255.255.255.0
Class D: for Multicast
Category E: used to retain scientific research
Private address:
Category A: 10.0.0.0 10.255.255.255
Mask: 255.0.0.0
Category B: 172.16.0.05172.31.255.255
Mask: 255.255.0.0
Class C: 192.168.0.05192.168.255.255
Mask: 255.255.255.0
Note: private address is to meet the needs of internal users, in order to solve the problem of insufficient IPV4 address.
The base consists of a set of digital symbols and cardinality and bit weights.
V cardinality refers to the number of digits used in seed production by carry counting.
V-bit weight refers to the unit value corresponding to each fixed position in the carry system.
Conversion between decimal and binary
Decimal to binary: the remainder of dividing a decimal number by binary, and writing it backwards is a binary number.
Example: decimal 53 is converted to binary bit 110101.
Binary to decimal: marks the position of the binary number, which is the power of 2 when the position is 1, and then the calculated numbers can be added.
Example: the binary number 110101 is converted to the decimal number 53.