Monday, 7 February 2011

Ampere's Law


Ampere's Law:

The magnetic field in space around an electric current is proportional to the electric current, which serves as its source, just as the electric field in space is proportional to the charge that serves as its source. Ampere's Law states that for any closed loop path, the sum of the length elements times the magnetic field in the direction of the length element is equal to the permeability times the electric current enclosed in the loop.

In the electric case, the relation of field to source is quantified in Gauss's Law, which is a very powerful tool for calculating electric fields.


Sunday, 6 February 2011

Prospect of e-commerce

Electric Commerce:
Electronic commerce, commonly known as (electronic marketing) e-commerce or E-Commerce, consists of the buying and selling of products or services over electronic systems such as the Internet and other computer networks. Electronic commerce is generally considered to be the sales aspect of e-business. The amount of trade conducted electronically has grown extraordinarily with widespread Internet usage. Modern electronic commerce typically uses the world wide web at least at some point in the transaction's lifecycle, although it can encompass a wider range of technologies such as e-mail as well.
History:
Early Development:
The meaning of electronic commerce has changed over the last 30 years. Originally, electronic commerce meant the facilitation of commercial transactions electronically. Later, the growth and acceptance of credit cards, automated teller machines (ATM) and telephone banking in the 1980s were also forms of electronic commerce. Another form of e-commerce was the airline reservation system typified by sabre in the USA and travicom in the UK.
Online shopping, an important component of electronic commerce was invented by Michael Aldrich in the UK in 1979. The world's first recorded B2B (business-to-business) was Thomson Holiday’s in 1981. The first recorded B2C (business-to-consumer) was Gateshead Tesco in 1984. The world's first recorded online shopper was Mrs Jane Snowball of Gateshead, England.
In 1990, Tim Berners-Lee invented the World Wide Web and transformed an academic telecommunication network into a worldwide everyman everyday communication system called internet/www. The Internet became popular worldwide around 1994; it took about five years to introduce security protocols and DSL allowing continual connection to the Internet. By the end of 2000, many European and American business companies offered their services through the world wide web. Since then people began to associate a word "e-commerce" with the ability of purchasing various goods through the Internet using secure protocols and electronic payment services.
Timeline:
1979: Online shopping was invented in the UK by Michael Aldrich.
1982: Minitel was introduced nationwide in France by France Telecom and used for online ordering.
1987: swreg begins to provide software and shareware authors means to sell their products online through an electronic merchant account.
1990: Tim Berners-Lee writes the first web browser, World Wide Web, using a next computer.
1992: J.H. Snider and Terra Ziporyn publish Future Shop: How New Technologies Will Change the Way We Shop and What We Buy. St. Martin's Press. isbn 0312063598.
1994: Netscape releases the Navigator browser in October under the code name Mozilla. Pizza Hut offers pizza ordering on its Web page. The first online bank opens. Attempts to offer flower delivery and magazine subscriptions online. Adult materials also became commercially available, as do cars and bikes. Netscape 1.0 is introduced in late 1994 SSL encryption that made transactions secure.
1995: Jeff Bezos launches Amazom and the first commercial-free 24 hour, internet-only radio stations, Radio HK and NetRadio started broadcasting. Dell and Cisco begin to aggressively use Internet for commercial transactions. eBay is founded by computer programmer Pierre Omidyar as AuctionWeb.
1998: Electronic Postal Stamps can be purchased and downloaded for printing from the Web.
1999: Business sold for US $7.5 million to eCompanies, which was purchased in 1997 for US $149,000. The peer-to-peer file sharing software Napster launches. ATG Storeslaunches to sell decorative items for the home online.
2000: The dot-com bust.
2002: eBay acquires PayPal for $1.5 billion. Niche retail companies CSN Stores and NetShops are founded with the concept of selling products through several targeted domains, rather than a central portal.
2003: Amazon posts first yearly profit.
2007: Business acquired by R.H.Donnelley for $345 million.
2008: US E-Commerce and Online Retail sales projected to reach $204 billion, an increase of 17 percent over 2007.
Business applications:
Some common applications related to electronic commerce are the following:
E-mail
Enterprise Content Management
Instant messaging
Newsgroups
Online Shopping and order tracking
Online Banking
Online office suites
Domestic and international payment systems
Shopping Cart Software
Teleconferencing
Electronic Tickets
The forms of usage of e-commerce:
Contemporary electronic commerce involves everything from ordering "digital" content for immediate online consumption, to ordering conventional goods and services, to "meta" services to facilitate other types of electronic commerce.
On the consumer level, electronic commerce is mostly conducted on the World Wide Web. An individual can go online to purchase anything from books or groceries, to expensive items like real estate. Another example would be online banking, i.e. online bill payments, buying stocks, transferring funds from one account to another, and initiating wire payment to another country. All of these activities can be done with a few strokes of the keyboard.
On the institutional level, big corporations and financial institutions use the internet to exchange financial data to facilitate domestic and international business. Data integrity and security are very hot and pressing issues for electronic commerce today.
Electronic commerce that is conducted between businesses is referred to as business to business or B2B. Electronic commerce that is conducted between businesses and consumers, on the other hand, is referred to as Business to consumer orB2C. This is the type of electronic commerce conducted by companies such as Amazon.
E-commerce provides many new ways for businesses and consumers to communicate and conduct business. There are a number of advantages and disadvantages of conducting business in this manner.
E-commerce advantages and disadvantages:
E-commerce provides many new ways for businesses and consumers to communicate and conduct business. There are a number of advantages and disadvantages of conducting business in this manner.
E-commerce advantages:
Some advantages that can be achieved from e-commerce include:
Being able to conduct business 24 x 7 x 365: E-commerce systems can operate all day every day. Your physical storefront does not need to be open in order for customers and suppliers to be doing business with you electronically.
Access the global marketplace: The Internet spans the world, and it is possible to do business with any business or person who is connected to the Internet.
Speed: Electronic communications allow messages to traverse the world almost instantaneously. There is no need to wait weeks for a catalogue to arrive by post: that communications delay is not a part of the Internet / e-commerce world.
Opportunity to reduce costs: The Internet makes it very easy to 'shop around' for products and services that may be cheaper or more effective than we might otherwise settle for.
Allowing customer self service and 'customer outsourcing': People can interact with businesses at any hour of the day that it is convenient to them, and because these interactions are initiated by customers, the customers also provide a lot of the data for the transaction that may otherwise need to be entered by business staff. This means that some of the work and costs are effectively shifted to customers; this is referred to as 'customer outsourcing.'
E-commerce disadvantages and constraints:
Some disadvantages and constraints of e-commerce include the following.
Time for delivery of physical products: It is possible to visit a local music store and walk out with a compact disc or a bookstore and leave with a book. E-commerce is often used to buy goods that are not available locally from businesses all over the world, meaning that physical goods need to be delivered, which takes time and costs money. In some cases there are ways around this, for example, with electronic files of the music or books being accessed across the Internet, but then these are not physical goods.
Physical product, supplier & delivery uncertainty: When you walk out of a shop with an item, it's yours. You have it; you know what it is, where it is and how it looks. In some respects e-commerce purchases are made on trust. This is because, firstly, not having had physical access to the product, a purchase is made on an expectation of what that product is and its condition. Secondly, because supplying businesses can be conducted across the world, it can be uncertain whether or not they are legitimate businesses and are not just going to take your money. It's pretty hard to knock on their door to complain or seek legal recourse! Thirdly, even if the item is sent, it is easy to start wondering whether or not it will ever arrive.
Perishable goods: Forget about ordering a single gelato ice cream from a shop in Rome! Though specialized or refrigerated transport can be used, goods bought and sold via the Internet tend to be durable and non-perishable: they need to survive the trip from the supplier to the purchasing business or consumer.
Returning goods: Returning goods online can be an area of difficulty. The uncertainties surrounding the initial payment and delivery of goods can be exacerbated in this process. Will the goods get back to their source? Who pays for the return postage? Will the refund be paid? Will I be left with nothing? How long will it take? Contrast this with the offline experience of returning goods to a shop.
Privacy, security, payment, identity, contract: Many issues arise - privacy of information, security of that information and payment details, whether or not payment details (e.g. credit card details) will be misused, identity theft, contract, and, whether we have one or not, what laws and legal jurisdiction apply.
Prospect of E-Commerce in Pakistan:
E-commerce is a very hot issue these days. After the revolution of Internet, more and more countries are getting involved in it.
The over-all volume of e-commerce is more than $4 billion annually. Doing business on internet is not a very costly investment. It is estimated that in near future, almost 25 per cent of the traditional business will be converted into internet business.
Trends: E-commerce is an information technology trend developing fast in the business world. The corporate and the business world, aptly supported by the IT industry, already stands transferred, which by recent estimate will exceed $400 billion this year.
As we start warming up to global e-commerce in Pakistan, we must understand that almost 78 per cent of the e-commerce activity takes place in the USA, obviously driven by the use of internet in that country. As the January 2000, over 110 million people have internet access there compared to 279 million the world over.
Nevertheless, Pakistan can make good use of this opportunity with proper planning and execution. To begin with, let us focus on the domestic front before going all out for the global market.
Domestic activity: Offer for improving and productivity to bring it to the excellent level. It also allows our entrepreneur to test their web business and marketing skills before taking on the international markets. E-commerce is not for all but for those who understand it. Yet, e-commerce is not a technology.
The issue at the individual level, it is purely a business matter. At the govt. level, it is a matter of providing infrastructure for transactions on internet. E-commerce or business through internet is becoming very popular mode of trading around the world particularly in the developed world. E- Commerce is a broad term used to quantify the trading taking place on the internet.
Most studies, however, suggest that e-commerce runs through four steps. The very first step is, to build a website to let the world know about your existence. The website contains information about the company, product/services and other related information, which can help visitors to learn more about the hosts. The second step involves asking customers to lose their pockets and buy on line.
This step requires adopting advance level of software capable of handling orders. In the third stage inventory, management adds to the system and lastly, providing provisions of payments through online banking partnership between buyers and sellers, the most difficult and complex part of e-commerce.
However, Pakistan is still far behind in chasing the west in this regard. Entrepreneurs in Pakistan are of the opinion that e- commerce means being able to make and receive payments through internet and any other activity through internet is not considered as e-commerce. This low level of understanding has led many Pakistani firms to give low priority to e-commerce due to unavailability of proper framework for the internet in the country.
In Pakistan, e-commerce is still in its infancy and faces many barriers to grow. The notable barriers are: unavailability of proper infrastructure [telephone line of stem lines of steam age, frequent failures of power] limited user of internet hardly one per cent of the entire population have access to the internet], the issue of security of transactions on the internet and high bandwidth rates.
The Basic E-Commerce Model:






















