ITM University Gwalior Assignment On Artificial Intelligence

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

ITM University Gwalior

Assignment
On
Artificial Intelligence
(MCA-103)

Submitted To: Submitted By:


Nidhi Dandotiya Nitin
MCAN1CA22066
INDEX
S.no Tittle Page Signature Remark
no
INDEX
S.no Tittle Page Signature Remark
no
INDEX
S.no Tittle Page Signature Remark
no
INDEX
S.no Tittle Page Signature Remark
no
ITM University Gwalior
Assignment
On
Computer Networks
(MCA-104)

Submitted To: Submitted By:


Praveen Gupta Nitin
MCAN1CA22066
INDEX
S.no Tittle Page Signature Remark
no
1. What do you mean by data link layer?
Data link layer is the second layer in OSI reference model and lies above the Physical layer. The physical
layer provides only a raw bit stream between comp- -users. The data link layer provides data reliability. and
provides tools to establish, maintain, and release data link connections among the network nocles.

The data link layer connects between nodes Ian consist of one or more physical lines. There includes
copper-wire, optical fibre cable, Microwave link, and satellite channels.

The informantion exchanged between the nodes could be Of any form, including link -console functions or
user data Or remote function calls.

The data link layen performs the following functions.


• Data Link layer receives the data from the network. layer & device it into manageable units called
frames.
• t men Provides the addressing information by odd- ing header to each frame. Physical Address of
source destination machines are added to each frame.

Access control Framing

Data Link Layer

Flow control
Error Control

Physical Addressing
• It provides flow control mechanism to ensure that sender is not sending the data at the speed that the
receiver cannot process.

• It also provide error control mechanism to detect 4 retransmit damaged, duplicate, or lost frame, thus
adding explicability to physical layer.

• Another function of data link layer is access control. when two or more devices are attached to the
same link, data link layer protocols determines which device has control over the link at any given
time.
2 . Explain DLL OM LLC?

The data link layer (DLL) is the protocol layer that handles the moving of data into and out of a Physical
link in a network. The data link layer is Layer 2 in Open systems Interconnection (OSI) architecture model
for a Set of telecommunication protocols.

The data Link layer has two sublayers:


The Logical link control (LLC) sublayer and
The Media access control (MAC) sublayers.

Sub layer of data link layers. Responsibilities

NETWORK LAYER

LLC OR DLC Flow control

DATA LINK MAC 8 8 8 Framing


LAYER 0 0 0
SUB LAYER 2 2 2 Physical Addressing
. . .
Error control
3 1 1
For 1 5 Media access control
Eth wifi BT
er

PHYSICAL LAYER
3. Explain CSMA /CD and CSMA|CA?
Carrier Sense Multiple Access (CSMA) is a network protocol for carrier transmission that operates in the
Medium Access Control (MAC) layer. It senses or listens whether the shared channel for transmission is
busy or not, and transmits if the channel is not busy.
Using CMSA protocols, more than one users or nodes send and receive data through a shared medium
that may be a single cable or optical fiber connecting multiple nodes, or a portion of the wireless spectrum.

CSMA/CD:

CSMA/CD stands for Carrier Sense Multiple Access / Collision Detection is a network protocol for carrier
transmission. It is operated in the medium access control layer.
It senses of the shared channel is busy for broadcasting and interrupts the broadcast until the channel is
free. In CSMA/CD collision is detected by broadcast sensing from the other stations.
Upon collision detection in CSMA/CD, the transmission is stopped and a jam signal is sent by the stations
and then the station waits for a random time context before retransmission.
CSMA/CA:
CSMA/CA stands for Carrier Sense Multiple Access / Collision Avoidance is a network protocol for carrier
transmission.
Like CSMA/CD it is also operated in the medium access control layer.

Unlike CSMA/CD(that is effective after a collision) CSMA / CA is effective before a collision.


4 . Explain MAC in details.
o MAC address is the physical address, which uniquely identifies each device on a given network. To
make communication between two networked devices, we need two addresses: IP address and MAC
address. It is assigned to the NIC (Network Interface card) of each device that can be connected to
the internet.
o It stands for Media Access Control, and also known as Physical address, hardware address, or BIA
(Burned In Address).
o It is globally unique; it means two devices cannot have the same MAC address. It is represented in a
hexadecimal format on each device, such as 00:0a:95:9d:67:16.
o It works on the data link layer of the OSI model.
o It is provided by the device's vendor at the time of manufacturing and embedded in its NIC, which is
ideally cannot be changed.
o The ARP protocol is used to associate a logical address with a physical or MAC address.

