0% found this document useful (0 votes)
9 views

DCN PR

The document outlines various experiments related to digital communication techniques, including Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK), Phase Shift Keying (PSK), and network cable creation. It also covers Time Division Multiplexing (TDM), error detection methods such as Checksum, Parity Check, and Cyclic Redundancy Check (CRC), as well as creating a hybrid network using Bluetooth. Each section includes aims, procedures, and information about the techniques and methods used.

Uploaded by

Pranet Narwani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

DCN PR

The document outlines various experiments related to digital communication techniques, including Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK), Phase Shift Keying (PSK), and network cable creation. It also covers Time Division Multiplexing (TDM), error detection methods such as Checksum, Parity Check, and Cyclic Redundancy Check (CRC), as well as creating a hybrid network using Bluetooth. Each section includes aims, procedures, and information about the techniques and methods used.

Uploaded by

Pranet Narwani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

DISCLAIMER : REFER AT YOUR OWN RISK!

1. Aim: - Perform the Experiment Amplitude Shift Keying (ASK) Using Any
Simulator.

clc;
clear;
bit_seq = [1 0 1 1 0 1 0];
bit_rate = 1; % bits per second
f = 5; % frequency of carrier
Fs = 100; % sampling frequency
t = 0:1/Fs:1 - 1/Fs; % time vector for 1 bit
ask_signal = [];
for i = 1:length(bit_seq)
if bit_seq(i) == 1
ask_signal = [ask_signal sin(2*pi*f*t)];
else
ask_signal = [ask_signal zeros(1,length(t))];
end
end
time = 0:1/Fs:length(bit_seq) - 1/Fs;
figure;
subplot(2,1,1);
stairs(0:length(bit_seq)-1, bit_seq, 'LineWidth', 2);
title('Input Bit Sequence');
xlabel('Time');
ylabel('Bit');
ylim([-0.5 1.5]);
subplot(2,1,2);
plot(time, ask_signal, 'LineWidth', 1.5);
title('ASK Modulated Signal');
xlabel('Time');
ylabel('Amplitude');
PROCEDURE

● Open the simulator (e.g., MATLAB).


● Choose a binary data sequence (e.g., 1 0 1 1 0).
● Set carrier frequency and sampling rate.
● Generate a sine wave as the carrier signal.
● For each bit:
○ If bit = 1 → transmit sine wave.

○ If bit = 0 → transmit flat line (no wave).


● Combine all bits to form the ASK signal.
● Plot and observe the modulated waveform.

INFO

● ASK stands for Amplitude Shift Keying.


● It is a digital modulation technique.
● The amplitude of the carrier signal is varied based on the input binary data.
● Binary 1 is represented by a high amplitude wave.
● Binary 0 is represented by zero or low amplitude (often no wave).
● It's like turning a signal on and off to send data.
● Example: Data 1 0 1 1 → [Wave] [No Wave] [Wave] [Wave].
● Simple to implement and uses low bandwidth.
● Disadvantage: Easily affected by noise, because noise can change signal
amplitude.

2.Aim: -Perform the Experiment Frequency Shift Keying (FSK) Using Any
Simulator.

clc;
clear;
% Parameters
bit_seq = [1 0 1 1 0 1 0];
bit_rate = 1;
f1 = 5; % Frequency for bit 1
f0 = 2; % Frequency for bit 0
Fs = 100;
t = 0:1/Fs:1 - 1/Fs;

% Modulation
fsk_signal = [];
for i = 1:length(bit_seq)
if bit_seq(i) == 1
fsk_signal = [fsk_signal sin(2*pi*f1*t)];
else
fsk_signal = [fsk_signal sin(2*pi*f0*t)];
end
end

% Time vector
time = 0:1/Fs:length(bit_seq) - 1/Fs;

% Plot
figure;
subplot(2,1,1);
stairs(0:length(bit_seq)-1, bit_seq, 'LineWidth', 2);
title('Input Bit Sequence');
xlabel('Time');
ylabel('Bit');
ylim([-0.5 1.5]);

