Sunday, May 28, 2023

 MODULAR PROGRAMMING 2080

[SELECTION STRUCTURE] 

SEE COMPUTER SCIENCE 2080




  1. WAP to check whether the given no. is divisible by 5 or not using function procedure.
  2. WAP check whether the given no. is divisible by 3 and 7 or not using sub procedure.
  3. WAP to check whether the given no. is positive, negative or zero function procedure.
  4. WAP to input any number and check whether the given no. is positive or negative using sub procedure.
  5. WAP to input a year and display whether that year is a leap year or not. [divisible by 4 but not by 100] using function procedure.
  6. WAP to input any number and display whether it is odd or even using sub procedure.
  7. Input the age of a person and find out whether the person is eligible to drive or not. [age >=16] using sub procedure
  8. Input the age of a person and find out whether the person is eligible to vote or not. [age >=18] using function procedure
  9. WAP to enter any two numbers and display the greater one using function procedure.
  10. WAP to enter any two numbers and display the smaller one using sub procedure.
  11. WAP to enter any three numbers and display the greatest one using sub procedure.
  12. WAP to enter any three numbers and display the smallest one function procedure.
  13. WAP to enter any three numbers and display the middle number using sub procedure.
  14. WAP to enter any three numbers and display the greatest using function and  smallest using sub procedure.
  15. WAP to enter any three numbers and display the difference between greatest smallest number using function procedure.

Saturday, May 27, 2023

Networking and Telecommunications - SEE COMPUTER SCIENCE 2080

 



Networking and Telecommunications 

SEE COMPUTER SCIENCE 2080

Communication
Communication is sending and receiving information between two or more persons.

 

Telecommunication
Telecommunication is a system of transmission of sounds, images, texts or data in the form of electronic signals.

 

Data Communication

Data communication is a process of transferring data electronically from one place to other using different transmission mediums. Eg. E-Mail, Chat and phone calls.

 

Components of Data Communication.
i) Data             ii) Sender        iii) Medium     iv) Receiver    v) Protocol

 

Protocol
Protocol is a set of rules by which computers on the network communicate with each other.

E.g. TCP/IP, SMTP, HTTP etc.

 

Data Transmission Mode

Data transmission mode is the way of transmission of data from one location to another. There are three types of transmission mode:
i) Simplex mode        

ii) Half duplex mode 

iii) Full Duplex Mode

 

Simplex mode
The transmission mode in which transmission of data can take place in one direction only is called simplex mode. E.g.: Newspaper, Radio and Television.

 

Half duplex mode
The transmission mode in which transmission of data can take place in both directions but only in one direction at a time is called half duplex mode. E.g.: Wireless handset and walkie-talkie.

 

Full duplex mode
The transmission mode in which data can be transmitted in both directions simultaneously is called full duplex mode. E.g.: Telephone, Internet etc.

 

Bandwidth
Bandwidth can be defined as the maximum volume of data that can be transmitted through a communication system.

We can measure bandwidth in digital devices by bits per second and in analog devices by cycles per second or Hertz (Hz).

 

Transmission medium / Communication Channel
Transmission medium is a pathway that can transmit information from a sender to a receiver through wired or wireless medium on a network.

The types of communication medium are: 

 i) Guided Medium (Bounded or Wired)  

ii) Unguided Medium (Unbounded or Wireless)

 

Guided medium
The transmission media which comprises of cables or wires through which data is transmitted is called guided medium. They are called guided since they provide a physical channel from the sender device to the receiver device. The signal travelling through these media are bounded by the physical limits of the medium.

E.g.: twisted pair cable, co-axial cable, fibre optics cable, etc.

 

Features of guided media

a)     Data transmits through the physical cable or fixed path

b)     Data transmission rate is higher.

 

Unguided medium
The transmission media which transfer data in the form of electromagnetic waves that do not require any cables for transmission is called unguided medium. These media are bounded by geographical boundaries.

E.g.: radio wave, microwave, infrared etc.

 

Guided VS Unguided Media

Guided Medai

Unguided Media

Guided media is a medium that sends signals through a solid physical path.

Unguided media is a medium that transmits signals through free space.

There is a specific direction to send signals.

There is no particular direction to send signals.

Used in wired transmission

Helps wireless transmission

Twisted pair, coaxial cable, and fiber optics

Radio wave, microwave, and infrared

 

Twisted pair cable

A pair of wires twisted with each other is known as twisted pair cable. A set of four pairs of twisted wires are bundled to form cable. These are the most common medium for LAN. Wires are twisted with each other so as to reduce crosstalk (A disturbance caused by electromagnetic interference, along a circuit or a cable pair). Its types are: a) Unshielded Twisted Pair Cable    b) Twisted Pair Cable

 

