IPv4 addresses consist of 32-bit binary numbers. IPv4 is the 4th version of the Internet communication protocol. IPv4 uses 4 bytes. Each section contains 8 address bits. A total of 32 binary digits represent the network address. According to the number of binary digits of ipv4, it can be seen that ipv4 can represent a total of networks. The address is 2 raised to the 32nd power, which is equal to 4294967296, which is approximately 4.3 billion.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
An IPv4 address is composed of 32-bit binary numbers, or represented by four groups of 8-bit binary numbers.
What is ipv4?
Internet Protocol version 4 (English: Internet Protocol version 4, IPv4), also known as the fourth version of the Internet Communication Protocol, is the fourth revised version in the development process of the Internet Protocol, and is also The first widely deployed version of this protocol. IPv4 is the core of the Internet and the most widely used version of the Internet Protocol. Its successor version is IPv6. Until 2011, when the IANA IPv4 addresses were completely exhausted, IPv6 was still in the early stages of deployment.
IPv4 is a connectionless protocol that operates on the link layer (such as Ethernet) using packet switching. This protocol delivers packets on a best-effort basis, meaning that it does not guarantee that any packet will reach its destination or that all packets will arrive in the correct order without duplication. These aspects are handled by upper-layer transport protocols (such as Transmission Control Protocol).
ipv4 works in the network layer of the OSI seven-layer network model. The IP address is a logical address provided by each network or each host on the Internet to shield the difference in physical addresses.
How many bits does ipv4 have?
ipv4 uses 4 bytes, a total of 32 binary numbers to represent the network address. According to the binary digits of ipv4, it can be seen that the total network address that ipv4 can represent is 2 to the 32nd power, which is equal to 4,294,967,296, which is approximately 4.3 billion.
However, there are not so many routing addresses available on the Internet because some addresses are reserved for special purposes.
ipv4 format
ipv4 format is divided into 32 bits, divided into 4 segments, each segment 8 binary digits separated by decimal points.
Classification of ipv4
In the 32-bit binary number of ipv4, the high bit is defined as the network class, and the remaining bits represent the host identification code . According to this definition, IPv4 is divided into five types of addresses, namely A, B, C, D and E.
Class A:
In a Class A network, the first bit is fixed to binary "0", and 7 bits are used to represent the network Category, the remaining 24 bits represent the host, and the range is 1.0.0.1~126.255.255.254 (0 and 127 are not available).
There are a total of 126 Class A addresses, and since the host number cannot be all 0s and all 1s, each Class A address can be connected to 2 raised to the 24th power minus 2, for a total of 16,777,216-2=16,777,214 units host.
Class B:
In a Class B network, the first two digits are fixed to binary "10", the 14 digits represent the network number, and the last 16 digits represent the host identification number. The representation range is 128.0.0.1~191.255.255.254 (the Class B network address 128.0.0.0 is not assigned).
Then there are a total of 2 to the power of 14 minus 1 for Class B networks, a total of 16383. Each Class B address can accommodate 2 to the 16th power minus 2, for a total of 65536-2=65534.
Class C:
In a Class C network, the first two digits are fixed to binary "110", the 21 digits represent the network number, and the last 8 digits represent the host identification number. The representation range is 192.0.0.1~223.255.255.254.
Then there are a total of 2 to the 21st power of Class C networks, a total of 2,097,152. Each Class C address can accommodate 2 to the 8th power minus 2, for a total of 256-2=254.
Class D: 224~239, multicast address
Class E: 240~254, reserved for research and testing use
For more related knowledge, please visit the FAQ column!
The above is the detailed content of An ipv4 address consists of several binary digits. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Mac version
God-level code editing software (SublimeText3)

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download
The most popular open source editor