subplot(2,1,2);
plot(time, fsk_signal, 'LineWidth', 1.5);
title('FSK Modulated Signal');
xlabel('Time');
ylabel('Amplitude');
PROCEDURE

Open the simulator (e.g., MATLAB).


Choose a binary data sequence (e.g., 1 0 1 1 0).
Set carrier frequencies for 1 and 0 (e.g., 5 Hz for 1, 2 Hz for 0).
Set the sampling rate and bit duration.
For each bit:

● If bit = 1 → transmit at higher frequency.

● If bit = 0 → transmit at lower frequency.

Combine the modulated signals for the entire data sequence.


Plot the FSK modulated signal.

INFO

FSK stands for Frequency Shift Keying.


It is a digital modulation technique.
The frequency of the carrier signal is varied based on the input binary data.

● Binary 1 is represented by a higher frequency.


● Binary 0 is represented by a lower frequency.

It's like changing the frequency of a signal to represent different data.


Example: Data 1 0 1 1 → [Higher Frequency] [Lower Frequency] [Higher

Frequency] [Higher Frequency].


Advantages: Can be more resistant to noise compared to ASK.
Disadvantage: Requires more bandwidth than ASK.

3. Aim: - Perform the Experiment Phase Shift Keying (PSK) Using Any Simulator.

clc;
clear;

% Parameters
bit_seq = [1 0 1 1 0 1 0];
bit_rate = 1;
f = 5;
Fs = 100;
t = 0:1/Fs:1 - 1/Fs;

% Modulation
psk_signal = [];
for i = 1:length(bit_seq)
if bit_seq(i) == 1
psk_signal = [psk_signal sin(2*pi*f*t)];
else
psk_signal = [psk_signal sin(2*pi*f*t + pi)]; % 180-degree phase shift
end
end

% Time vector
time = 0:1/Fs:length(bit_seq) - 1/Fs;

% Plot
figure;
subplot(2,1,1);
stairs(0:length(bit_seq)-1, bit_seq, 'LineWidth', 2);
title('Input Bit Sequence');
xlabel('Time');
ylabel('Bit');
ylim([-0.5 1.5]);

subplot(2,1,2);
plot(time, psk_signal, 'LineWidth', 1.5);
title('PSK Modulated Signal');
xlabel('Time');
ylabel('Amplitude');

PSK stands for Phase Shift Keying.


It is a digital modulation technique.
The phase of the carrier signal is Shifted based on the input binary data.

● Binary 1 is represented by the original phase of the carrier signal.


● Binary 0 is represented by a shifted phase (e.g., 180 degrees).
It's like changing the phase of the signal to encode the data.Example: Data 1 0 1
1 → [Original Phase] [Shifted Phase] [Original Phase] [Original Phase].
Advantages: More efficient in terms of bandwidth.
Disadvantage: Requires accurate synchronization between sender and receiver.

4.Aim: -Create and Test Standard Straight Network Cable (Universal Colour
Code) Using Crimping Tool.
 PROCEDURE:
Cut the cable from its end
Remove the twisted wire pairs by removing a part of its covering
Cut the grey String if any
Untwist the wire pairs
Arrange them in an order :
WHITE,ORANGE,WHITE,BLUE,WHITE,GREEN,WHITE,BROWN
Cut a part of these wires leaving only a little part outside the coat
Insert it in the connector straight in the order as stated
Clip the connector using the tool

5.Aim: - -Create and Test Standard Cross Network Cable (Universal Colour Code)
Using Crimping Tool.
Repeat the same procedure, in this wire would be dual
coloured along with main color, and the arrangement of cables should be as
shown.

6.Aim: - Generate a Time division Multiplexing (TDM) Signal Using Relevant


Simulation Software.

clc;
clear;

% Parameters
Fs = 1000; % Sampling frequency
t = 0:1/Fs:1-1/Fs; % 1 second duration