Unshielded twisted pair (UTP)

Unshielded twisted pair is a popular type of cable that consists of two unshielded wires twisted around each other which are used in telephone wiring and local area networks (LANs). It is called unshielded because it has no additional foil wrap, or shield.

RJ-45 connector is commonly used with unshielded twisted pair.

 

Shielded twisted pair (STP)

Shielded twisted pair is a type of copper telephone wiring in which each of the two copper wires are twisted together and coated with an insulating coating. The extra covering in shielded twisted pair wiring protects the transmission line from electromagnetic interference

D-shell connectors are used with shielded twisted pair.

Co-axial cable

Coaxial (or “coax”) cable is a common type of cable used for transmitting data over long distances. They are most commonly used to transmit cable TV and Internet signals.

The connectors used with co-axial cables are BNC, T-connectors and terminators in bus topology.

10    Mbps is the maximum speed of co-axial cable.

 

Fiber optic cable

Fiber optics cable is one of the costlier cables used in data communication which uses light to carry a data signal through the cable.

The connectors used in fiber optics are Screw Mounted Adaptors (SMA), Spring-loaded Twist (ST), SC and FC.

It is costlier to maintain, produce and install.

Radio wave transmission

The transmission making use of radio waves through air is called radio wave transmission.

It provides low bandwidth for data communication.

Radio, TV, cellular phones etc. uses radio transmission in one form or another.

The radio waves can travel through walls and through an entire building.

Depending upon the frequency, they can travel long distance or short distance.

It does not require line of sight for data transmission

 

Microwave transmission

Microwave is a line-of-sight wireless communication technology that uses high frequency beams of radio waves to provide high speed wireless connections that can send and receive voice, video, and data information.

Microwaves do not pass through buildings. So, indoor receivers cannot be used effectively.

It provides higher bandwidth for data communication.

It requires line of sight for data transmission.

 

Infrared transmission

Infrared Transmission is the transmission of data or voice information over infrared (IR) light over short ranges. It requires line-of-sight and is unable to break through walls.

 

Computer network

A computer network means two or more computers connected with each other to share data, hardware, software and other resources.

 

Advantages of computer network

a)     Computer in a network can access the network-connected hardware devices like printers, disk drives, etc.

b)     Data in a network environment can be updated from any computer. Updated data can be accessed by all computers on the network.

c)     Computers in a network system share different software packages.

d)     Information can be exchanged rapidly in computer network.

Disadvantages of computer network

a)     The sharing of information may leak the privacy of other clients.

b)     The networking cost is high

c)     If hardware or software malfunctions, it affects the whole network.

d)     Data and information may be stolen by computer hackers if the security of network is not reliable.

Reasons of keeping computers on the network

a)     To share hardware devices like printers, scanners, hard disks etc.

b)     To share data and information.

c)     To share software resources.

d)     To communicate with each other.

 

Hardware components of a computer network (Elements of Network)

Physical parts and devices used to connect computers in the network environment are called hardware components. The hardware components of computer network are

a)     Computer system (Server or Workstation)    b) Network connectors           c) Network cables

d)    NIC Card                   e) MODEM                 f) Hub                                      g) Bridge

 h)     Switch                       i) Router                      j) Gateway                              k) Repeater

 

 

Server

A server is the main computer that provides services, data and other resources to the other computers in the network environment. Network operating software used by server is Novell Netware, Linux, Unix etc. Different types of servers are file server, print server, application server etc.

 

Workstation
Workstation is a computer network that utilizes network resources. Network operating software used by workstation are Windows 98, Windows XP etc.

 

Node
Each computer or device of network is called node.

 

Router
Router is an intelligent device that connects two different networks which uses the address for filtering and forwarding the data as well as it has an ability to determine the best route for destination.

 

Network Interface Card (NIC)
A Network Interface Card (NIC) is the adapter through which the computer is connected to the network. The function of NIC is to convert data into electronic signals and transfer them through cables and vice-versa. The advantage is to present the platform for a communication between the computers within a network.

 

Cable
Cables are commonly used media of physical channel for transmitting data between computers in network. Examples of cables are coaxial, twisted pair and fiber optic cable.

 

Connector
Connector is an interface between the NIC of the computer and the cable that passes data between computers in network. Examples of connectors are BNC used with coaxial cable, RJ 45 used with UTP cable, ST used with fiber optic cable etc.

 

Hub

A hub is a network device with multiple points or ports which acts as a central point from where different computers and other devices are connected. It broadcasts all network data across each connection.

Hub is mostly used in physical star topology.