In a Nut Shell:
It can be concluded that there is a lot of scope of e- commerce in Pakistan, and most companies are eager to going to the digital world, but at present due to absence of any policy framework and limited internet market, companies are holding their plans to start e-business until clouds of barriers as discussed are disappeared.
E-Commerce has a long way to go — as have the all-important supporting services: credit card processing, fulfillment and shipping — but opportunities for market position exist for companies with patience, contacts and resources. The July 2002 Economist Information Unit ranked preparedness for ecommerce as follows (USA scoring 8.41).
Country Index:
Israel 6.79
South Africa 5.45
Turkey 4.37
Bulgaria 4.25
Sri Lanka 4.05
India 4.02
Romania 4.00
Russia 3.93
Saudi Arabia 3.77
Egypt 3.76
Iran 3.20
Ukraine 3.05
Nigeria 2.97
Pakistan 2.78
Algeria 2.70
Kazakhstan 2.55
Azerbaijan 2.38

Saturday, 5 February 2011

Personal Happiness

How to create Personal Happiness:
Happiness is a state of mind. You start feeling happy when you become internally secure. Deep thought helps in creating internal calmness and security. A powerful mind can move mountains. This internal security also helps us become less greedy for materials and resources. This is the genesis of spirituality. With the reduction or removal of greed the environment can be made better. A happy individual can then give back to society both knowledge and resources.