% Signal 1: Sine wave


f1 = 5;
signal1 = sin(2*pi*f1*t);
% Signal 2: Square wave
f2 = 3;
signal2 = square(2*pi*f2*t);

% TDM: Interleaving samples


tdm_signal = zeros(1, 2 * length(t));
tdm_signal(1:2:end) = signal1;
tdm_signal(2:2:end) = signal2;

% Time vector for TDM signal


tdm_time = 0:1/Fs/2:1 - 1/Fs/2;

% Plot original signals and TDM signal


figure;

subplot(3,1,1);
plot(t, signal1, 'b');
title('Signal 1: Sine Wave');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(3,1,2);
plot(t, signal2, 'r');
title('Signal 2: Square Wave');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(3,1,3);
stem(tdm_time(1:100), tdm_signal(1:100), 'k');
title('TDM Signal (Interleaved)');
xlabel('Time (s)');
ylabel('Amplitude');

PROCEDURE

Open the simulator (e.g., MATLAB).


Choose a binary data sequence (e.g., 1 0 1 1 0).
Set the carrier frequency (e.g., 5 Hz).
Set the sampling rate and bit duration.
For each bit:

● If bit = 1 → transmit the carrier wave without phase shift.

● If bit = 0 → transmit the carrier wave with a phase shift (e.g., 180°).

Combine all bits to form the PSK signal.


Plot the PSK modulated signal.
INFO

7.Aim: - Create a Hybrid Network Using Bluetooth.


PROCEDURE:
Add 4 switches to the logical connection
Add 3 pcs to switch 1
1 pc to switch 2
2 pcs to switch 3
3 pcs to switch 4
Click on the pc>Desktop>IP Config> Add IP 192.168.13.1-8 one by one in series
till last pc
Gateway: 192.

8.Aim: -Locate the Error Bit in the Given Data String by Applying Checksum Error
Detection Method.

clc;
clear;

% Example: Divide data into 8-bit blocks


data = ['11010101'; '01100110'; '10011001']; % 3 data blocks (can modify)
block_size = 8;

% Sender side: Binary addition


sum = zeros(1, block_size);
for i = 1:size(data,1)
sum = dec2bin(mod(bin2dec(char(sum + '0')) + bin2dec(data(i,:)), 2^block_size),
block_size) - '0';
end

% 1's complement of sum → checksum


checksum = char(~(sum - '0') + '0');
disp(['Sender Checksum: ', checksum]);

% Simulate received data (you can flip a bit to simulate error)


received = ['11010101'; '01100110'; '10011001'; checksum]; % Add checksum
% Receiver side: Add all blocks
recv_sum = zeros(1, block_size);
for i = 1:size(received,1)
recv_sum = dec2bin(mod(bin2dec(char(recv_sum + '0')) + bin2dec(received(i,:)),
2^block_size), block_size) - '0';
end

% Check if sum is all 1's


if all(recv_sum == '1' - '0')
disp('No Error Detected.');
else
disp('Error Detected in the Received Data!');
end

PROCEDURE

1. Divide the Data: Split the given data into equal-sized blocks (e.g., 8 bits each).
2. Add the Blocks: Perform binary addition of all data blocks.
3. Calculate Checksum: Take the 1's complement of the sum (flip all 0s to 1s and
1s to 0s). This is the checksum.
4. Transmit Data: Send both the data and the checksum together.
5. Receiver Side:
○ Add the received data blocks and the received checksum.
○ If the result is all 1s, no error is detected.
○ If not, an error is detected.
6. Locate the Error: If an error occurs, compare the transmitted and received data to
identify the error bit.

INFO

● Checksum is a method to detect errors in data transmission.


● The sender calculates a checksum by adding data blocks and finding the
1’s complement of the sum.
● The sender sends both the data and checksum.
● The receiver adds the received data and checksum. If the result is all 1s, no
error is detected.
● If the result is not all 1s, an error is detected.
Pros: Simple, easy to implement.