MAC PROTOCOLS

LAN/MAN LAN Cellular


process

Random access protocol Controlled access protocol Channeled action protocol

Aloha PURE Reservation FLDMA

CSMA SLOTTED Polling TDMA

CSMA/CD Token purring CDMA

CSMA/CA

Functions of MAC Layers :-


 It provides an abstraction of the physical layer to the LLC and upper layers of the OSI network.

 It is responsible for encapsulating frames so that they are suitable for transmission via the
physical medium.

 It resolves the addressing of source station as well as the destination station, or groups of
destination stations.

 It performs multiple access resolutions when more than one data frame is to be transmitted.
It determines the channel access methods for transmission.
5. Explain the Hamming code with Example .
Hamming code is an error correction system that can detect and correct errors when data is
stored or transmitted. It requires adding additional parity bits with the data. It is commonly
used in error correction code (ECC) RAM.

Whenever data is transmitted or stored, it's possible that the data may become corrupted.
This can take the form of bit flips, where a binary 1 becomes a 0 or vice versa.

Error correcting codes seek to find when an error is introduced into some data. This is done
by adding parity bits, or redundant information, to the data.

If enough parity data is added, it enables forward error correction (FEC), where errors can be
automatically fixed when read back.

FEC can increase the data transmission rate for noisy channels by reducing the amount of
necessary retransmits.

Applications of Hamming code :-

 Hamming codes are used for dectecting and correcting error in the transmitted data.

 They are used in computer memory, satellites, modems etc.

 Hamming codes are considered to be ideal for computer memory and single-bit-error
correction. But they cannot be used for multi-bit-error correction.

How to encode massage in hamming code ?


Hamming Code is calculated in the following way. This is simply the use of extra redundant/parity
bits for the detection and correction of an error that occurred while transmitting the data.

1. Firstly, write all the bit positions which are starting from 1 in the binary form ex (1, 10, 11,

100, etc.).

2. All the bit positions that are a power of 2 are marked as parity bits (1, 2, 4, 8, etc).

3. All the other bit positions are treated as data bits and we need to insert the given data in

these bits which are required to find the value of parity bits.

4. Value of each parity bit, is determined in the following way(The position of the parity mainly

determines the sequence of bits that it alternatively checks and skips.).


o Parity bit 1 at position R1: Check 1 bit, then skip 1 bit, check 1 bit and then skip 1 bit

and so on, like: Example: 1, 3, 5, 7, 11, etc.

o Parity bit 2 at position R2: Check 2 bits, then skip 2 bits, check 2 bits, then skip 2

bits, like: Example: 2, 3, 6, 7, 10, 11, 14, 15, etc.

o Parity bit 3 at position R4: Check 4 bits, then skip 4 bits, check 4 bits, then skip 4

bits, like: Example: 4, 5, 6, 7, 12, 13, 14, 15, etc.

o Parity bit 4 at position R8: Check 8 bits, then skip 8 bits, check 8 bits, then

skip 8 bits, like: Example: 8, 9, 10, 11, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31).
6 . Define Aloha.
systems interconnection (OSI) model. Using this protocol, several data streams originating from
multiple nodes are transferred through a multi-point transmission channel.

In ALOHA, each node or station transmits a frame without trying to detect whether the transmission
channel is idle or busy. If the channel is idle, then the frames will be successfully transmitted.

If two frames attempt to occupy the channel simultaneously, collision of frames will occur and the
frames will be discarded. These stations may choose to retransmit the corrupted frames repeatedly
until successful transmission occurs.

Versions of ALOHA Protocols


 Pure ALOHA
 Slotted ALOHA

Pure ALOHA
In pure ALOHA, the time of transmission is continuous. Whenever a station has an available frame,
it sends the frame. If there is collision and the frame is destroyed, the sender waits for a random
amount of time before retransmitting it.

PURE ALOHA, the vulnerable period is two slot times.


Slotted ALOHA
Slotted ALOHA reduces the number of collisions and doubles the capacity of pure ALOHA. The
shared channel is divided into a number of discrete time intervals called slots. A station can transmit
only at the beginning of each slot. However, there can still be collisions if more than one station
tries to transmit at the beginning of the same time slot.

There is a high possibility of frame hitting in pure aloha, so slotted aloha is designed to overcome it.
Unlike pure aloha, slotted aloha does not allow the transmission of data whenever the station wants
to send it.

You might also like