Friday, 4 February 2011

Physics Practice MCQs

1-The relation (B. L)I=UI is called
a-Amperes law b-Ohm’s law
c-Gauss’s law d-Newton’s law

2-(B. L)i is equal to
a-UI b=UNI
c-UNI/2r d-U/I

3-The magnetic field of induction of Toroid is
a-UNI/2r b-UI/2r
c-U2r/NI d-2r/UI

4-The magnetic field of induction of solenoid is
a-Uin b-UI
c-Uin/2r d-2r/UnI

5- is a coil of an insulated copper wire
wound on a long cylinder.
a-solenoid b-Toroid
c-Battery cell d-Hollow cylinder

6- is a coil of an insulated copper wire
wound on a circular shape material.
a-Toroid b-Solenoid
c-Circuit d-Potentiometer

7-The dot product between tangential components
And the summation of all the components of length
is equal to product of and
a-U and I b-U and N
c-U and V d-U and R

8- (B. L)=UI here U is called
a-Permeability of free space
b-Permitivity of free space
c-Relative permitivity
d-Di-electric constant

9-The value of U is
a-4*10^-7weber/A.m b-4*106-7weber/A.m
c-4*10^-7weber/C.m d-4*10^7coulomb/weber.m

10-The unit of B is
a-Weber b-Coulomb
c-Ampere d-Ohm