Cons: Can’t fix errors, may miss certain types of errors.

9. Aim: - Perform the Experiment Implement Wireless Network.

Same as above procedure

10.Aim: - Write a ‘C’ Program for Parity Check Error Detection.

#include <stdio.h>
int main() {
char data[100];
int i, count = 0, length, parity_bit;

// Get binary data from user


printf("Enter the binary data (e.g., 101011): ");
scanf("%s", data);

// Calculate the length of the data


for (length = 0; data[length] != '\0'; length++);

// Ask for the expected parity (even or odd)


printf("Enter 1 for Even Parity or 0 for Odd Parity: ");
scanf("%d", &parity_bit);

// Count the number of 1s in the data


for (i = 0; i < length; i++) {
if (data[i] == '1') {
count++;
}
}
// Check the parity based on the user's choice
if (parity_bit == 1) { // Even Parity
if (count % 2 == 0) {
printf("No error detected (Even Parity).\n");
} else {
printf("Error detected (Even Parity).\n");
}
} else { // Odd Parity
if (count % 2 != 0) {
printf("No error detected (Odd Parity).\n");
} else {
printf("Error detected (Odd Parity).\n");
}
}
return 0;
}
PROCEDURE

Input the Binary Data: Enter the binary data string (e.g., 101011).
Select Parity Type: Choose even parity or odd parity.
Count 1's in Data: Count how many 1s are in the data.
Check Parity:

● For even parity, the number of 1s should be even.


● For odd parity, the number of 1s should be odd.

Detect Error:
● If the parity is correct, no error is found.
● If the parity doesn’t match, error is detected.

INFO

● Parity check is used to detect errors in data transmission by adding a


parity bit.
● Even Parity: The number of 1s (including the parity bit) is even.
● Odd Parity: The number of 1s (including the parity bit) is odd.
● The sender adds the parity bit, and the receiver checks if the parity is
correct.
● If the parity matches, no error is detected. If it doesn’t, an error is detected.

11.Aim: - Write a ‘C’ Program for Cyclic Redundancy Check (CRC) Error
Correction Detection.

#include <stdio.h>
#include <string.h>

#define POLYNOMIAL 0x9B // Example CRC polynomial: x^8 + x^7 + x^6 + x^4 + x^2 + 1
// Function to perform CRC division
unsigned char crc_division(unsigned char data[], unsigned char length) {
unsigned char remainder = 0;
for (int i = 0; i < length; i++) {
remainder ^= data[i];
for (int j = 7; j >= 0; j--) {
if (remainder & 0x80) {
remainder = (remainder << 1) ^ POLYNOMIAL;
} else {
remainder <<= 1;
}
}
}
return remainder;
}

int main() {
unsigned char data[] = {0x14, 0xA2}; // Example data
unsigned char length = sizeof(data) / sizeof(data[0]);

// Perform CRC division to check if the remainder is zero


unsigned char remainder = crc_division(data, length);
// Output result
if (remainder == 0) {
printf("No error detected (CRC is correct).\n");
} else {
printf("Error detected (CRC check failed).\n");
}

return 0;
}

PROCEDURE

1. Input the Data: Enter the binary data (e.g., 1101011011).


2. Select Polynomial: Choose the CRC polynomial (e.g., x^8 + x^7 + x^6 + x^4
+ x^2 + 1).
3. Perform CRC Division: Divide the data by the polynomial using binary long
division.
4. Check Remainder:
○ If the remainder is zero, no error is detected.
○ If the remainder is non-zero, an error is detected.
5. Output Result: Display if no error or error was found based on the CRC
calculation.
INFO

● CRC is an error detection technique used to check the integrity of data.


● It works by dividing the data by a predefined polynomial (often called the
CRC polynomial).
● The remainder of this division is called the CRC code or checksum.
● The data is transmitted along with the CRC. The receiver performs the
same division and compares the remainder.
● If the remainder matches the transmitted CRC, the data is correct. If not,
an error is detected.