Switch
A switch is a networking device that has multiple connecting ports which is often used interchangeably with the bridge.

 

Bridge

A bridge is a device that connects two or more similar types of network which filters the data or inspects incoming signals and decides whether to forward the signals or discard them.

 

Gateway
Gateway is an interconnecting device that connects two dissimilar networks

 

Repeater
Repeater is a device that amplifies the incoming signals, creates a copy of it and transmits the signal on network.

 

 

 

MODEM

MODEM is a device which is used to transfer the data of one computer to another computer using telephone lines.

The role of MODEM in data transmission is that it transfers data from one computer to another through telephone line. It also converts the digital signal into analog and vice versa.

 

Importance of MODEM  

MODEM modulates the digital codes of the computer into analog signal, which then can travel through the telephone cable. At the receiving end the MODEM kept there will demodulate the analog signal to digital codes, which can be then understood and used by the receiving computer. In this way a MODEM makes the computer network possible.

 

Modulation / Demodulation

The process of translating digital signals of a computer to analog signals, which are then transmitted across the standard telephone lines, is known as modulation. The process of translating analog signals from a phone line and converts then into digital signals for the computer is known as demodulation.

 

Software components of a computer network

a)     Network protocol

b)     Network operating system

c)     Device driver

 

Network operating system [PMT 2075K]
Network operating system is a set of computer program that manages the resources on network. E.g. Novell network, Microsoft Windows NT, Linux, Unix etc.

 

Device driver

Device driver is a program that controls the functionality of the hardware device.

 

Types of Network

a)     LAN (Local Area Network)

b)     MAN (Metropolitan Area Network)

c)     WAN (Wide Area Network)

 

LAN (Local Area Network)

A LAN is a type of network which covers small area i.e. within a room, building, or short distance by using cables or small wireless devices. It is controlled by a single organization. It uses private connection media. E.g.: network in a school, college or cyber cafe. The diameter is not more than a few kilometres. LAN offers bandwidth of 10-100 Mbps.

 

MAN (Metropolitan Area Network)

A MAN is a type of network which covers an entire city. It is controlled by single or group of organization. It uses private or public connection media. E.g.: interconnection between different branches on same branch and ISP providing internet services. It offers a number of network services compatible with bandwidth from 128 kbps to 1 Gbps.

 

WAN (Wide Area Network)

A WAN is a type of network which  connects two or more computers generally across a wide geographical area such as cities, districts, and countries. It is controlled by group of organization. It uses public connections media like telephone lines, satellite links or microwave system to connect several LANs and MANs.  E.g. internet. Data transmission in WAN is slower than LANs and WANs.

 

Network topology (LAN topology)
The arrangement or connection pattern of computers or nodes and other devices of the network is called network topology. The three basic topologies are bus topology, ring topology and star topology

 

Bus topology
The network topology in which computers and other devices are arranged in linear format which uses a common backbone or wire to connect all the computers and devices is called bus topology.

 

Advantages of bus topology [SEE 2073]

a)     It is easy to set up computers and other devices in bus topology, because all the devices are connected through a single wire.

b)     It requires fewer cable media, so it is cheaper than other topologies.

c)     It is easy to add new node to the network.

d)     Failure of one workstation does not affect other computers on the network.

 

Disadvantages of bus topology

a)     The whole network system collapses if the cable or backbone is damaged.

b)    The network slows down if additional computers are connected.

c)     The limited length of the cable in a network may restrict to connect the workstation or devices.

d)    It is difficult to find fault in this network topology.


Ring topology [MF 2076]

The network topology in which computers are connected in the shape of a circle without any end points is called ring topology. Each workstation contains two neighbours for communication or an input and output connections.

 

Advantages of ring topology

i) It is easy it set up and configure.
ii) Each computer gets equal opportunity to access the network resources.
iii) It supports high data transmission rate.

iv) Performs better than a star topology under heavy network load.

 

Disadvantages of ring topology

i)Failure of any cable or single computers may affect the entire network.
ii) It is difficult to detect the errors.
iii) Adding/removing the devices affect the entire network.

iv) Much slower than an Ethernet network under normal load.

 

Star topology

The network topology in which all computers or other devices are connected through a central device through a central device called hub or switch is called star topology.

 

Advantages of star topology

i) Easy to set up and configure.
ii) Failure of single computer or cable doesn’t affect the entire network.
iii) It is easy to find the fault.
iv) It is easy to extend to network by attaching new devices to the central devices.

 

Disadvantages of star topology

i) It requires more cable in comparison of bus topology so it is more costly.
ii) Failure of central devices (hub or switch) break down the whole system.

 

Network architecture (Models of Computer Network)

