How do I convert a subnet mask to binary? What is the decimal system? And how to calculate?

Updated on amusement 2024-03-15
8 answers
  1. Anonymous users2024-02-06

    Subnet mask. and IP addresses.

    The subnet mask is used to determine the IP addresses of any two computers.

    The basis for whether or not they belong to the same subnetwork.

    The simplest understanding is that after the IP address and subnet mask of the two computers are AND, if the result is the same, it means that the two computers are on the same subnetwork and can communicate directly. It's as simple as that.

    Take a look at the following example:

    Convert to binary.

    Convert to decimal system. After that:

    When converted to decimal, it is:

    When converted to decimal, it is:

    Through the above AND operation of the IP address and subnet mask of the three sets of computers, we can see that the result of the operation is the same. Both.

    This is how the internal network is planned.

    You may have to ask, how many IP addresses can be used for such subnet masks? You can do the math like this. Based on the above, we can see that the IP address inside the LAN is defined by ourselves (of course, it is the same as other IP addresses), which is determined by the subnet mask through the analysis.

    It can be concluded that the first three digits of the IP code can only be fixed by the assigned digits, so only the last digit is left, then it is obvious that the IP address can only have (2 to the 8th power -1), that is, 256-1 = 255, and the last bit of 0 or 255 generally has its special role.

    Then you might be asking: what if my subnet mask isn't? You can do that too, assuming your subnet mask is.

    Then the first two digits of the IP address within your LAN must be fixed (what, why is it fixed?). Don't you just understand it when you look at the top? ·#

    This way, you can follow the calculations below to see how many machines can be in the same subnet.

    1. Decimal 128 = Binary 1000 0000

    2. The IP code should be AND with the subnet mask.

    3. I p address subnet mask and operation.

    When converted to decimal, it is:

    To 5, convert to decimal:

    To and 255 are usually used as internal special uses of the network. Usually not used.

    8. The total number is (255-128+1)*(254-1+1) =128 * 254 = 32512 I hope it can help you.

  2. Anonymous users2024-02-05

    The binary is the binary of these two IPs, you will find that their first 23 bits are the same (bold above), if they are in the same subnet, then their same part is the network number, the number of bits of the subnet mask is to determine how long the subnet network number is, in this question the network number 23 bits so the mask should also be 23 bits, so for, in fact, this can be regarded as a route aggregation, what kind of subnet can contain these two networks, route aggregation follows the same rule of the longest prefix, Clustering the same longest prefix together, in this case, the subnet mask is a long string of 1s and a long string of 0s, with the number of bits of 1 representing the network bits and the number of bits of 0 representing the host bits. The purpose of borrowing is to divide smaller subnets to meet demand. How to get the network host address with a subnet mask.

    Since the subnet mask is so important, how does it separate the network address from the host address in the IP address?

    2. Make the binary IP address with the subnet mask'with'arithmetic, convert the answer into decimal to get the network address;

    3. Take the binary form of the subnet mask'Against';

    4 will be taken'Against'After the subnet mask is done with the IP address'with'arithmetic, convert the answer into decimal to get the host address.

    The subnet mask is.

    Convert binary to:

    ip address.

    Subnet mask. Do both'with'Calculated:

    Convert it into decimal to get:

    This is the network address of the IP address above, the host address, and so on.

    It can be directly seen that the network address is the first three parts of the IP address, that is, the first three bytes.

    Puzzle: What? You still don't understand? Ask me why I did it'with'Computing and nothing else? Actually, you take a closer look at the above.

    The example should be clear.

    1'in doing'with'When operating, it does not affect the result'0'in doing'with'When operating, you will get 0 and utilize'with'of this special.

    When the administrator sets the subnet mask, that is, the bits corresponding to the network address on the subnet mask are set to'1'That.

    He is set as'0', then as'with', the network number in the IP address will be retained in the results, and the host number will be.

    is set to 0, so that the network number is parsed, and the host number is parsing the same, just take the subnet mask first'Against'in doing'with'。

  3. Anonymous users2024-02-04

    24 28 30-bit subnet mask.

    The difference is as follows: 24 bits means 24 binaries.

    The 1 is like this: , converted to decimal.

    The representation is:

    28 bits: , converted to decimal system.

    30 digits: , converted to decimal system.

    The setting of the subnet mask must follow certain rules. with binary IP address.

    Similarly, the subnet mask consists of 1 and 0, and 1 and 0 are sequential. The length of the subnet mask is also 32 bits, and on the left is the network bit, which is represented by the binary number "1", and the number of 1 is equal to the length of the network bit; On the right is the host bit, which is represented by the binary number "0", and the number of 0s is equal to the length of the host bit.

  4. Anonymous users2024-02-03

    30 pcs. 1. The subnet mask is converted into binary, where the first 1 represents the network bit, and the last 0 represents the host bit, so the first 27 bits are the network number, and the last 5 bits are the host number.

    2. From this, we can see that the host bit is 5, and the IP in the subnet is 2 5 = 32.

    3. However, it is necessary to remove 1 all-0 and 1-all-1 addresses, because all 0s of the host bit represent the network, and all 1s are reserved for broadcasting addresses, and in these two cases, there is no available host address for the subnet.

    4. So the valid IP addresses are 32-2=30.

    Expand the Absolute Zen Material:

    1. Determine which category the IP belongs to. There are five categories: A, B, C, D, and E, and the latter two categories are basically not used. (It's Class A, it's Class B, it's Class C.)

    After judging which category it is, he can know how many bits he originally had as a network number (the first 8 bits of class A, the top 16 bits of class B, and the top 24 bits of class C. )

    2. Convert the subnet mask into binary to see how many 1s there are, and subtract the number of 1s in the base system from the number of bit cracks obtained in the first step, which is the number of subnet bits.

    3. Assuming that the resulting number of bits is n, then theoretically speaking, 2 n subnets can be divided, but in fact, the network numbers of all 0 and all 1 are unavailable, so the actual number of available subnets is (2 n) 2.

  5. Anonymous users2024-02-02

    Select the subnet mask for answer b.

    Be. Due to the IP address.

    Because it is within the range of Class B IP addresses, so this is a Class B IP address, and the default subnet mask of Class B IP addresses is because the first 10 bits of the host number are used for subnet division.

    So the subnet mask becomes, which translates to dotted decimal as.

    The resulting subnet mask is.

  6. Anonymous users2024-02-01

    Method 1: Use the number of subnets to calculate:

    1.First, convert the number of subnets from a decimal number to a binary number;

    2.Then, the number of digits of the obtained binary number is set to n;

    3.Finally, find the subnet mask of the address category corresponding to this IP address. Then set the first n digits of the host address part of the subnet mask (that is, the host number) to 1, so that the subnet mask of the IP address dividing the subnet can be obtained.

    2) The number of bits in this binary is 5, then n=5;

    3) This IP address is a Class B address, and the subnet mask of the Class B address is, and the host address of the Class B address is the last 2 bits (ie. Therefore, the first 5 digits of the host address in the subnet mask can be set to 1, and this set of values is the subnet mask of the Class B IP address divided into 28 subnets.

    Method 2: Use the number of hosts to calculate.

    1 First, convert the number of hosts from a decimal number to a binary number;

    2 Then, if the number of hosts is less than or equal to 254 (note: the reserved two IP addresses should be removed), count the number of digits of the binary number obtained from "1" and set it to n; If the number of hosts is greater than 254, n>8, that is, the host address will exceed 8 bits;

    3 Finally, by setting all the host bits of such IP addresses to 1 and then setting all the n-bits to 0 in the order of "back to front", the resulting value is the value of the subnet mask that is sought.

    2) The number of bits in this binary is 9, then n=9;

    11111111.Namely. This set of values is the subnet mask divided into Class B IP addresses with 500 hosts.

  7. Anonymous users2024-01-31

    Use the calculator that comes with the system to convert binary to convert binary can be carried out and calculated, you can calculate the subnet mask of the Quela network, specifically, you can query the information.

  8. Anonymous users2024-01-30

    1.Subnet mask.

    The main function is to indicate the network segment.

    role, 25:

    2.The number of subnets that can be divided is: 2 to the power of 18-6 4 The network numbers of each subnet are: : Number of hosts: 2 to the power of (32 18) 2 1024*256-2

    Number of hosts: Same as above.

    Number of hosts: Same as above.

    Number of hosts: Same as above.

    Number of subnets that can be divided: 2 to the power of 2 (25-24) 2 The number of hosts in each subnet is: 2 to the power of (32-25) 2 126

Related questions
7 answers2024-03-15

…is a public IP address, not a Class C IP address.

40 machines, using a mask should be enough, it can set up up to 254 machines. >>>More

10 answers2024-03-15

IP address and subnet mask division knowledge.

7 answers2024-03-15

1. Enter the IP address and subnet mask just to set the LAN, if it is dial-up Internet access, you need to add a broadband connection, then click on the broadband connection, enter the Internet account and password to access the Internet. You can surf the Internet even if you don't have an IP address. >>>More

5 answers2024-03-15

Can a mask be?

It seems that it can only be a few values. >>>More

4 answers2024-03-15

IP address is the specific location of the house number, which is composed of up to 12 digits, such as the most common and so on. >>>More