Advantages:

● Very reliable for detecting errors.


● Can detect burst errors (multiple bits changed).
● Widely used in networking protocols and storage devices.

Disadvantages:

● Does not correct errors, only detects them.


● More complex than simple parity checks.

12.Aim: - Write a ‘C’ Program for Error Correction using Hamming Code.

#include <stdio.h>
#include <math.h>

// Function to calculate the parity bit for a given data bit


int calculate_parity(int *data, int n) {
int parity = 0;
for (int i = 0; i < n; i++) {
parity ^= data[i];
}
return parity;
}
// Function to find the error position and correct it
void hamming_code_error_correction(int *codeword, int n) {
int parity_bits = log2(n + 1);
int error_position = 0;

// Check for errors by calculating parity bits


for (int i = 0; i < parity_bits; i++) {
int parity = 0;
for (int j = 0; j < n; j++) {
if (j & (1 << i)) {
parity ^= codeword[j];
}
}
if (parity != 0) {
error_position += (1 << i);
}
}

// Correct the error if any


if (error_position != 0) {
printf("Error detected at position: %d\n", error_position);
codeword[error_position - 1] = !codeword[error_position - 1];
printf("Corrected codeword: ");
for (int i = 0; i < n; i++) {
printf("%d", codeword[i]);
}
printf("\n");
} else {
printf("No error detected.\n");
}
}

int main() {
// Example codeword (7 bits) with 4 data bits and 3 parity bits
int codeword[7] = {1, 0, 1, 1, 0, 0, 1};
int n = sizeof(codeword) / sizeof(codeword[0]);

printf("Original codeword: ");


for (int i = 0; i < n; i++) {
printf("%d", codeword[i]);
}
printf("\n");

// Perform error correction using Hamming Code


hamming_code_error_correction(codeword, n);

return 0;
}

PROCEDURE

Input the Codeword: Enter the received binary data (e.g., 1011010).
Identify Parity Bits: Determine the number of parity bits needed based on the
length of the data.
Check Parity: Calculate parity bits using the positions of the bits and check for
any errors.

Locate Error:

● If the calculated parity doesn’t match the expected parity, an error is


detected.
● The error position is found using the parity bits.

Correct the Error: Flip the bit at the error position to correct the data.
Output: Display the corrected codeword or notify that no error was found.
INFO

● Hamming Code is an error correction technique that can both detect and
correct single-bit errors.
● It uses parity bits that are inserted into the data at specific positions.
● These parity bits ensure that the number of 1s in the data follows a
specific pattern (even or odd).
● The receiver checks these parity bits to identify if an error occurred during
transmission and corrects it if possible.
● Hamming Code is used in situations where data integrity is critical, such as
in memory storage and communication protocols.

Advantages:

● Corrects single-bit errors and detects double-bit errors.


● Efficient for error correction.

Disadvantages:

● Limited to single-bit errors (cannot correct multi-bit errors).


● Requires extra bits (parity bits) for error correction, which increases the
size of the data.

13. Aim: -Configure Static IP Address in Operating System Along with


Appropriate Subnet Mask for Given Problem.

14.Aim: -a.192.168.1.1 Identify the Class of this IP Address.


b. Find net ID.
c. Find Board Cost.
d. Number of Host Possible.
E. Number of Network Possible.

Given IP Address: 192.168.1.1

a. Identify the Class of this IP Address


● Class: C
● Reason: IPs from 192.0.0.0 to 223.255.255.255 belong to Class C.

b. Find Net ID

● Net ID: 192.168.1.0


● The Net ID is found by setting all host bits to 0 in the last part (since Class C uses
/24 or subnet mask 255.255.255.0).

c. Find Broadcast Address

● Broadcast Address: 192.168.1.255


● The broadcast address is found by setting all host bits to 1 (last octet in Class C).