11-Acording to Biot and Savart law the magnetic field
of induction is directly related with
a-Twice of the current.
b-Twice of the voltage.
c-Twice of the resistance.
d-Thrice of the voltage.

12-What does the relation B2I/r represents.
a-Biot and Savart law b-Faraday law
c-Lenz law d-Inverse square law

13-Acording to Biot and Savart law the magnetic field
of induction B is related to
a-1/r b-r
c-r^2 d-i/r^2

14-Acording to Biot and Savart law the equation
B=(constant)2I/r here constant is
a-U/4 b-4U/
c-U/4r d-4r/U

15- l=Circumference of a circle which is equal to
a-2r b-2r^2
c-r^2 d-4/3 r^3

16-The magnetic field of induction will be maximum
If
a-B and L are in same direction.
b-B and L are in opposite direction.
c-B and L are perpendicular.
d-B is zero

17-Ampere’s law was proposed by
a-Ampere b-Faraday
c-Newton d-Coulomb

18-Ampere’s law carries which variable quantity.
a-I b-V
c-R d-C

19-The magnetic field of induction will be minimum if
a-B and L are in same direction.
b-B and L are in opposite direction.
c-B and L are perpendicular.
d-B is zero

20-Magnetic flux are the lines of forces around a
a-charge b-magnet
c-electron d-positron

Thursday, 3 February 2011

Nation's Strength by Ralph Waldo Emerson

An inspirational poem from which a student can have inspiration for the future deeds.

A NATION’S STRENGTH

Not gold, but only men can make,
A people great and strong,
Men who, for truth and honor’s sake,
Stand fast and suffer long.

Brave men who work while others sleep,
Who dare while other fly,
They build a nation’s pillars deep,
And lift them to the sky.

Ralph Waldo Emerson

Do your best — professionally, technically and ethically.

Wednesday, 2 February 2011

Nation Building

