DCN PR
DCN PR
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
INFO
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
INFO
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');
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.
clc;
clear;
% Parameters
Fs = 1000; % Sampling frequency
t = 0:1/Fs:1-1/Fs; % 1 second duration
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
● If bit = 0 → transmit the carrier wave with a phase shift (e.g., 180°).
8.Aim: -Locate the Error Bit in the Given Data String by Applying Checksum Error
Detection Method.
clc;
clear;
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
#include <stdio.h>
int main() {
char data[100];
int i, count = 0, length, parity_bit;
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:
Detect Error:
● If the parity is correct, no error is found.
● If the parity doesn’t match, error is detected.
INFO
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]);
return 0;
}
PROCEDURE
Advantages:
Disadvantages:
12.Aim: - Write a ‘C’ Program for Error Correction using Hamming Code.
#include <stdio.h>
#include <math.h>
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]);
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:
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:
Disadvantages:
b. Find Net ID
● 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
🔹 1. ipconfig
Command:
ipconfig
🔹 2. ping
● Purpose: Tests connectivity between your computer and another device (like a
website or server).
Command:
ping google.com
● 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
🔹 2. pathping
● Purpose: Combines the features of ping and tracert; shows packet loss at each
hop.
Command:
pathping google.com
🔹 3. route
Command:
route print
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.