d. Number of Hosts Possible

● Formula: 2^(32 - subnet bits) - 2


● For Class C: 2^(32 - 24) - 2 = 2^8 - 2 = 254
● Number of Hosts: 254

e. Number of Networks Possible

● Class C uses first 3 octets for network (i.e., 24 bits), and there are 21 bits
reserved for networks:
○ Formula: 2^21 = 2,097,152
● Number of Networks: 2,097,152

⚠ Note: In practice, the number of usable networks may vary based on


custom subnetting or private/public addressing.
15.Aim: - Execute TCP/IP Network Commands: ipconfig, Ping, tracert.

🔹 1. ipconfig

● Purpose: Displays IP address, subnet mask, and gateway.

Command:

ipconfig

● Use: To check your computer’s network settings.

🔹 2. ping

● Purpose: Tests connectivity between your computer and another device (like a
website or server).

Command:

ping google.com

● Use: To see if a device is reachable and measure response time.

🔹 3. tracert (Windows) / traceroute (Linux/macOS)

● Purpose: Shows the path data takes to reach a destination, hop by hop.

Command:

tracert google.com

● Use: To find the route and detect where the delay or failure occurs.
16. Aim: - Execute TCP/IP Network Commands: netstat, Pathping, Route.

🔹 1. netstat

● Purpose: Displays current network connections, open ports, and protocol stats.

Command:

netstat

● Use: To monitor active network connections.

🔹 2. pathping

● Purpose: Combines the features of ping and tracert; shows packet loss at each
hop.

Command:

pathping google.com

● Use: For more detailed network diagnostics.

🔹 3. route

● Purpose: Displays or modifies the routing table.

Command:

route print

● Use: To view or manage IP routing paths.

17.Aim: - Analysed the Packet based on Ip, TELNET, FTP Using Wireshark.
18.Aim: - Install Operating System Linux/Windows/Any Other Server.
1. Create a Bootable USB Drive
 On another working computer:
o Go to Microsoft’s official Windows download page.
o Download the Media Creation Tool.
o Run it and choose "Create installation media".
o Select language, edition, and architecture (64-bit/32-bit).
o Choose USB flash drive as the media type.
2. Insert the USB into the Target PC
 Plug the USB into the PC where you want to install Windows.
3. Enter the BIOS/UEFI
 Restart the PC and press the key for BIOS/boot menu (often Del, Esc, F2,
F10, or F12 depending on your manufacturer).
 In BIOS:
o Set USB drive as the first boot device.
o Save and exit.
4. Start Windows Setup
 The PC will boot from the USB drive.
 You'll see the Windows logo and then the setup screen.
5. Set Language and Region
 Select your language, time & currency format, and keyboard layout.
 Click Next, then click Install Now.
6. Enter Product Key
 Enter your Windows license key, or choose "I don't have a product key" to
skip (you can activate later).
7. Choose Edition (if prompted)
 Select the correct edition (e.g., Windows 10 Home or Pro) based on your
key.
8. Accept License Terms
 Tick the box to accept and click Next.
9. Choose Installation Type
 Select Custom: Install Windows only (advanced) for a clean install.
10. Select Partition
 Choose the partition where Windows will be installed:
o Format or delete existing partitions if needed.
o Or create a new partition and install there.
⚠ Warning: Formatting or deleting partitions will erase all data!
11. Begin Installation
 Windows will now install.
 This will take 10–30 minutes depending on your hardware.
12. Automatic Reboot
 Your PC will restart several times during this.

19.Aim: - Create IPv6 Environment in a Small Network using Simulator.


20. Aim: - Create HTTP Server using Any Simulator.
21.Aim: - Create Computers Networks Using Star Topology with Wired Media.
22.Aim: - Create Tree Topology Using CISCO Packet Tracer Software.
23.Aim: - Identify the Lab Network and Justify Your Answer &Draw the Layout of
Your Lab

You might also like