How Google Works



People using Google
Torsten Silz/AFP/Getty Images
Fair-goers use laptops at Google's stand at the Frankfurt Book Fair on Oct. 8, 2006. Take a look inside Google.

What began as a project helmed by Larry Page and Sergey Brin, two students in Stanford University's Ph.D. program, is now one of the most influential companies on the World Wide Web: Google. At first, the students' goal was to make an efficient search engine that gave users relevant links in response to search requests. While that's still Google's core purpose today, the company now provides services ranging from e-mail and document storage to productivity software and mobile phone operating systems. In less than a decade, Google evolved from a two-man enterprise to a multibillion-dollar corporation.

Today, Google's popularity continues to grow. In 2007, the company surpassed Microsoft as the most visited site on the Web [source: Kopytoff]. The company's influence on the Web is undeniable. Practically every webmaster wants his or her site listed high on Google's search engine results pages (SERPs), because it almost always translates into more traffic on the corresponding Web site. Google has also acquired other Internet companies, ranging from blogging services to the video-sharing site YouTube. For a while, the company's search technology even powered rival companies' search engines -- Yahoo! relied on Google searches for nearly four years until developing its own search engine technologies in 2004 [sources: Google; Hu and Olsen].

­
More About Google

­Google's influence isn't limited to just the Web. In 2007, company executives announced their intention to enter the FCC's auction of the wireless spectrum in the 700 megahertz (MHz) band. That part of the wireless spectrum previously belonged to analog television broadcasters. Google representatives said the company entered the auction to foster competition within the wireless service industry. Google supported an open technology approach to wireless service in which consumers could use any device with any provider rather than face limited choices determined by the provider and its preferred vendors. In order to participate in the auction, Google had to prove it was ready to meet the reserve price for the spectrum: $4.6 billion. Ultimately, Google didn't win the auction. But the company still achieved its main goal -- Verizon, which won the bid, must follow the open technology approach Google wanted.

How Many Zeros?
Google's name is a variation of the word "googol," which is a mathematical term for a one followed by 100 zeros. Page and Brin felt the name helped illustrate Google's monumental mission: Organizing billions of bytes of data found on the Web.

­In this article, we'll learn about the backbone of Google's business: its search engine. We'll also look at the other services Google offers to both average users and to commercial businesses. Then we'll take a quick peek at some of the tools Google has developed over the years. We'll also learn more about the equipment Google uses to keep its massive operation running. Finally, we'll take a closer look at Google the company.

The Google Search Engine

Does Whatever a Spider Can
A search engine spider does the search engine's grunt work: It scans Web pages and creates indexes of keywords. Once a spider has visited, scanned and categorized a page, it follows links from that page to other sites. The spider will continue to crawl from one site to the next, which means the search engine's index becomes more comprehensive and robust. To learn more about these programs, read How Search Engines Work.

­Google's search engine is a powerful tool. Without search engines like Google, it would be practically impossible to find the information you need when you browse the Web. Like all search engines, Google uses a special algorithm to generate search results. While Google shares general facts about its algorithm, the specifics are a company secret. This helps Google remain competitive with other search engines on the Web and reduces the chance of someone finding out how to abuse the system.

­Google uses automated programs called spiders or crawlers, just like most search engines. Also like other search engines, Google has a large index of keywords and where those words can be found. What sets Google apart is how it ranks search results, which in turn determines the order Google displays results on its search engine results page (SERP). Google uses a trademarked algorithm called PageRank, which assigns each Web page a relevancy score.

A Web page's PageRank depends on a few factors:

  • The frequency and location of keywords within the Web page: If the keyword only appears once within the body of a page, it will receive a low score for that keyword.
  • How long the Web page has existed: People create new Web pages every day, and not all of them stick around for long. Google places more value on pages with an established history.
  • The number of other Web pages that link to the page in question: Google looks at how many Web pages link to a particular site to determine its relevance.

Out of these three factors, the third is the most important. It's easier to understand it with an example. Let's look at a search for the terms "Planet Earth."

As more Web pages link to Discovery's Planet Earth page, the Discovery page's rank increases. When Discovery's page ranks higher than other pages, it shows up at the top of the Google search results page.

Because Google looks at links to a Web page as a vote, it's not easy to cheat the system. The best way to make sure your Web page is high up on Google's search results is to provide great content so that people will link back to your page. The more links your page gets, the higher its PageRank score will be. If you attract the attention of sites with a high PageRank score, your score will grow faster.

Hitting the Links
Google uses lots of tricks to prevent people from cheating the system to get higher placement on SERPs. For example, as a Web page adds links to more sites, its voting power decreases. A Web page that has a high PageRank with lots of outgoing links can have less influence than a lower-ranked page with only one or two outgoing links.

Google initiated an experiment with its search engine in 2008. For the first time, Google is allowing a group of beta testers to change the ranking order of search results. In this experiment, beta testers can promote or demote search results and tailor their search experience so that it's more personally relevant. Google executives say there's no guarantee that the company will ever implement this feature into the search engine globally.­

Google offers many different kinds of services in addition to chat.

Google Services

Google on the Go
You can perform a Google search with any short message service (SMS) compatible cell phone, even if you can't access the Web with your phone. Simply text your query to 466453 (which spells GOOGLE on a phone pad). Google will send a response back within a couple of seconds.

­As Google has grown, the company has added several new services for its users. Some of the services are designed to help make Web searches more efficient and relevant, while others seem to have little in common with search engines. With many of its services, Google has entered into direct competition with other companies.

Google's specialized searches are an extension of its normal search engine protocol. With specialized searches, you can narrow your search to specific resources. You can enter keywords into Google and search for:

  • Images related to your keywords
  • Maps
  • News articles or footage
  • Products or services you can purchase online
  • Blog entries containing the keywords you've chosen
  • Content in books
  • Videos
  • Scholarly papers

For these searches, Google has created specialized indexes that only contain relevant sources. For example, if you search for the term "Planet Earth" in the news category, the results will include only news articles that contain those keywords. The results will look very different from Google's normal SERP.­

In the last few years, Google has unveiled services that don't relate to search engines upon first glance. For example, Google's Gmail is a free Web-based e-mail program. When the service first launched, Google limited the number of users who could create accounts. The first group of users could invite a limited number of people to join the service, and so Gmail invitations became a commodity. Today, anyone can sign up for a free Gmail account.

Gmail
Google's Gmail is now available to all users, but it was once a limited commodity.


Gmail organizes e-mails into conversations. This means that when you send an e-mail to someone and he or she replies, both e-mails are grouped together as a thread in your inbox. This makes it easier to follow the flow of an e-mail exchange. If you reply to your friend's response, Google will attach your message to the bottom of the thread. It's easy to navigate through the e-mail program and follow specific conversations.

Advanced Searches
With an advanced search, you can use Google to retrieve the most relevant results for your keywords. You can search for documents written in a specific language or saved in a particular file format like .pdf or .rtf. You can tell Google where to look for the keywords, such as in page titles or headers. Google even allows you to limit searches to a single domain name. Try typing in "site:howstuffworks.com 'cloud computing'" in the Google search bar to see how it works. Each choice you make tells Google which index to use when returning your search results.

Another free service from Google is Google Docs, a storage database and collaborative productivity software suite. It includes word processing, spreadsheet and presentation programs. Creating a Docs account is free and allows you to store up to 5,000 documents and images online. Each document can be up to 500 kilobytes, and each embedded image can be up to 2 megabytes. You can share documents on Google Docs, which allows your friends to view and make changes to documents. You can also store all of your documents on Google's servers and access them wherever there's an Internet connection.