The arrangement of the computers on the network which is based on the computing model is called network architecture. Its types are

a)     Centralized computing network

b)     Client / Server Network

c)     Peer to Peer Network

 Centralized computing network

A centralized computing network is a network in which a central host computer performs data processing and storage on behalf of clients. It is different from client server network as client server network consists of at least one server and one or more client as well as client server provides high security of data and other resources.

 

Client/server network

Client/ server network is a type of network architecture that consists of at least one server and one or more clients or workstations, where users do their work. It provides central security administration and the network administrator is responsible for data security and other resources management of the network.

 

Peer-to-peer network

Peer-to-Peer network is a group of computers, which function both as servers and workstations to share data, information and other resources of the network. It lacks centralized network administration, where the network administrator needs to manage security on each computer. It provides no reliable security and might put data in higher risks.

 

Client/server network Vs Peer-to-peer network

 

Client/server network

Peer-to-peer network

There is a specific server and specific clients connected to the server.

Clients and server are not distinguished; each node act as client and server.

The client request for service and server respond with the service.

Each node can request for services and can also provide the services.

The data is stored in a centralized server.

Each peer has its own data.

The client-server are expensive to implement.

Peer-to-peer are less expensive to implement.

 

Internet  

Internet is an interconnection of several thousands of computers of different types belonging to the various networks all over the world in order to share data and information. TCP/IP is the communication protocol used by the internet.

 

Services of internet

WWW (World Wide Web), E-mail (Electronic mail), FTP (File Transfer Protocol),

IRC (internet Relay Chat), Search Engine, Telnet, E-commerce

 

Advantages of internet

a)     It provides entertainment, such as movies, music, and games.

b)     It allows people to communicate with each other from all over the world.

c)     It makes it possible to shop for goods and services from the comfort of your home.

d)     It provides instant access to a vast amount of information from all around the world.

 

Disadvantages of internet

a)     Online addiction and excessive screen time can have negative effects on mental and physical health.

b)     The internet is full of viruses and malware that can damage computers and steal personal information.

c)     The internet is a major source of pornography, which can be harmful to children and adults.

d)     Online harassment and cyberbullying can cause emotional suffering and harm to individuals.

 

Intranet

An intranet is a private computer network that uses the internet protocol to securely share any part of information of an organization. It is owned by a single organization or company. It can only be used by the employees of the owned organization.

 

Extranet

An extranet is a computer network that allows controlled access from outside for specific business or educational purposes.

 

E-mail (Electronic Mail)
E-mail (Electronic mail) is one of the most popular services provided by the internet which send messages from one computer to another using the internet.
E.g. xyz@gmail.com

Any four sites that provide e-mail services are:

www.yahoomail.com, www.hotmail.com, www.gmail.com, www.outlook.com

 

Advantages of E-mail

a)     It allows to send and receive message across the world at very low cost.

b)     E-mail is faster, cheaper, more reliable than traditional mail.

c)     The image, sound, video and documents can be attached to e-mail message.

d)     Email can be accessed from anywhere in the world.

 

Disadvantages of e-mail
a) Minor mistakes in e-mail address may deliver the mail to wrong address.
b) Since it passes through a vast electronic network, it may be seized in between.

c) Without the internet, e-mail is not possible.

d) Risk of messages getting lost or buried in overflowing inboxes.

 

ISP (Internet Service Provider) 
An Internet service provider (ISP) is an organization that provides services for accessing and using the Internet. World Link, Mercantile, Classitech, Vianet etc are the ISPs of Nepal.

 

Web browser
A web browser is a software that allows users to access and view websites on the internet.  

Examples of web browsers are Mozilla Firefox, Google chrome, Internet Explorer, opera etc.  

 

Search engine
A search engine is a tool that helps to find the information on the internet using keywords or phrases. Examples of search engines are Google, Bing, Yahoo, ask.com etc

 

Telnet
A telnet is a program that allows a user to log in to a remote computer on internet as a user on that system.

FTP (File Transfer Protocol)
File Transfer Protocol is the internet tool that allows the user to transfer the file from one computer to another computer. It helps to transfer (download or upload) files from one computer to another computer.

 

Uploading / Downloading
Uploading refers to copying files or documents, programs or data from the user computer to the internet server. Downloading refers to the copying files or document or program or data from the internet server to the user computer.

 

IRC (Internet Relay Chat)
Internet Relay Chat is one of the important services provided by the internet which allows the user to communicate with other people in real time. For eg: chatting on facebook.

 

WWW (World Wide Web)

The World Wide Web (WWW) is a system of interconnected web pages and documents on the internet that can be accessed using a web browser.

 

***