Nation Building:
Nation Building is character building. It is not just about sovereignty, but sovereignty and beyond. It is not just about economics, but economics and beyond. It is not what is built, but who builds it.
Nation building is about people first, and everything else second. It is about a people's character first and foremost.
There are many people who went through their suffering, staged their revolutions, and fought their civil wars. When the smoke cleared, they were not a nation. They may have been victorious over their enemies, but that reflected only factionalism, not nationhood. Invariably, triumphs and defeats in battles only led to future wars when disagreements could not be bridged by common goals or dreams. In the course of history, however, many people did arrive at common grounds, albeit with much pain and bloodshed along the way. From those common grounds were born the seeds of nationhood, the collective state and struggle of people to attain their higher aspirations. From stages of violence, of the use of superior force to impose unaccepted will, of exploitation of position and power for personal gain, to the equal application of law for all, to the promotion of social justice and the respect for human rights, to the recognition of a human being's inalienable rights, people grow to nationhood with their own social and cultural refinement. Violence, corruption and poverty are the standard ills, or evils, that plague people who are yet unable to parallel the higher intent of creation. When the more crass and material needs dominate the perspective and attitude of people, their togetherness translates only to survivalist behavior and growth at the expense of others who are weaker.
In other words, people grow to nationhood when their character develops the virtues and values that propel them towards higher humanity.
It is the refinement of character, or the development of collective discipline which adopts integrity, honesty, industry, respect and humaneness for the young, the elderly and the disabled that a people rise up to nobility and honor.
Nation building takes on a universal character when universal values are sought by people from different countries. At the same time, the uniqueness of territory, culture spirituality and history will play a major role in configuring universal values to a particular people. Thus, a Buddhist people will evolve universal values to merge or arise in very distinct Buddhist ways. In like manner, Christians will adapt universal values and reflect them in Christian understanding and lifestyle. Nation building then takes on a very collective spiritual dimension as well as economic, political and social expressions. The journey from being a fractious people to being a bonded one is very much yet in progress. Nationhood when a people's character remains weak, selfish or exploitative is elusive, or simply not possible.
At the same time, the minority Muslims are not in a position either to build a nation grounded on their belief systems. Already at a disadvantage because of their much smaller numbers, their own lack of accomplishments in their areas of responsibility do not set the kind of examples that could inspire and influence the majority to follow their ways. In the face of all we confront, we are all the more reminded that the game is not so much out there but inside of us. Our divisiveness, our propensity to fend for ourselves instead of for each other, our lack of consistency and perseverance in our work and our goals, our inability to transcend the familial for the social or universal, our political and economic dependence to foreign interests — all these slow us down toward our oneness as a people.
Faith is the nursery of miracles, and people power experiences have shown just how miracles can happen. Our longing for change, our thirst for dignity and nobility, and our journey for nationhood have very material requirements which we must meet.
It is our inner challenge, however, the refinement of our spirituality and the formation of our character that will lead us to building the nation we can be proud of, a future full of hope.

Why nation building is important:
All life forms want a comfortable and happy life. In case of human beings it is a sum of 2 things; personal happiness and better environment.
Personal happiness can be obtained from variety of ways.
Environmental happiness is what I call nation building. It is the environment which makes you feels happy to live in, work in and just be a part of it. This environmental happiness also gives us a sense of belonging, makes us feel proud and give us a sense of ownership. Our pride should be genuine and not out of insecurity. For environmental happiness and nation building we need excellent young people like you.

How can student participate in nation building (personal work, for Environmental Happiness):
Firstly, accept that whatever we are today is because of the country and society. Hence we should give something back to the society. Gratitude is the essence of being human. Half an hour per day (only 2% of the time) should be set aside for society work. Almost 200 hours/year.
Work on anything in which you interact with the surrounding and can help make it better. Thus work for helping needy students, cleaning the surroundings, energy saving etc. can all be part of your work for society. Don’t worry about the outcome. Things will happen. You are doing the society work for your benefit – discipline and discovery. Just trying to conserve energy in whatever way you can, will be a great way of helping society. Keep a daily log of the energy consumed and how you can save it. Even thinking on improving your surroundings, writing about it and telling others is society work.
Be active and this activity will give you a positive frame of mind. Develop a “can do” approach. You should be bubbling with ideas. Best ideas are maximum ideas. Be positive in your approach. Rise above the negative things. Make them irrelevant. This is how nature evolves.

