Answer :
Let's work through each IP address and subnet mask pair to identify the Net ID and the Device ID.
### (a) For the IP address 192.168.5.97 with the subnet mask 255.255.255.0
1. Convert the IP address and subnet mask to binary format (each octet should be 8 bits):
| IP Address | Subnet Mask |
|------------------|-------------------|
| 192.168.5.97 | 255.255.255.0 |
| 11000000.10101000.00000101.01100001 | 11111111.11111111.11111111.00000000 |
2. Perform a bitwise AND operation between the IP address and the subnet mask to get the Net ID.
- Net ID calculation:
- 11000000 AND 11111111 = 11000000 (192)
- 10101000 AND 11111111 = 10101000 (168)
- 00000101 AND 11111111 = 00000101 (5)
- 01100001 AND 00000000 = 00000000 (0)
- Therefore, the Net ID for `192.168.5.97` with subnet mask `255.255.255.0` is `192.168.5.0`.
3. Perform a bitwise AND operation between the IP address and the inverted subnet mask (bitwise NOT of subnet mask) to get the Device ID:
- Inverted subnet mask:
- 00000000.00000000.00000000.11111111
- Device ID calculation:
- 11000000 AND 00000000 = 00000000 (0)
- 10101000 AND 00000000 = 00000000 (0)
- 00000101 AND 00000000 = 00000000 (0)
- 01100001 AND 11111111 = 01100001 (97)
- Therefore, the Device ID for `192.168.5.97` with subnet mask `255.255.255.0` is `0.0.0.97`.
### (b) For the IP address 10.10.13.10 with the subnet mask 255.255.0.0
1. Convert the IP address and subnet mask to binary format:
| IP Address | Subnet Mask |
|------------------|-------------------|
| 10.10.13.10 | 255.255.0.0 |
| 00001010.00001010.00001101.00001010 | 11111111.11111111.00000000.00000000 |
2. Perform a bitwise AND operation between the IP address and the subnet mask to get the Net ID:
- Net ID calculation:
- 00001010 AND 11111111 = 00001010 (10)
- 00001010 AND 11111111 = 00001010 (10)
- 00001101 AND 00000000 = 00000000 (0)
- 00001010 AND 00000000 = 00000000 (0)
- Therefore, the Net ID for `10.10.13.10` with subnet mask `255.255.0.0` is `10.10.0.0`.
3. Perform a bitwise AND operation between the IP address and the inverted subnet mask to get the Device ID:
- Inverted subnet mask:
- 00000000.00000000.11111111.11111111
- Device ID calculation:
- 00001010 AND 00000000 = 00000000 (0)
- 00001010 AND 00000000 = 00000000 (0)
- 00001101 AND 11111111 = 00001101 (13)
- 00001010 AND 11111111 = 00001010 (10)
- Therefore, the Device ID for `10.10.13.10` with subnet mask `255.255.0.0` is `0.0.13.10`.
### Summary of Results
1. For IP address `192.168.5.97` and subnet mask `255.255.255.0`:
- Net ID: `192.168.5.0`
- Device ID: `0.0.0.97`
2. For IP address `10.10.13.10` and subnet mask `255.255.0.0`:
- Net ID: `10.10.0.0`
- Device ID: `0.0.13.10`
### (a) For the IP address 192.168.5.97 with the subnet mask 255.255.255.0
1. Convert the IP address and subnet mask to binary format (each octet should be 8 bits):
| IP Address | Subnet Mask |
|------------------|-------------------|
| 192.168.5.97 | 255.255.255.0 |
| 11000000.10101000.00000101.01100001 | 11111111.11111111.11111111.00000000 |
2. Perform a bitwise AND operation between the IP address and the subnet mask to get the Net ID.
- Net ID calculation:
- 11000000 AND 11111111 = 11000000 (192)
- 10101000 AND 11111111 = 10101000 (168)
- 00000101 AND 11111111 = 00000101 (5)
- 01100001 AND 00000000 = 00000000 (0)
- Therefore, the Net ID for `192.168.5.97` with subnet mask `255.255.255.0` is `192.168.5.0`.
3. Perform a bitwise AND operation between the IP address and the inverted subnet mask (bitwise NOT of subnet mask) to get the Device ID:
- Inverted subnet mask:
- 00000000.00000000.00000000.11111111
- Device ID calculation:
- 11000000 AND 00000000 = 00000000 (0)
- 10101000 AND 00000000 = 00000000 (0)
- 00000101 AND 00000000 = 00000000 (0)
- 01100001 AND 11111111 = 01100001 (97)
- Therefore, the Device ID for `192.168.5.97` with subnet mask `255.255.255.0` is `0.0.0.97`.
### (b) For the IP address 10.10.13.10 with the subnet mask 255.255.0.0
1. Convert the IP address and subnet mask to binary format:
| IP Address | Subnet Mask |
|------------------|-------------------|
| 10.10.13.10 | 255.255.0.0 |
| 00001010.00001010.00001101.00001010 | 11111111.11111111.00000000.00000000 |
2. Perform a bitwise AND operation between the IP address and the subnet mask to get the Net ID:
- Net ID calculation:
- 00001010 AND 11111111 = 00001010 (10)
- 00001010 AND 11111111 = 00001010 (10)
- 00001101 AND 00000000 = 00000000 (0)
- 00001010 AND 00000000 = 00000000 (0)
- Therefore, the Net ID for `10.10.13.10` with subnet mask `255.255.0.0` is `10.10.0.0`.
3. Perform a bitwise AND operation between the IP address and the inverted subnet mask to get the Device ID:
- Inverted subnet mask:
- 00000000.00000000.11111111.11111111
- Device ID calculation:
- 00001010 AND 00000000 = 00000000 (0)
- 00001010 AND 00000000 = 00000000 (0)
- 00001101 AND 11111111 = 00001101 (13)
- 00001010 AND 11111111 = 00001010 (10)
- Therefore, the Device ID for `10.10.13.10` with subnet mask `255.255.0.0` is `0.0.13.10`.
### Summary of Results
1. For IP address `192.168.5.97` and subnet mask `255.255.255.0`:
- Net ID: `192.168.5.0`
- Device ID: `0.0.0.97`
2. For IP address `10.10.13.10` and subnet mask `255.255.0.0`:
- Net ID: `10.10.0.0`
- Device ID: `0.0.13.10`