0% found this document useful (0 votes)
13 views7 pages

CSMA, FDMA, and TDMA

Basic Implementation of CSMA, FDMA, and TDMA

Uploaded by

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

CSMA, FDMA, and TDMA

Basic Implementation of CSMA, FDMA, and TDMA

Uploaded by

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

UNIVERSITY OF ENGINNERING AND TECHNOLOGY,

TAXILA

Subject: CN Theory
Assignment # 01
Dated: 23/09/2024(Monday)

Submitted By:
Wajeeha Islam (22-SE-18)

Submitted To:
Engr. Wajaht Abbas

Department of Software Engineering,


UET TAXILA
CSMA (Carrier Sense Multiple Access)
Output:
Pseudo Code & Flow Chart:
START
1. Start
2. While true, go to Step 3 else go to step 7
3. Sense the channel
4. If channel is free go to step 5 else go to step 6
5. Transmit data
Sense The
6. Wait (backoff)
Channel
7. End

NO Channel YES
Is Busy?

Transmit Wait
the Data

End
FDMA (Frequency Division Multiple Access)
Output:
Pseudo Code:
START
1. Start
2. Initialization:
Initialize total_bandwidth
Initialize num_nodes
bandwidth_per_node = total_bandwidth / num_nodes

3. For each node in num_nodes Check


4. Assign frequency_channel = bandwidth_per_node * (node - active
1) User
5. Print "Node node is assigned frequency_channel"
6. End For

7. For each attempt in num_attempts


8. Print "Attempt attempt:"

9. For each node in num_nodes NO


10. Print "Node node is transmitting in frequency_channel" User
Present?
11. Increment successful_transmissions
12. End For
13. End For
YES
14. Print "Total successful transmissions: successful_transmissions"
15. End

Assign

Transmit
Data

End
TDMA (Time Division Multiple Access)
Output:
Pseudo Code & Flowchart:
Start
1. Start
2. Initialization:
Initilize total_time_slots, num_nodes
time_slot_per_node = total_time_slots / num_nodes

3. For each node in num_nodes


4. Assign time_slot = time_slot_per_node * (node - 1) Divide Time
5. Print "Node node is assigned time_slot"
6. End For

7. For each attempt in

num_attempts
8. Print "Attempt attempt:"
9. For each node in num_nodes Asssign slots
10. Print "Node node is transmitting in time_slot" to the
11. Increment successful_transmissions nodes
12. End For
13. End For

14. Print "Total successful transmissions: successful_transmissions"


15. End

Transmit
data

NO

All node
transmitted

YES

End

You might also like