Quaid-e-Azam’s speech on Student’s role in Nation Building:
It is necessary that you and your other fellow students fully understand the implications of the revolutionary change that took place on the birth of Pakistan. We have broken the shackles of slavery; we are now a free people. Our State is our own State. Our Government is our own Government, of the people, responsible to the people of the State and working for the good of the State. Freedom, however, does not mean license. It does not mean that you can now behave just as you please and do what you like, irrespective of the interests of other people or of the State. A great responsibility rests on you and, on the contrary, now more than ever, it is necessary for us to work as a united and disciplined nation. What are now required of us all is constructive spirit and not the militant spirit of the days when we were fighting for our freedom. It is far more difficult to construct than to have a militant spirit for the attainment of freedom. It is easier to go to jail or fight for freedom than to run a Government. Let me tell you something of the difficulties that we have overcome and of the dangers that still lie ahead. Thwarted in their desire to prevent the establishment of Pakistan, our enemies turned their attention to finding ways and means to weaken and destroy us. Thus, hardly had the new State come into being when came the Punjab and Delhi holocaust. Thousands of men, women and children were mercilessly butchered and millions were uprooted from their homes. Over fifty lac of these arrived in the Punjab within a matter of weeks. The care and rehabilitation of these unfortunate refugees, stricken in body and in soul, presented problems, which might well have destroyed many a well-established State. But those of our enemies who had hoped to kill Pakistan at its very inception by these means were disappointed. Not only has Pakistan survived the shock of that upheaval, but also it has emerged stronger, more chastened and better equipped than ever.
My young friends, I would, therefore, like to tell you a few points about which you should be vigilant and beware. Firstly, beware of the fifth columnists among ourselves. Secondly, guard against and weed out selfish people who only wish to exploit you so that they may swim. Thirdly, learn to judge who are really true and really honest and UN-selfish servants of the State who wish to serve the people with heart and soul and support them. Fourthly, consolidate the Muslim League Party, which will serve and build up a really and truly great and glorious Pakistan. Fifthly, the Muslim League has won and established Pakistan and it is the Muslim League whose duty it is now, as custodian of the sacred trust, to construct Pakistan. Sixthly, there may be many who did not lift their fingers to help us in our struggle, nay even opposed us and put obstacle in our great struggle openly and not a few worked in our enemy's camp against us, who may now come forward and put their own attractive slogans, catch-words, ideals and programs before you. But they have yet to prove their bonfires or that there has really been an honest change of heart in them, by supporting and joining the League and working and pressing their views within the League Party organization and not by starting mushroom parties, at this juncture of very great and grave emergency when you know that we are facing external dangers and are called upon to deal with internal complex problems of a far-reaching character affecting the future of seventy millions of people. All this demands complete solidarity, unity and discipline. I assure you,

"Divided you fall. United you stand"

I have had the opportunity of talking to you I must warn you not to allow your actions to be guided by ill-digested information or slogans and catch-words. Do not take them to heart or repeat them parrot-like. Take advantage of your period of training that this institution offers you, by equipping yourself to become leaders of the future generation. There is a common fault with the students against which I must warn you. The students believe that no one can tell them anything which they do not already know. That mentality is harmful and often leads to quite a lot of mischief. But if you want to learn by your own experience, and not by the experience of your elders, let me tell you that as you become older, you will be more ready to learn from your costly experiences and the knock that you shall have received during your lifetime, which will harm you more than anybody else. It demands a broader sense of vision, and greater sense of patriotism.
Finally, I would earnestly advise you to think and act with sobriety and in all humility as selfless and true soldiers of the people, and with absolute loyalty to Pakistan. Remember, you must have patience.
I thank you once more for the honor that you have done me today. I wish you every happiness and success.

