4. An IP address is composed of a binary code of four bytes (8 bits per byte). Please convert the IP address represented
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
4. An IP address is composed of a binary code of four bytes (8 bits per byte). Please convert the IP address represented
4. An IP address is composed of a binary code of four bytes (8 bits per byte). Please convert the IP address represented by the 32-bit binary code to the IP address represented by the decimal format. Please write a program in python to output the lp. If the input number is less than 32 bits or more than 32 bits or there are numbers other than 0 and 1 in the input number, it will output "data error!" Input format Enter a 32-bit binary string in one line Output format output the IP address in decimal format in one line, which consists of 4 decimal numbers (corresponding to 4 8-bit binary numbers respectively), separated by ".". Submit code in python.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!