Google Tools

Google offers a popular tool called Google Maps, an online mapping service similar to MapQuest. Google uses map sources from companies like NAVTEQ and TeleAtlas, as well as satellite data from DigitalGlobe and MDA Federal, to create interactive maps. You can use Google maps to view an address' location or get driving directions to a particular destination.

Google Earth
Image ©Google Earth mapping service/NASA/TerraMetrics 2007
The Google Earth application


Google Maps has several view modes. The map view is a basic road map, satellite view overlays a road map on top of satellite photos of the region, terrain view creates a topographic map with a road map overlay, and the traffic view uses red, yellow and green to indicate congested major roadways in the area. Street view mode is available in several U.S. cities. Selecting street view in such locations as Orlando, Fla., gives you the option to view photos taken from street level. You can navigate through the city by clicking on arrows in the photographs, and you can rotate your view 360 degrees.

Smile, You're on Street View!
Some people feel that Google's street view function is a violation of privacy. For example, homeowners who were behind in their yard work became worried that anyone viewing pictures of their home through Google would see a messy house, making it harder to sell the property in the future. Several individuals and communities have filed lawsuits against Google, demanding that the company remove images of certain areas from street view.

Google Maps can also integrate business information. You can use Google Maps like a search engine to find a business, such as "HowStuffWorks, Atlanta, Ga.," which will show you our office's location. You can also search for general businesses. If you're in the mood to eat sushi in San Francisco, Calif., you can type "sushi, San Francisco," and with a click of the Search button, Google Maps will display a map of the city with several sushi restaurants tagged.

A product related to Google Maps is Google Earth, an interactive digital globe. It uses the same satellite images licensed for Google Maps, but you must download the application and install it on your computer to access all of its functions. Google Earth requires an Internet connection to be fully functional, though you can still view locations on the globe even if you aren't connected. A scaled-back, Web-based version is also available -- you can even embed it in existing Web sites. To learn more about this program, read "How Google Earth Works."

The Google Toolbar is another handy add-on available for Firefox or Internet Explorer users. The toolbar has customizable buttons. Each button maps to a particular function, which can include anything from viewing a Web site's PageRank to translating a word from one language to another.

Google Desktop
The Google Desktop application


Google Desktop
is another application you can download for free. This program lets you search your computer the way you would search the Internet using the Google search engine. You can also choose to download Google Gadgets, computer programs that integrate seamlessly into your desktop. Each gadget does something different. Gadgets include clocks, calendars, news feeds and weather reports.

Search Engine War Still Very Much On

Just the other day, Jonathan Strickland wrote about Google’s Caffeine, and if you missed it, the American search giant is trying to redefine the way it crawls the Web, indexes pages and ranks search results. As Jonathan pointed out, some think that Caffeine is a response to Microsoft Bing, but even as fast as Google moves, it still couldn’t rush a brand new search system to market that quickly. I mean, it was no secret that Microsoft was working to replace Live Search, but similarities between the two systems are likely to be fairly coincidental, unless there was some serious leaking of proprietary information going on.

But why would Google have been working on a new way to rank pages in search? Google’s lead may seem commanding — 65 percent to a combined 28 percent for Yahoo and Microsoft, as The New York Times’ Miguel Helft pointed out — but that’s not the whole story. Helft wrote that ComScore, an organization that tracks online behavior, ranks searcher penetration for Google at 84 percent, to Microsoft/Yahoo’s combined 73 percent. Basically, this says that people use more than one search engine when they work, and apparently people use Google, Yahoo and Microsoft together.

Why bother? It matters. You get different results depending on which you use. Mary Jo Foley at ZDNet wrote about a comparison made by Search Engine Land between Caffeine with regular Google. Video and news results ranked in the middle and lower on the page with the Caffeinated search, when they lurked near the top on the current Google search results page. And on Bing? Foley compared Caffeine to Bing and found that Microsoft’s new decision engine didn’t put any news or blog results at all on the front page. Images and videos ranked near the top. It’s a completely different experience altogether.

Now that I’ve had the opportunity to try Bing, I like it. I also like other search engines and use metasearch engines that aggregate search results from many engines. It’s good to mix things up a bit. I think the winner of the search engine wars is you, because you get to reap the benefits of their competition to be the best.

How eBay Works

ebay logo

In 2004, a South Florida woman listed a partially eaten grilled cheese sandwich on eBay. The sandwich sold to the highest bidder for $28,000. She believed, and showed in the auction's photos, that the sandwich had the image of the Virgin Mary in one of its slices of bread.

EBay is a global phenomenon -- the world's largest garage sale, online shopping center, car dealer and auction site with 147 million registered users in 30 countries as of March 2005. You can find everything from encyclopedias to olives to snow boots to stereos to airplanes for sale. And if you stumble on it before the eBay overseers do, you might even find a human kidney or a virtual date.

In this article, we'll find out how you can buy and sell items on eBay, examine how the bidding process works, look at ways you can protect yourself from auction fraud and take a look at the business and technology of the largest auction site in the world.

eBay Basics

EBay is, first and foremost, an online auction site. You can browse through categories like Antiques, Boats, Clothing & Accessories, Computers & Networking, Jewelry & Watches and Video Games. When you see something you like, you click on the auction title and view the details, including pictures, descriptions, payment options and shipping information. If you have a pretty good idea of what you're looking for, you can search for it using simple keywords, such as "Apple iPod," or using more advanced search criteria that helps narrow the results, such as keywords to exclude, item location, price range and accepted payment methods.


Search results for keyword "Apple iPod"


If you place a bid on an item, you enter a contractual agreement to buy it if you win the auction. All auctions have minimum starting bids, and some have a reserve price -- a secret minimum amount the seller is willing to accept for the item. If the bidding doesn't reach the reserve price, the seller doesn't have to part with the item. In addition to auctions, you can find tons of fixed-price items on eBay that make shopping there just like shopping at any other online marketplace. You see what you like, you buy it, you pay for it and you wait for it to arrive at your door. There are also auction listings that give you the option to "Buy it Now" for a price that's typically higher than the auction's start price. If you choose to buy the item for the "Buy it Now" price instead of bidding on it, the auction ends instantly and the item is yours.


In this auction, the Starting Price is $8.99,
and the Buy it Now price is $9.99.


You can pay for an item on eBay using a variety of methods, including money order, cashier's check, cash, personal check and electronic payment services like PayPal and BidPay. It's up to each seller to decide which payment methods he'll accept. PayPal is the easiest way to buy something on eBay, because eBay owns PayPal. The PayPal payment process is already built into any auction listing on eBay.

Just as you can buy almost anything on eBay, you can sell almost anything, too. Using a simple listing process, you can put all of the junk in your basement up for sale to the highest bidder. Lots of people sell their old laptop once they've upgraded, the clothing their kids have grown out of or the brand new couch they bought on final sale without realizing it wouldn't fit in their den. Some people even make a business of eBay by opening their own "eBay store." When you sell an item on eBay, you pay listing fees and turn over a percentage of the final sale price to eBay.

Once you register (for free) with eBay, you can access all of your eBay buying and selling activities in a single location called "My eBay."

eBay Infrastructure


A series of service disruptions in 1999 caused real problems for eBay's business. Over the course of three days, overloaded servers intermittently shut down, meaning users couldn't check auctions, place bids or complete transactions during that period. Buyers, sellers and eBay were very unhappy, and a complete restructuring of eBay's technological architecture followed.

