Showing posts with label 2013. Show all posts
Showing posts with label 2013. Show all posts

Friday, 5 April 2013

Routers

Definition: Routers are small physical devices that join multiple networks together. Technically, a router is a Layer 3 gateway device, meaning that it connects two or more networks and that the router operates at the network layer of the OSI model.
Home networks typically use a wireless or wired Internet Protocol (IP) router, IP being the most common OSI network layer protocol. An IP router such as a DSL or cable modem broadband router joins the home's local area network (LAN) to the wide-area network (WAN) of the Internet.
By maintaining configuration information in a piece of storage called the routing table, wired or wireless routers also have the ability to filter traffic, either incoming or outgoing, based on the IP addresses of senders and receivers. Some routers allow a network administrator to update the routing table from a Web browser interface. Broadband routers combine the functions of a router with those of a network switch and a firewall in a single unit.

CHANNEL CAPACITY



1.     CHANNEL CAPACITY:
We have seen that there are a variety of impairments that distort or corrupt a signal. For digital data, the question that then arises is to what extent these impairments limit the data rate that can be achieved. The maximum rate at which data can be transmitted over a given communication path, or channel, under given conditions, is referred to as the channel capacity.
There are four concepts here that we are trying to relate to one another.
• Data rate: The rate, in bits per second (bps), at which data can be communicated
• Bandwidth: The bandwidth of the transmitted signal as constrained by the transmitter and the nature of the transmission medium, expressed in cycles per second, or Hertz
• Noise: The average level of noise over the communications path
• Error rate: The rate at which errors occur, where an error is the reception of a 1 when a 0 was transmitted or the reception of a 0 when a 1 was transmitted The problem we are addressing is this: Communications facilities are expensive and, in general, the greater the bandwidth of a facility, the greater the cost. Furthermore, all transmission channels of any practical interest are of limited bandwidth. The limitations arise from the physical properties of the transmission medium or from deliberate limitations at the transmitter on the bandwidth to prevent interference from other sources. Accordingly, we would like to make as efficient use as possible of a given bandwidth. For digital data, this means that we would like to get as high a data rate as possible at a particular limit of error rate for a given bandwidth. The main constraint on achieving this efficiency is noise.

Optical Fiber

Optical Fiber

Physical Description An optical fiber is a thin (2 to125 mm ), flexible medium capable of guiding an optical ray.Various glasses and plastics can be used to make optical fibers. The lowest losses have been obtained using fibers of ultra pure fused silica. Ultrapure fiber is difficult to manufacture; higher loss multi-component glass fibers are more economical and still provide good performance. Plastic fiber is even less costly and can be used for short haul links, for which moderately high losses are acceptable.
An optical fiber cable has a cylindrical shape and consists of three concentric sections: the core, the cladding, and the jacket (Figure 4.2c). The core is the inner most section and consists of one or more very thin strands, or fibers, made of glass or plastic; the core has a diameter in the range of 8 to Each fiber is surrounded by its own cladding, a glass or plastic coating that has optical properties different
from those of the core and a diameter of The interface between the core
and cladding acts as a reflector to confine light that would otherwise escape the
core. The outermost layer, surrounding one or a bundle of cladded fibers, is the
jacket. The jacket is composed of plastic and other material layered to protect
against moisture, abrasion, crushing, and other environmental dangers.
Applications Optical fiber already enjoys considerable use in long
distance
telecommunications, and its use in military applications is growing. The continuing
improvements in performance and decline in prices, together with the inherent
advantages of optical fiber, have made it increasingly attractive for local area net
working. The following characteristics distinguish optical fiber from twisted pair or
coaxial cable:
• Greater capacity: The potential bandwidth, and hence data rate, of optical
fiber is immense; data rates of hundreds of Gbps over tens of kilometers have
been demonstrated. Compare this to the practical maximum of hundreds of
Mbps over about 1 km for coaxial cable and just a few Mbps over 1 km or up
to 100 Mbps to 10 Gbps over a few tens of meters for twisted pair.
• Smaller size and lighter weight: Optical fibers are considerably thinner than
coaxial cable or bundled twisted
pair cable—at least an order of magnitude
thinner for comparable information transmission capacity. For cramped con
duits in buildings and underground along public rights
of
way, the advantage
of small size is considerable. The corresponding reduction in weight reduces
structural support requirements.
• Lower attenuation: Attenuation is significantly lower for optical fiber than for
coaxial cable or twisted pair (Figure 4.3c) and is constant over a wide range.
• Electromagnetic isolation: Optical fiber systems are not affected by external
electromagnetic fields. Thus the system is not vulnerable to interference,
impulse noise, or crosstalk.By the same token, fibers do not radiate energy, so
there is little interference with other equipment and there is a high degree of
security from eavesdropping. In addition, fiber is inherently difficult to tap.
• Greater repeater spacing: Fewer repeaters mean lower cost and fewer sources
of error. The performance of optical fiber systems from this point of view has
been steadily improving. Repeater spacing in the tens of kilometers for optical
fiber is common, and repeater spacings of hundreds of kilometers have been
demonstrated. Coaxial and twisted
pair systems generally have repeaters
every few kilometers.