How can a student help the society:
The rural population lives in primitive conditions. They use kerosene lanterns for light. They also use biomass in primitive cook stoves which have been used for thousands of years. Modern technology somehow has not touched their lives.
Without these people getting into mainstream, environment cannot be improved. Creation of rural based enterprises is the best bet to create wealth and bring these people into mainstream of development. You will all go and become important people in your own enterprises, in corporate and other sectors. Even if you go abroad think how you can create conditions to improve the lives of these people. Use your considerable clout to create enterprises etc. for these people. This is your contribution to society.

Role of Teacher in Nation Building:
As everyone says that a student is the builder of tomorrow. How many of us have realized the important role of teachers for the betterment of our nation? If I say it right only very few of the thousands of people in the community have realized the great importance of educators so that a developing country could move forward.
If we may compare the educators in third world countries to developed countries of the world we could really find the many differences in as much as the teachers compensation, the government’s support, as well as the response of more parents to help the teachers for the their undertakings for the benefits of many students. The governments in developed countries have been helping the schools so that the benefits of millions of teachers could be given. This is not just some kind of a petty problem because this already involves all the people in many nations of the world.
The sad thing is many leaders know that education could really play a vital role in as far as liberating the people from the bondage of poverty and ignorance but the only problem is the real action. Many leaders did not even bother increasing the compensation of teachers. If a country continues to plunge to poverty, it is because the people continue to cry for good education. Many could not apply for better jobs because of no education.
In many Asian countries many governments are trying to institute measures to give education to their fellowmen a boast. For school, college and university students, the government has also set aside funds for study now pay later programs, cultural and minority scholarship programs for indigenous peoples and other scholarship programs to give access to poor but deserving students.

Tuesday, 1 February 2011

Interrupts in 6809 microprocessor

Interrupts:
The 6809, like most other microprocessors, has instructions and the hardware to handle interrupts. Interrupts are a mechanism for allowing outside events temporarily to divert the micro from its current program. When an interrupt arrives, a call is made to a nominated routine which runs an 'interrupt service routine' ending with a 'return' instruction which returns the micro to the interrupted program. So, an interrupt is just like a subroutine call except that control is not passed explicitly to the routine by the main program, but happens independently of it.
Interrupts are used for infrequent or irregular events which must be acted upon by the processor. The use of interrupts saves having to look periodically to see whether the event has occurred or not. This is known as polling and can tie the micro up for a large proportion of the time, especially if the event is a rare one, like power failure.

Implementation of Interrupts:
Most micros have one or more pins on them devoted to interrupts. A level (usually "0") on one of these pins causes the processor to enter an interrupt service routine (ISR), whose entry address is kept in a special area in memory. This is done by means of something very like a subroutine call; the return address is pushed onto the stack. The routine completes and a return from interrupt instruction is executed, which resumes execution of the interrupted program when a return from interrupt instruction (RTI) is executed. In order to avoid chaos, further interrupts on the same pin are not usually allowed between the arrival of the interrupt and the return from the interrupt routine.
Some processors allow multiple interrupts, which means that one interrupt service routine may itself be interrupted by another ISR. This is known as nesting interrupts. Whether or not an interrupt is serviced at all may be decided by the user, who may disable and enable interrupts, so that they may be ignored if they are not relevant.

Warnings:
Interrupts can be dangerous!! Care must be taken to ensure that interrupts do not corrupt information which is being used by the interrupted routine.
Finally, the cause of an interrupt MUST be cleared (if necessary) by the micro before the RTI instruction is executed, or else the processor will be immediately interrupted again, and you get into a deadlock situation.