In 1999, eBay was one massive database server and a few separate systems running the search function. In 2005, eBay is about 200 database servers and 20 search servers.

The architecture is a type of grid computing that allows for both error correction and growth. With the exception of the search function, everything about eBay can actually run on approximately 50 servers -- Web servers, application servers and data-storage systems. Each server has between six and 12 microprocessors. These 50 or so servers run separately, but they talk to each other, so everybody knows if there is a problem somewhere. EBay can simply add servers to the grid as the need arises.


While the majority of the site can run on 50 servers, eBay has four times that. The 200 servers are housed in sets of 50 in four locations, all in the United States. When you're using eBay, you may be talking to any one of those locations at any time -- they all store the same data. If one of the systems crashes, there are three others to pick up the slack.

When you're on the eBay Web site and you click on a listing for a Persian rug, your computer talks to Web servers, which talk to application servers, which pull data from storage servers so you can find out what the latest bid price is and how much time is left in the auction. eBay has local partners in many countries who deliver eBay's static data to cut down on download time, and there are monitoring systems in 45 cities around the world that constantly scan for problems in the network.

This infrastructure lets millions of people search for, buy and sell items simultaneously. On the user end, it all works seamlessly. Let's try it out.

Using eBay: Browsing for Items

The best way to learn how to use eBay is to dive right in. What do you feel like looking for today? A surround-sound system? A mink stole? HowStuffWorks could use a Homer Simpson Pez dispenser. Let's look for one.

There are two ways to go about finding a Homer Simpson Pez dispenser. We can browse, or we can search. Let's start by browsing -- it's the slower, more round-about method, but it's a good way to get a feel for eBay's category system. The most popular categories are listed right on the eBay homepage, on the left side.



Pez dispensers are typically considered collector items, so the Collectibles category is a good place to start browsing. If we click on the Collectibles link on the homepage, we end up at a page listing all of the Collectibles subcategories.



At the very bottom of the page, you can see that there's actually a subcategory called Pez, Keychains, Promo Glasses, and within that subcategory is another subcategory called Pez.



That seems like a good fit. Clicking on "Pez" brings us to an auction-level page:



On this page, you can see that:

  • There are 3,355 listings in the Pez category.
  • The listings are currently sorted by time, with the newest auctions first.
  • We can search within Pez listings.

Since we're looking specifically for a Homer Simpson Pez dispenser, "Homer Simpson" is a good term to use to narrow the results. If we enter "Homer Simpson" in the search box directly above the listing, it's only going to search the Pez subcategory, not all of eBay (although you can search all of eBay using a dropdown menu in the category field). Here's what comes up:



Thirteen items isn't bad, but we might be able to find more. When you enter a search term and there are fewer results than you'd like, the first thing to do is go back up to the search field and check the box for "Search title and description." The first search we did checked only the auction titles for the term "Homer Simpson." Searching only titles is a good way to narrow your results if you know exactly what you're looking for and what most people call it -- for example, if you're looking for a GPS receiver, it's a pretty safe bet that anyone selling one would put "GPS" in the title. On the other hand, someone selling a Homer Simpson Pez dispenser might not put "Homer Simpson" in the title -- she might put "Simpsons" or only "Homer." So now we're going to search entire auction descriptions, which typically returns more results:



We now have 23 listings to look through. But there is a much faster way to get to the place we've ended up at. If you're just looking for a bargain on some type of collectible, browsing is the way to go; but if you're looking for something specific, the eBay search function is the quickest way to it.

Using eBay: Searching for Items

At the top of the eBay homepage, there's a search box where we can enter what we're looking for.



Here's what comes up in our simple keyword search:


Our simple keyword search delivered nine matches.


When you do a simple search, the auction results page also tells you which categories your results are in. You'll notice that there are matches for Homer Simpson Pez dispensers in other places besides the Pez category. So when we search both titles and descriptions, we end up with 25 results -- more than we did when we were browsing.

There's a listing about halfway down the page for a full set of Simpsons Pez dispensers, including Homer, with a starting price of just 99 cents.



That seems like a good deal. Here's the top of the auction page, where you'll find the basic auction stats:



The starting price is low, the shipping price is reasonable, and the seller has 99.6% positive feedback. Always check the shipping price, as some sellers mislead buyers by selling the item for cheap and then making up the difference by severely overcharging for shipping, and always check the seller feedback. The feedback is how you know if you can trust the seller (and your feedback is how the seller knows he can trust you). We'll talk more about feedback in the next section, but for now, we just need to know that 99.6% positive feedback is a good sign.

Since we're interested in this auction, we'll click on "Watch this item in My eBay" (top right of the auction page) so we can get back to it easily.

Using eBay: Buying Items

To look for an item, you don't need to register -- you can browse, search and watch items (up to 10) as a guest. You can't bid or buy as a guest, though. So the next step is to register with eBay here. It's quick and free.

Now we can place a bid on the set of Simpsons Pez dispensers. If we click on the link in our watch list, we end up back at the auction page. There are four main sections to any auction page:

  • Title/Overview - This is where you see the basic information, like auction title, price, shipping price, seller information and how many bids have been placed so far.


  • Description - This is where the seller provides details about the item.


  • Shipping, payment and return policy - This is where you can find full shipping information, any details the seller wants a bidder to know about making payment (including which methods are accepted) and what the seller's return policy is.


  • Bidding - This is where you place a bid on the item.



eBay's bidding process works like this: You enter the maximum amount you are willing to pay for the item, and eBay bids incrementally on your behalf until the bidding reaches the maximum amount you entered. So if we decide we are willing to pay $2.00 for this set of Pez dispensers, we enter $2.00 in the bid slot.



When we click "Place bid," the next screen is a confirmation screen where we can see the bid price and commit to it. Once we place and confirm our bid, here's what the auction page looks like:


We are now the current high bidder.