Coaxial Cable

Coaxial Cable
 
Physical Description: Coaxial cable, like twisted pair, consists of two conductors, but is constructed differently to permit it to operate over a wider range of frequencies. It consists of a hollow outer cylindrical conductor that surrounds a single inner wire conductor (Figure 4.2b). The inner conductor is held in place by either regularly spaced insulating rings or a solid dielectric material. The outer conductor is covered with a jacket or shield. A single coaxial cable has a diameter of from 1 to 2.5 cm. Coaxial cable can be used over longer distances and support more stations on a shared line than twisted pair.

Applications: Coaxial cable is a versatile transmission medium, used in a wide variety of applications.The most important of these are
• Television distribution
• Long distance telephone transmission
• Short run computer system links
• Local area networks
Coaxial cable is widely used as a means of distributing TV signals to individual homes—cable TV. From its modest beginnings as Community Antenna Television (CATV), designed to provide service to remote areas, cable TV reaches almost as many homes and offices as the telephone. A cable TV system can carry dozens or even hundreds of TV channels at ranges up to a few tens of kilometers.
            Coaxial cable has traditionally been an important part of the long distance telephone network.Today, it faces increasing competition from optical fiber, terrestrial microwave, and satellite. Using frequency division multiplexing (FDM, see Chapter 8), a coaxial cable can carry over 10,000 voice channels simultaneously.
            Coaxial cable is also commonly used for short range connections between devices. Using digital signaling, coaxial cable can be used to provide high speed I/O channels on computer systems.
 
Transmission Characteristics: Coaxial cable is used to transmit both analog and digital signals. As can be seen from Figure 4.3b, coaxial cable has frequency characteristics that are superior to those of twisted pair and can hence be used effectively at higher frequencies and data rates. Because of its shielded, concentric construction, coaxial cable is much less susceptible to interference and crosstalk than twisted pair. The principal constraints on performance are attenuation, thermal noise, and intermodulation noise. The latter is present only when several channels (FDM) or frequency bands are in use on the cable.
             For long distance transmission of analog signals, amplifiers are needed every few kilometers,with closer spacing required if higher frequencies are used.The usable spectrum for analog signaling extends to about 500 MHz.For digital signaling, repeaters are needed every kilometer or so,with closer spacing needed for higher data rates.

Thursday, 14 March 2013

Write a program to find the G.C.D of two numbers.

Statement:
Write a program to find the GCD of two numbers.



 Algorithm:

            Step-1: Read two numbers a,b
            Step-2: if (a>b)
                        Max=a, Min=b
            Step-3: Else,
                Max=b, Min=a
            Step-4: c=Max%Min
            Step-5: while(c!=0)
                       1.    Max=Min
                       2.    Min=c
                       3.    C=Max%Min
            Step-6: Print Min (GCD)
            Step-7: End
   


