Sample Input:
10.15.15.1/24
Sample Output:
IP in binary: 00001010.00001111.00001111.00000001
Network Address: 16777214
Hosts Address: 254
2. Write a C program that takes a classful IP address as input and displays it in binary, identifies its class from the first binary octet and the number of network and host address depending on the class
Sample Input:10.15.15.1
Sample Output:
IP in binary: 00001010.00001111.00001111.00000001
Class: A
Network Address: 254
Hosts Address: 16777214
Sample Input:
Data: 10110
Divider: 1101
Sample Output:
Modified data: 10110000
Data Send: 10110101
CRC bit: 101
Example 1:
Enter 1 for Even parity and 2 for Odd parity.
Input: 1
Even parity:
Input:
Data: 110110
Output:
modified data: 1101100
Parity bit: 0
Example 2:
Enter 1 for Even parity and 2 for Odd parity.
Input: 2
Odd parity:
Input:
Data: 1101101
Output:
Modified data: 11011010
Parity bit: 0
5. Write a program that construct an Even parity Hamming code
Example-1:
Input: 10111010100101
Output:
Mod data: 1111011110101000101
Number of parity bits: 5
No comments:
Post a Comment