The top portion of the page with the blue background is for our eyes only -- no one else can see what our maximum bid is. Why is the current price $0.99 and not $2.00? It's because when you're the first bidder, no matter what you enter as your maximum price, your first bid is always the starting price. If someone bids against us, eBay will bid on our behalf up to $2.00 in $0.05 increments (low-price auctions use very small increments, while high price auctions use larger increments). So if another user comes along and enters $1.25 as his maximum, eBay will bid $1.31 on our behalf, and we'll still be winning. But if another user places a maximum bid of $2.01, we've been outbid (and eBay will send us an e-mail to this effect in case we're not watching the auction). At this point, if we still want these Pez dispensers, we have to enter a new maximum bid.

This is where eBay's bidding process doesn't work exactly like it's supposed to -- and starts to get exciting. If every bidder truly entered the maximum he was willing to pay, auctions would end with little fanfare. The person who entered the highest maximum bid would quietly win. But humans being human, the actual maximum amount they're willing to pay is usually "a tiny bit more than what everyone who's bidding against me is willing to pay." If we still want our Pez dispensers, we'll enter a new maximum bid of, say, $3.00; and as long as the other bidder's maximum amount is less than $3.00, we'll be winning the auction again. Our coup might be temporary, though, because if the other bidder wants these Pez dispensers as much as we do, he's going to bid again until he outbids our maximum. And now we have a bidding war.

Bidding wars are a rush -- and they're sometimes very expensive. If this war continues for the three days until the auction ends, we could end up paying a hundred bucks for these Pez dispensers. It happens. The adrenaline takes over and people start bidding to win -- not necessarily to win a few Pez dispensers, just to WIN. For this reason, most of the bidding happens in the last two minutes of an auction. People wait to place a bid until an auction is about to close -- this way, they can catch other bidders off guard, and hopefully no one will get the chance to outbid them. The last 10 seconds of a bidding war often becomes a battle of bandwidth. Someone using a dial-up connection will never be able to place a winning bid in 10 seconds. Someone using a cable modem can place a winning bid in two seconds.

There is at least one reason why someone would place a bid very early in the auction: to remove a "Buy it Now" option. Remember that when an auction item also has a "Buy it Now" option, if someone decides to "Buy it Now" the auction is over. But the opposite is also true: As soon as someone bids on the item, the "Buy it Now" option disappears. If someone comes across an item she wants but she's not willing to pay the "Buy it Now" price, she'll enter the minimum starting bid just so another user doesn't come along and buy it out from under her.

How Microprocessors Work

The computer you are using to read this page uses a microprocessor to do its work. The microprocessor is the heart of any normal computer, whether it is a desktop machine, a server or a laptop. The microprocessor you are using might be a Pentium, a K6, a PowerPC, a Sparc or any of the many other brands and types of microprocessors, but they all do approximately the same thing in approximately the same way.

A microprocessor -- also known as a CPU or central processing unit -- is a complete computation engine that is fabricated on a single chip. The first microprocessor was the Intel 4004, introduced in 1971. The 4004 was not very powerful -- all it could do was add and subtract, and it could only do that 4 bits at a time. But it was amazing that everything was on one chip. Prior to the 4004, engineers built computers either from collections of chips or from discrete components (transistors wired one at a time). The 4004 powered one of the first portable electronic calculators


­ If you have ever wondered what the microprocessor in your computer is doing, or if you have ever wondered about the differences between types of microprocessors, then read on. In this article, you will learn how fairly simple digital logic techniques allow a computer to do its job, whether its playing a game or spell checking a document!

Microprocessor Progression: Intel

Intel 8080
The Intel 8080 was the first microprocessor in a home computer.
The first microprocessor to make it into a home computer was the Intel 8080, a complete 8-bit computer on one chip, introduced in 1974. The first microprocessor to make a real splash in the market was the Intel 8088, introduced in 1979 and incorporated into the IBM PC (which first appeared around 1982). If you are familiar with the PC market and its history, you know that the PC market moved from the 8088 to the 80286 to the 80386 to the 80486 to the Pentium to the Pentium II to the Pentium III to the Pentium 4. All of these microprocessors are made by Intel and all of them are improvements on the basic design of the 8088. The Pentium 4 can execute any piece of code that ran on the original 8088, but it does it about 5,000 times faster!

The following table helps you to understand the differences between the different processors that Intel has introduced over the years.


on about this table:
    What's a Chip?
    A chip is also called an integrated circuit. Generally it is a small, thin piece of silicon onto which the transistors making up the microprocessor have been etched. A chip might be as large as an inch on a side and can contain tens of millions of transistors. Simpler processors might consist of a few thousand transistors etched onto a chip just a few millimeters square.

  • The date is the year that the processor was first introduced. Many processors are re-introduced at higher clock speeds for many years after the original release date.
  • Transistors is the number of transistors on the chip. You can see that the number of transistors on a single chip has risen steadily over the years.
  • Microns is the width, in microns, of the smallest wire on the chip. For comparison, a human hair is 100 microns thick. As the feature size on the chip goes down, the number of transistors rises.
  • Clock speed is the maximum rate that the chip can be clocked at. Clock speed will make more sense in the next section.
  • Data Width is the width of the ALU. An 8-bit ALU can add/subtract/multiply/etc. two 8-bit numbers, while a 32-bit ALU can manipulate 32-bit numbers. An 8-bit ALU would have to execute four instructions to add two 32-bit numbers, while a 32-bit ALU can do it in one instruction. In many cases, the external data bus is the same width as the ALU, but not always. The 8088 had a 16-bit ALU and an 8-bit bus, while the modern Pentiums fetch data 64 bits at a time for their 32-bit ALUs.
  • MIPS stands for "millions of instructions per second" and is a rough measure of the performance of a CPU. Modern CPUs can do so many different things that MIPS ratings lose a lot of their meaning, but you can get a general sense of the relative power of the CPUs from this column.
From this table you can see that, in general, there is a relationship between clock speed and MIPS. The maximum clock speed is a function of the manufacturing process and delays within the chip. There is also a relationship between the number of transistors and MIPS. For example, the 8088 clocked at 5 MHz but only executed at 0.33 MIPS (about one instruction per 15 clock cycles). Modern processors can often execute at a rate of two instructions per clock cycle.

Microprocessor Logic


Photo courtesy Intel Corporation
Intel Pentium 4 processor
To understand how a microprocessor works, it is helpful to look inside and learn about the logic used to create one. In the process you can also learn about assembly language -- the native language of a microprocessor -- and many of the things that engineers can do to boost the speed of a processor.

A microprocessor executes a collection of machine instructions that tell the processor what to do. Based on the instructions, a microprocessor does three basic things:

  • Using its ALU (Arithmetic/Logic Unit), a microprocessor can perform mathematical operations like addition, subtraction, multiplication and division. Modern microprocessors contain complete floating point processors that can perform extremely sophisticated operations on large floating point numbers.
  • A microprocessor can move data from one memory location to another.
  • A microprocessor can make decisions and jump to a new set of instructions based on those decisions.
There may be very sophisticated things that a microprocessor does, but those are its three basic activities. The following diagram shows an extremely simple microprocessor capable of doing those three things:


This is about as simple as a microprocessor gets. This microprocessor has:

  • An address bus (that may be 8, 16 or 32 bits wide) that sends an address to memory
  • A data bus (that may be 8, 16 or 32 bits wide) that can send data to memory or receive data from memory
  • An RD (read) and WR (write) line to tell the memory whether it wants to set or get the addressed location
  • A clock line that lets a clock pulse sequence the processor
  • A reset line that resets the program counter to zero (or whatever) and restarts execution
Let's assume that both the address and data buses are 8 bits wide in this example.

Here are the components of this simple microprocessor:

  • Registers A, B and C are simply latches made out of flip-flops. (See the section on "edge-triggered latches" in How Boolean Logic Works for details.)
  • The address latch is just like registers A, B and C.
  • The program counter is a latch with the extra ability to increment by 1 when told to do so, and also to reset to zero when told to do so.
  • The ALU could be as simple as an 8-bit adder (see the section on adders in How Boolean Logic Works for details), or it might be able to add, subtract, multiply and divide 8-bit values. Let's assume the latter here.
  • The test register is a special latch that can hold values from comparisons performed in the ALU. An ALU can normally compare two numbers and determine if they are equal, if one is greater than the other, etc. The test register can also normally hold a carry bit from the last stage of the adder. It stores these values in flip-flops and then the instruction decoder can use the values to make decisions.
  • There are six boxes marked "3-State" in the diagram. These are tri-state buffers. A tri-state buffer can pass a 1, a 0 or it can essentially disconnect its output (imagine a switch that totally disconnects the output line from the wire that the output is heading toward). A tri-state buffer allows multiple outputs to connect to a wire, but only one of them to actually drive a 1 or a 0 onto the line.
  • The instruction register and instruction decoder are responsible for controlling all of the other components.
Helpful Articles
If you are new to digital logic, you may find the following articles helpful in understanding this section:

  • How Bytes and Bits Work
  • How Boolean Logic Works
  • How Electronic Gates Work
  • Although they are not shown in this diagram, there would be control lines from the instruction decoder that would:
    • Tell the A register to latch the value currently on the data bus
    • Tell the B register to latch the value currently on the data bus
    • Tell the C register to latch the value currently output by the ALU
    • Tell the program counter register to latch the value currently on the data bus
    • Tell the address register to latch the value currently on the data bus
    • Tell the instruction register to latch the value currently on the data bus
    • Tell the program counter to increment
    • Tell the program counter to reset to zero
    • Activate any of the six tri-state buffers (six separate lines)
    • Tell the ALU what operation to perform
    • Tell the test register to latch the ALU's test bits
    • Activate the RD line
    • Activate the WR line
    Coming into the instruction decoder are the bits from the test register and the clock line, as well as the bits from the instruction register.

    Microprocessor Memory

    The previous section talked about the address and data buses, as well as the RD and WR lines. These buses and lines connect either to RAM or ROM -- generally both. In our sample microprocessor, we have an address bus 8 bits wide and a data bus 8 bits wide. That means that the microprocessor can address (28) 256 bytes of memory, and it can read or write 8 bits of the memory at a time. Let's assume that this simple microprocessor has 128 bytes of ROM starting at address 0 and 128 bytes of RAM starting at address 128.


    ROM chip

    ROM stands for read-only memory. A ROM chip is programmed with a permanent collection of pre-set bytes. The address bus tells the ROM chip which byte to get and place on the data bus. When the RD line changes state, the ROM chip presents the selected byte onto the data bus.


    RAM chip
    RAM stands for random-access memory. RAM contains bytes of information, and the microprocessor can read or write to those bytes depending on whether the RD or WR line is signaled. One problem with today's RAM chips is that they forget everything once the power goes off. That is why the computer needs ROM.

    By the way, nearly all computers contain some amount of ROM (it is possible to create a simple computer that contains no RAM -- many microcontrollers do this by placing a handful of RAM bytes on the processor chip itself -- but generally impossible to create one that contains no ROM). On a PC, the ROM is called the BIOS (Basic Input/Output System). When the microprocessor starts, it begins executing instructions it finds in the BIOS. The BIOS instructions do things like test the hardware in the machine, and then it goes to the hard disk to fetch the boot sector (see How Hard Disks Work for details). This boot sector is another small program, and the BIOS stores it in RAM after reading it off the disk. The microprocessor then begins executing the boot sector's instructions from RAM. The boot sector program will tell the microprocessor to fetch something else from the hard disk into RAM, which the microprocessor then executes, and so on. This is how the microprocessor loads and executes the entire operating system.


    Microprocessor Instructions

    Even the incredibly simple microprocessor shown in the previous example will have a fairly large set of instructions that it can perform. The collection of instructions is implemented as bit patterns, each one of which has a different meaning when loaded into the instruction register. Humans are not particularly good at remembering bit patterns, so a set of short words are defined to represent the different bit patterns. This collection of words is called the assembly language of the processor. An assembler can translate the words into their bit patterns very easily, and then the output of the assembler is placed in memory for the microprocessor to execute.

    Here's the set of assembly language instructions that the designer might create for the simple microprocessor in our example:

    • LOADA mem - Load register A from memory address
    • LOADB mem - Load register B from memory address
    • CONB con - Load a constant value into register B
    • SAVEB mem - Save register B to memory address
    • SAVEC mem - Save register C to memory address
    • ADD - Add A and B and store the result in C
    • SUB - Subtract A and B and store the result in C
    • MUL - Multiply A and B and store the result in C
    • DIV - Divide A and B and store the result in C
    • COM - Compare A and B and store the result in test
    • JUMP addr - Jump to an address
    • JEQ addr - Jump, if equal, to address
    • JNEQ addr - Jump, if not equal, to address
    • JG addr - Jump, if greater than, to address
    • JGE addr - Jump, if greater than or equal, to address
    • JL addr - Jump, if less than, to address
    • JLE addr - Jump, if less than or equal, to address
    • STOP - Stop execution
    If you have read How C Programming Works, then you know that this simple piece of C code will calculate the factorial of 5 (where the factorial of 5 = 5! = 5 * 4 * 3 * 2 * 1 = 120):

      a=1;
      f=1;
      while (a <= 5)
      {
      f = f * a;
      a = a + 1;
      }

    At the end of the program's execution, the variable f contains the factorial of 5.

    Assembly Language
    A C compiler translates this C code into assembly language. Assuming that RAM starts at address 128 in this processor, and ROM (which contains the assembly language program) starts at address 0, then for our simple microprocessor the assembly language might look like this:

      // Assume a is at address 128
      // Assume F is at address 129
      0 CONB 1 // a=1;
      1 SAVEB 128
      2 CONB 1 // f=1;
      3 SAVEB 129
      4 LOADA 128 // if a > 5 the jump to 17
      5 CONB 5
      6 COM
      7 JG 17
      8 LOADA 129 // f=f*a;
      9 LOADB 128
      10 MUL
      11 SAVEC 129
      12 LOADA 128 // a=a+1;
      13 CONB 1
      14 ADD
      15 SAVEC 128
      16 JUMP 4 // loop back to if
      17 STOP

    ROM
    So now the question is, "How do all of these instructions look in ROM?" Each of these assembly language instructions must be represented by a binary number. For the sake of simplicity, let's assume each assembly language instruction is given a unique number, like this:

    • LOADA - 1
    • LOADB - 2
    • CONB - 3
    • SAVEB - 4
    • SAVEC mem - 5
    • ADD - 6
    • SUB - 7
    • MUL - 8
    • DIV - 9
    • COM - 10
    • JUMP addr - 11
    • JEQ addr - 12
    • JNEQ addr - 13
    • JG addr - 14
    • JGE addr - 15
    • JL addr - 16
    • JLE addr - 17
    • STOP - 18
    The numbers are known as opcodes. In ROM, our little program would look like this:

      // Assume a is at address 128
      // Assume F is at address 129
      Addr opcode/value
      0 3 // CONB 1
      1 1
      2 4 // SAVEB 128
      3 128
      4 3 // CONB 1
      5 1
      6 4 // SAVEB 129
      7 129
      8 1 // LOADA 128
      9 128
      10 3 // CONB 5
      11 5
      12 10 // COM
      13 14 // JG 17
      14 31
      15 1 // LOADA 129
      16 129
      17 2 // LOADB 128
      18 128
      19 8 // MUL
      20 5 // SAVEC 129
      21 129
      22 1 // LOADA 128
      23 128
      24 3 // CONB 1
      25 1
      26 6 // ADD
      27 5 // SAVEC 128
      28 128
      29 11 // JUMP 4
      30 8
      31 18 // STOP

    You can see that seven lines of C code became 18 lines of assembly language, and that became 32 bytes in ROM.

    Decoding
    The instruction decoder needs to turn each of the opcodes into a set of signals that drive the different components inside the microprocessor. Let's take the ADD instruction as an example and look at what it needs to do:

    1. During the first clock cycle, we need to actually load the instruction. Therefore the instruction decoder needs to:
      • activate the tri-state buffer for the program counter
      • activate the RD line
      • activate the data-in tri-state buffer
      • latch the instruction into the instruction register
    2. During the second clock cycle, the ADD instruction is decoded. It needs to do very little:
      • set the operation of the ALU to addition
      • latch the output of the ALU into the C register
    3. During the third clock cycle, the program counter is incremented (in theory this could be overlapped into the second clock cycle).
    Every instruction can be broken down as a set of sequenced operations like these that manipulate the components of the microprocessor in the proper order. Some instructions, like this ADD instruction, might take two or three clock cycles. Others might take five or six clock cycles.

    Microprocessor Performance and Trends

    The number of transistors available has a huge effect on the performance of a processor. As seen earlier, a typical instruction in a processor like an 8088 took 15 clock cycles to execute. Because of the design of the multiplier, it took approximately 80 cycles just to do one 16-bit multiplication on the 8088. With more transistors, much more powerful multipliers capable of single-cycle speeds become possible.

    More transistors also allow for a technology called pipelining. In a pipelined architecture, instruction execution overlaps. So even though it might take five clock cycles to execute each instruction, there can be five instructions in various stages of execution simultaneously. That way it looks like one instruction completes every clock cycle.

    Many modern processors have multiple instruction decoders, each with its own pipeline. This allows for multiple instruction streams, which means that more than one instruction can complete during each clock cycle. This technique can be quite complex to implement, so it takes lots of transistors.

    Trends
    The trend in processor design has primarily been toward full 32-bit ALUs with fast floating point processors built in and pipelined execution with multiple instruction streams. The newest thing in processor design is 64-bit ALUs, and people are expected to have these processors in their home PCs in the next decade. There has also been a tendency toward special instructions (like the MMX instructions) that make certain operations particularly efficient, and the addition of hardware virtual memory support and L1 caching on the processor chip. All of these trends push up the transistor count, leading to the multi-million transistor powerhouses available today. These processors can execute about one billion instructions per second!

    64-bit Microprocessors

    Sixty-four-bit processors have been with us since 1992, and in the 21st century they have started to become mainstream. Both Intel and AMD have introduced 64-bit chips, and the Mac G5 sports a 64-bit processor. Sixty-four-bit processors have 64-bit ALUs, 64-bit registers, 64-bit buses and so on.


    Photo courtesy AMD

    One reason why the world needs 64-bit processors is because of their enlarged address spaces. Thirty-two-bit chips are often constrained to a maximum of 2 GB or 4 GB of RAM access. That sounds like a lot, given that most home computers currently use only 256 MB to 512 MB of RAM. However, a 4-GB limit can be a severe problem for server machines and machines running large databases. And even home machines will start bumping up against the 2 GB or 4 GB limit pretty soon if current trends continue. A 64-bit chip has none of these constraints because a 64-bit RAM address space is essentially infinite for the foreseeable future -- 2^64 bytes of RAM is something on the order of a billion gigabytes of RAM.

    With a 64-bit address bus and wide, high-speed data buses on the motherboard, 64-bit machines also offer faster I/O (input/output) speeds to things like hard disk drives and video cards. These features can greatly increase system performance.

    Servers can definitely benefit from 64 bits, but what about normal users? Beyond the RAM solution, it is not clear that a 64-bit chip offers "normal users" any real, tangible benefits at the moment. They can process data (very complex data features lots of real numbers) faster. People doing video editing and people doing photographic editing on very large images benefit from this kind of computing power. High-end games will also benefit, once they are re-coded to take advantage of 64-bit features. But the average user who is reading e-mail, browsing the Web and editing Word documents is not really using the processor in that way.



    How WiFi Detectors Work

    Hotspot: This trendy term has taken the Internet-addicted population by storm. If you're not very tech-savvy and aren't familiar with it, take a look when you stroll by cafes and restaurants or the next time you go to the airport. You'll probably see signs letting people know that the location is a WiFi hotspot. You'll also probably notice several preoccupied people with noses buried in their laptops. A WiFi hotspot is simply a place where you can access wireless Internet. In the past few years, WiFi access has seeped into more and more places and facilities.

    WiFi access has become so prevalent that it's turned many people into laptop-toting, Internet hunters on the prowl for a signal everywhere they travel. When they reach a place that fits the typical characteristics -- sells books or coffee and has tables or comfy chairs -- they can pretty safely expect to find a WiFi signal. But now that many buildings, college campuses and other kinds of facilities are adopting WiFi, the hunt for a signal is getting more interesting.

    More Travel Gadgets

    ­Unlike coffee shops that want to attract more customers, other facilities may not make it very obvious if they have a WiFi signal. In this way, the search has become more challenging. There's nothing more frustrating than taking o­ut and booting up your laptop only to find that there's no signal. You'll have to pack up all your stuff, move on and try again. Some poor souls desperate for a signal will wander aimlessly with their laptops open waiting for a sign of wireless life.

    After all this rigmarole, you've wasted time, patience and precious laptop battery power. Fortunately, however, there's an alternative. Certain devices have emerged that will help relieve the wandering wireless syndrome: WiFi detectors. Next, we'll explore the technology behind these useful travel gadgets.


    Mechanics of WiFi Detectors

    mechanics of wifi detectors
    ©iStockPhoto/sambrogio
    This wireless router emits a signal that a WiFi detector is tuned to pick up.

    A wireless signal can travel only so far. Specifically, a typic­al signal can extend as far as 1,000 feet (304.8 meters) in an unobstructed, open area and about 300 feet (91.44 meters) in a closed area that has obstructions [source: Graves]. Because the signals themselves are invisible and the access points (routers) that emit them are usually hidden, a WiFi detector can be a handy tool. WiFi detectors are basically just gadgets that can quickly and easily tell you whether you're around a WiFi signal.

    Before we can understand the mechanics of WiFi detectors, let's take a quick look at wireless Internet. Although wireless Internet travels in waves similar to radio waves, it travels on very different frequencies. It actually travels on frequencies significantly higher than those of other common devices, such as cell phones. These frequencies that carry wireless Internet fall into the ranges of 2.4 GHz or 5 GHz, depending on the standard used.

    In order to standardize the wireless Internet process, a group called the Institute of Electrical and Electronics Engineers (IEEE) has specified 802.11 as the group of networking standards it uses. Such standards specify how data travels through the waves. Different letter-signifiers further specify the set of standards. Some common ones are 802.11b and 802.11g, both of which use the 2.4-GHz band. Within the 2.4-GHz band, you have specific channels. In the United States, wireless Internet has 11 available channels on the 2.4-GHz band (other countries may have fewer or as many as 14).

    Why WiFi?
    The name "WiFi" doesn't really stand for anything. Rather, it's a play on the term "hi-fi," which stands for high fidelity, an audio term for music recordings that faithfully recreate the sound of original performances.

    The detector's job is to pick up on the waves with frequencies meant for transmitting wireless Internet. To accomplish this task, the antenna must be designed to receive the right kind of signals. Much like the antenna on your car radio is tuned to pick up on a specific range of frequencies (and not, say, frequencies that carry police communications), the antenna on a WiFi detector is tuned to pick up only on the specific band that carries wireless Internet. If you examine the specifics of detectors, many will list that they're meant for picking up 802.11b and 802.11g networks.

    Antennas alone, however, wouldn't make very useful travel gadgets. A detector must have some sort of interface for alerting you when it does pick up on the right signals. Many will also gauge just how strong the signal is and convey that to you. In addition, many modern WiFi detectors also come with processers that allow them to demodulate (or process) the data to give you some valuable information before you decide to set up camp with your laptop.

    Using WiFi Detectors

    using wifi detectors
    Image courtesy Targus
    Some WiFi detectors are small and light enough to use on a keychain.

    As we mentioned, all WiFi detectors have interfaces that somehow inform you if a wireless signal is present. Apart from this basic function, however, all detectors are different. Manufacturers have come up with many methods for conveying the information to the user, and some of these gadgets are able to provide more information than others.

    Many use LED lights, for instance. These typically light up in a scale fashion, where a single light indicates a weak signal, and more light up in sequence as the signal gets stronger. More advanced detectors use an LCD screen to display some useful information. Not only will it tell you the degree of signal strength, but perhaps also the SSID (Service Set Identifier), which is basically the name of the network. This would alert you to whether the wireless signal it's picking up is coming from your own home network or the neighbor's.

    Detectors might also list the operating channel on which the network is working. This is helpful for reducing interference. It turns out that multiple networks working within the same proximity in the 2.4-GHz band can cause interference for each other. If you remember from the previous page, the 2.4-GHz band has 11 available channels in the United States. Interference can be reduced by spreading WiFi networks farther apart across the channel numbers. Thus, if your detector informs you that your neighbor's network is using channel 6, tune your router to channel 1 or 11.

    When using WiFi detectors, remember that they run on batteries (usually AAA), so don't leave them on when you're not using them. Many include an indicator of battery that lets you know if it's in need of a replacement soon. Some actually have different settings that allow you to control the battery consumption or let you plug into your computer's USB port to charge [source: Dickey].

    Sending Fashion Signals
    One of the most interesting applications for this Internet-hunting technology has to be the WiFi-detecting T-shirt. This shirt has light-up features that depict the strength of nearby 802.11b and 802.11g networks [source: ThinkGeek].

    ­Another helpful feature is that some detectors can tell you if the signal is encrypted (secured). If it's encrypted, you'll need a password to use it. Unfortunately, some people who travel around looking for unencrypted wireless signals might use this feature against you. When you leave your network unencrypted, freeloaders might snoop into your Internet activities or perform illegal downloads (such as music sharing). Authorities looking for the perpetrators could trace these downloads to your network, and you could get wrapped up in legal frustrations even if they can't ultimately pin the fault on you. So, it's important to keep your wireless network secure and encrypted with password protection.

    Overall, when you travel with a laptop, a WiFi detector can be one of the handiest travel gadgets to bring with you. You can even get a small keychain version to ensure you never leave home without it.


    How Web Servers Work

    Have you ever wondered about the mechanisms that delivered this page to you? Chances are you are sitting at a computer right now, viewing this page in a browser. So, when you clicked on the link for this page, or typed in its URL (uniform resource locator), what happened behind the scenes to bring this page onto your screen?

    If you've ever been curious about the process, or have ever wanted to know some of the specific mechanisms that allow you to surf the Internet, then read on. In this article, you will learn how Web servers bring pages into your home, school or office. Let's get started!


    The Basic Process

    Quiz Corner
    How much you know about web servers and what they do? Test your knowledge with our Web Server Quiz!

    Let's say that you are sitting at your computer, surfing the Web, and you get a call from a friend who says, "I just read a great article! Type in this URL and check it out. It's at http://www.howstuffworks.com/web-server.htm." So you type that URL into your browser and press return. And magically, no matter where in the world that URL lives, the page pops up on your screen.

    At the most basic level possible, the following diagram shows the steps that brought that page to your screen:


    Your browser formed a connection to a Web server, requested a page and received it.

    Behind the Scenes

    If you want to get into a bit more detail on the process of getting a Web page onto your computer screen, here are the basic steps that occurred behind the scenes:
    • The browser broke the URL into three parts:
      1. The protocol ("http")
      2. The server name ("www.howstuffworks.com")
      3. The file name ("web-server.htm")

    • The browser communicated with a name server to translate the server name "www.howstuffworks.com" into an IP Address, which it uses to connect to the server machine.

    • The browser then formed a connection to the server at that IP address on port 80. (We'll discuss ports later in this article.)

    • Following the HTTP protocol, the browser sent a GET request to the server, asking for the file "http://www.howstuffworks.com/web-server.htm." (Note that cookies may be sent from browser to server with the GET request -- see How Internet Cookies Work for details.)

    • The server then sent the HTML text for the Web page to the browser. (Cookies may also be sent from server to browser in the header for the page.)

    • The browser read the HTML tags and formatted the page onto your screen.
    If you've never explored this process before, that's a lot of new vocabulary. To understand this whole process in detail, you need to learn about IP addresses, ports, protocols... The following sections will lead you through a complete explanation.

    The Internet

    So what is "the Internet"? The Internet is a gigantic collection of millions of computers, all linked together on a computer network. The network allows all of the computers to communicate with one another. A home computer may be linked to the Internet using a phone-line modem, DSL or cable modem that talks to an Internet service provider (ISP). A computer in a business or university will usually have a network interface card (NIC) that directly connects it to a local area network (LAN) inside the business. The business can then connect its LAN to an ISP using a high-speed phone line like a T1 line. A T1 line can handle approximately 1.5 million bits per second, while a normal phone line using a modem can typically handle 30,000 to 50,000 bits per second.

    ISPs then connect to larger ISPs, and the largest ISPs maintain fiber-optic "backbones" for an entire nation or region. Backbones around the world are connected through fiber-optic lines, undersea cables or satellite links (see An Atlas of Cyberspaces for some interesting backbone maps). In this way, every computer on the Internet is connected to every other computer on the Internet.




    Clients and Servers

    In general, all of the machines on the Internet can be categorized as two types: servers and clients. Those machines that provide services (like Web servers or FTP servers) to other machines are servers. And the machines that are used to connect to those services are clients. When you connect to Yahoo! at www.yahoo.com to read a page, Yahoo! is providing a machine (probably a cluster of very large machines), for use on the Internet, to service your request. Yahoo! is providing a server. Your machine, on the other hand, is probably providing no services to anyone else on the Internet. Therefore, it is a user machine, also known as a client. It is possible and common for a machine to be both a server and a client, but for our purposes here you can think of most machines as one or the other.

    A server machine may provide one or more services on the Internet. For example, a server machine might have software running on it that allows it to act as a Web server, an e-mail server and an FTP server. Clients that come to a server machine do so with a specific intent, so clients direct their requests to a specific software server running on the overall server machine. For example, if you are running a Web browser on your machine, it will most likely want to talk to the Web server on the server machine. Your Telnet application will want to talk to the Telnet server, your e-mail application will talk to the e-mail server, and so on...


    IP Addresses

    To keep all of these machines straight, each machine on the Internet is assigned a unique address called an IP address. IP stands for Internet protocol, and these addresses are 32-bit numbers, normally expressed as four "octets" in a "dotted decimal number." A typical IP address looks like this:

              216.27.61.137
    

    The four numbers in an IP address are called octets because they can have values between 0 and 255, which is 28 possibilities per octet.

    Every machine on the Internet has a unique IP address. A server has a static IP address that does not change very often. A home machine that is dialing up through a modem often has an IP address that is assigned by the ISP when the machine dials in. That IP address is unique for that session -- it may be different the next time the machine dials in. This way, an ISP only needs one IP address for each modem it supports, rather than for each customer.

    If you are working on a Windows machine, you can view a lot of the Internet information for your machine, including your current IP address and hostname, with the command WINIPCFG.EXE (IPCONFIG.EXE for Windows 2000/XP). On a UNIX machine, type nslookup at the command prompt, along with a machine name, like www.howstuffworks.com -- e.g. "nslookup www.howstuffworks.com" -- to display the IP address of the machine, and you can use the command hostname to learn the name of your machine. (For more information on IP addresses, see IANA.)

    As far as the Internet's machines are concerned, an IP address is all you need to talk to a server. For example, in your browser, you can type the URL http://209.116.69.66 and arrive at the machine that contains the Web server for HowStuffWorks. On some servers, the IP address alone is not sufficient, but on most large servers it is --

    Domain Names

    Because most people have trouble remembering the strings of numbers that make up IP addresses, and because IP addresses sometimes need to change, all servers on the Internet also have human-readable names, called domain names. For example, www.howstuffworks.com is a permanent, human-readable name. It is easier for most of us to remember www.howstuffworks.com than it is to remember 209.116.69.66.

    The name www.howstuffworks.com actually has three parts:

    1. The host name ("www")
    2. The domain name ("howstuffworks")
    3. The top-level domain name ("com")
    Domain names within the ".com" domain are managed by the registrar called VeriSign. VeriSign also manages ".net" domain names. Other registrars (like RegistryPro, NeuLevel and Public Interest Registry) manage the other domains (like .pro, .biz and .org). VeriSign creates the top-level domain names and guarantees that all names within a top-level domain are unique. VeriSign also maintains contact information for each site and runs the "whois" database. The host name is created by the company hosting the domain. "www" is a very common host name, but many places now either omit it or replace it with a different host name that indicates a specific area of the site. For example, in encarta.msn.com, the domain name for Microsoft's Encarta encyclopedia, "encarta" is designated as the host name instead of "www."

    Name Servers

    The whois Command
    On a UNIX machine, you can use the whois command to look up information about a domain name. You can do the same thing using the whois form at VeriSign. If you type in a domain name, like "howstuffworks.com," it will return to you the registration information for that domain, including its IP address.
    A set of servers called domain name servers (DNS) maps the human-readable names to the IP addresses. These servers are simple databases that map names to IP addresses, and they are distributed all over the Internet. Most individual companies, ISPs and universities maintain small name servers to map host names to IP addresses. There are also central name servers that use data supplied by VeriSign to map domain names to IP addresses.

    If you type the URL "http://www.howstuffworks.com/web-server.htm" into your browser, your browser extracts the name "www.howstuffworks.com," passes it to a domain name server, and the domain name server returns the correct IP address for www.howstuffworks.com. A number of name servers may be involved to get the right IP address. For example, in the case of www.howstuffworks.com, the name server for the "com" top-level domain will know the IP address for the name server that knows host names, and a separate query to that name server, operated by the HowStuffWorks ISP, may deliver the actual IP address for the HowStuffWorks server machine.

    On a UNIX machine, you can access the same service using the nslookup command. Simply type a name like "www.howstuffworks.com" into the command line, and the command will query the name servers and deliver the corresponding IP address to you.

    So here it is: The Internet is made up of millions of machines, each with a unique IP address. Many of these machines are server machines, meaning that they provide services to other machines on the Internet. You have heard of many of these servers: e-mail servers, Web servers, FTP servers, Gopher servers and Telnet servers, to name a few. All of these are provided by server machines.


    Ports

    Any server machine makes its services available to the Internet using numbered ports, one for each service that is available on the server. For example, if a server machine is running a Web server and an FTP server, the Web server would typically be available on port 80, and the FTP server would be available on port 21. Clients connect to a service at a specific IP address and on a specific port.

    Each of the most well-known services is available at a well-known port number. Here are some common port numbers:

    • echo 7
    • daytime 13
    • qotd 17 (Quote of the Day)
    • ftp 21
    • telnet 23
    • smtp 25 (Simple Mail Transfer, meaning e-mail)
    • time 37
    • nameserver 53
    • nicname 43 (Who Is)
    • gopher 70
    • finger 79
    • WWW 80
    If the server machine accepts connections on a port from the outside world, and if a firewall is not protecting the port, you can connect to the port from anywhere on the Internet and use the service. Note that there is nothing that forces, for example, a Web server to be on port 80. If you were to set up your own machine and load Web server software on it, you could put the Web server on port 918, or any other unused port, if you wanted to. Then, if your machine were known as xxx.yyy.com, someone on the Internet could connect to your server with the URL http://xxx.yyy.com:918. The ":918" explicitly specifies the port number, and would have to be included for someone to reach your server. When no port is specified, the browser simply assumes that the server is using the well-known port 80.

    Protocols

    Once a client has connected to a service on a particular port, it accesses the service using a specific protocol. The protocol is the pre-defined way that someone who wants to use a service talks with that service. The "someone" could be a person, but more often it is a computer program like a Web browser. Protocols are often text, and simply describe how the client and server will have their conversation.

    Perhaps the simplest protocol is the daytime protocol. If you connect to port 13 on a machine that supports a daytime server, the server will send you its impression of the current date and time and then close the connection. The protocol is, "If you connect to me, I will send you the date and time and then disconnect." Most UNIX machines support this server. If you would like to try it out, you can connect to one with the Telnet application. In UNIX, the session would look like this:

    %telnet web67.ntx.net 13
    
    Trying 216.27.61.137...
    Connected to web67.ntx.net.
    Escape character is '^]'.
    Sun Oct 25 08:34:06 1998
    Connection closed by foreign host.

    On a Windows machine, you can access this server by typing "telnet web67.ntx.net 13" at the MSDOS prompt.

    In this example, web67.ntx.net is the server's UNIX machine, and 13 is the port number for the daytime service. The Telnet application connects to port 13 (telnet naturally connects to port 23, but you can direct it to connect to any port), then the server sends the date and time and disconnects. Most versions of Telnet allow you to specify a port number, so you can try this using whatever version of Telnet you have available on your machine.

    Most protocols are more involved than daytime and are specified in Request for Comment (RFC) documents that are publicly available (see http://sunsite.auc.dk/RFC/ for a nice archive of all RFCs). Every Web server on the Internet conforms to the HTTP protocol, summarized nicely in The Original HTTP as defined in 1991. The most basic form of the protocol understood by an HTTP server involves just one command: GET. If you connect to a server that understands the HTTP protocol and tell it to "GET filename," the server will respond by sending you the contents of the named file and then disconnecting. Here's a typical session:

    %telnet www.howstuffworks.com 80
    
    Trying 216.27.61.137...
    Connected to howstuffworks.com.
    Escape character is '^]'.
    GET http://www.howstuffworks.com/


    Welcome to How Stuff Works
    ...


    Connection closed by foreign host.

    In the original HTTP protocol, all you would have sent was the actual filename, such as "/" or "/web-server.htm." The protocol was later modified to handle the sending of the complete URL. This has allowed companies that host virtual domains, where many domains live on a single machine, to use one IP address for all of the domains they host. It turns out that hundreds of domains are hosted on 209.116.69.66 --

    Putting It All Together

    Now you know a tremendous amount about the Internet. You know that when you type a URL into a browser, the following steps occur:
    • The browser breaks the URL into three parts:
      1. The protocol ("http")
      2. The server name ("www.howstuffworks.com")
      3. The file name ("web-server.htm")

    • The browser communicates with a name server to translate the server name, "www.howstuffworks.com," into an IP address, which it uses to connect to that server machine.

    • The browser then forms a connection to the Web server at that IP address on port 80.

    • Following the HTTP protocol, the browser sends a GET request to the server, asking for the file "http://www.howstuffworks.com/web-server.htm." (Note that cookies may be sent from browser to server with the GET request -- see How Internet Cookies Work for details.)

    • The server sends the HTML text for the Web page to the browser. (Cookies may also be sent from server to browser in the header for the page.)

    • The browser reads the HTML tags and formats the page onto your screen.


    Label Cloud

    Site Meter
    .

    Enter your email address:

    Delivered by FeedBurner