Program Listing:

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c,max,min;
printf("Enter the two numbers:");
scanf("%d%d",&a,&b);
if(a>b)
{
max=a;
min=b;
}
else
{
max=b;
min=a;
}
c=max%min;
while(c!=0)
{
max=min;
min=c;
c=max%min;
}
printf("The GCD of given two numbers is=%d", min);
getch();
}



Output:
Enter the two numbers: 56
42
The GCD of given two numbers is= 14


Discussion:
I.    It works properly.
II.    The GCD can be made fo more than two numbers.
III.    Since we use short signed int so it works within the number range  -32768  to +32767
IV.    If we use long int then it works within the number range  -2147483648  to  +2147483647

Write a program to calculate the interest of the loan.

 Statement:
            Write a program to calculate the interest of the loan.



Algorithm:
            Step-1: Read a (Amount of Rs)
            Step-2: Read i (Percentage of interest)
            Step-3: Read y (No of year)
            Step-4: e=a*i*y (Total interest)
            Step-5: t=e + a(Total amount of Rs.)
            Step-6: print e, t
            Step-7: End
       



Program Listing:

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
float a,i,t,y,e;
printf("\nAmount of Rs=");
scanf("%f",&a);
printf("\nPercentage of interest =");
scanf("%f",&i);
printf("\nNo of year=");
scanf("%f",&y);
e=a*i*y/100;
t=e+a;
printf("\nTotal interest=%f",e);
printf("\n\nTotal amount you get after %f year is= %f Rs" ,y,t);
getch();
}




Output:
Amount of Rs=1000
Percentage of interest = 13
No of year=5
Total amount you get after 5 year is= 650 Rs
Total amount you get after 5 year is= 1650 Rs
   
Discussion:
           I.    It works within the number range -32767 to 32767
          II.    If we use long integer then it works in more than range.
         III.    It works in negative number.

Determine a seller’s profit or loss and how much



Statement:
If cost price and selling price of an item is input through the keyboard, write a program to determine whether the seller has made profit or incurred loss. Also determine how much profit he made or loss he incurred.



ü           Algorithm:

                                    Step-1: Read a (cost price)
                                    Step-2: Read b (selling price)
                                    Step-3: if(a>b)
1)      Print “LOSS”
2)      c=a-b
3)      The amount loss is  c
                                    Step-4: else
1)      print “PROFIT”
2)      c=b-b
3)      The amount of profit c
                                    Step-5: End
                       


v                        Program Listing:

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
float a,b,c;
printf("Enter the cost price=");
scanf("%f",&a);
printf("\nEnter the selling price=");
scanf("%f",&b);
if (a>b)
{
printf("\nSeller incurred LOSS");
c=a-b;
printf("\nThe LOSS is=%f",c);
}
else
{
printf("\nSeller makes PROFIT");
c=b-a;
printf("\nThe PROFIT is=%f",c);
}
getch();
}



·        Output:
Enter the cost price= 102
Enter the selling price= 112
Seller makes PROFIT
The PROFIT is=10


Enter the cost price= 156
Enter the selling price= 114
Seller incurred LOSS
The LOSS is=42
                                   
           
           
§  Discussion:
                                                                                I.            It works within the number range -32767 to 32767
                                                                              II.            If we use long integer then it works in more than range.
                                                                            III.            It works in negative number.

Calculate the multiple of two given numbers.


Statement:
Calculate the multiple of two given numbers.





      Algorithm:

                                                Step 1: Read a 
                                                Step 2: Read b
                                                Step 3: c=a*b
                                                Step 4: print c
                                                Step 5: End





v Program Listing:

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Please enter a number:");
scanf("%d",&a);
printf("\nPlease enter another number:");
scanf("%d",&b);
c=a*b;
printf("\nThe multiple of two numbers is:%d",c);
getch();
}



·  Output:
Please enter a number: 42
Please enter another number: 56
The multiple of two number is: 2352





§  Discussion:
                                                I.            It works properly.
                                              II.            We can made the multiple of more than two numbers similarly.
                                            III.            Since we use short signed int so it works within the number range  -32768  to +32767
                                           IV.            If we use long int then it works within the number range   -2147483648  to  +2147483647