Revision as of 00:33, 6 November 2006 view sourcePython eggs (talk | contribs)Extended confirmed users19,603 edits +zh-classical:計算機← Previous edit | Revision as of 13:22, 6 November 2006 view source SteveBaker (talk | contribs)Extended confirmed users, Pending changes reviewers, Rollbackers30,868 edits →Programming LanguagesNext edit → | ||
Line 1: | Line 1: | ||
{{dablink|For the IEEE magazine see ].}} | |||
{{sprotect}} | |||
{{dablink|For the ] magazine see ].}} | |||
] ].]] | |||
] RCX Computer is an example of an ] used to control mechanical devices. It is fully programmable.]] | |||
A '''computer''' is a ] for manipulating ] according to a list of ] known as a ]. | |||
A '''computer''' is a ] for manipulating ] according to a list of ]. | |||
Computers are extremely versatile. In fact, they are ''universal'' information-processing machines. According to the ], a computer with a certain minimum threshold capability is in principle capable of performing the tasks of any other computer. Therefore, computers with capabilities ranging from those of a ] to a ] may all perform the same tasks, as long as time and ] capacity are not considerations. Therefore, the same computer designs may be adapted for tasks ranging from processing company ]s to controlling ]. Due to ] advancement, modern electronic computers are exponentially more capable than those of preceding generations (a phenomenon partially described by ]). | |||
A list of computer instructions designed to perform some task is known as a '']''. When programs are contained in ] that may be easily modified by the computer itself, the device is said to have a ] architecture. The ability to execute stored programs makes computers extremely versatile. The ] is a mathematical statement of this versatility: Any computer with a certain minimum capability is, in principle, capable of performing the same tasks that any other computer can perform. Therefore, computers with capability and complexity ranging from that of a ] to a ] are all able to perform the same computational tasks so long as time and storage capacity are not considerations. Hence the same computer design may be used for tasks ranging from processing company payrolls to controlling ]. | |||
Computers take numerous physical forms. Early electronic computers were the size of a large room, while entire modern embedded computers may be smaller than a deck of ]s. Even today, enormous computing facilities still exist for specialized ] and for the ] requirements of large organizations. Smaller computers designed for individual use are called ]s. Along with its portable equivalent, the ], the personal computer is the ubiquitous information processing and ] tool, and is usually what is meant by "a computer". However, the most common form of computer in use today is the ]. Embedded computers are usually relatively simple and physically small computers used to control another device. They may control machines from ] to ]s to ]s. | |||
] | |||
Computers take numerous physical forms. Early electronic computers were the size of a large room, consuming as much power as several hundred modern personal computers. <ref>In 1961, ENIAC consumed an estimated 174 kW. By comparison, a typical personal computer may use around 400 W; over four hundred times less. {{Ref harvard|kempf1961|Kempf 1961|a}}</ref> On the other hand, an entire computer can now fit into a ]. Today, large-scale computing facilities still exist for specialized ] and for the ] requirements of large organizations but society has come to recognise ]s and their portable equivalent, the ] as icons of the ]. These are what most people think of as a "computer". However, the most common form of computer in use today is the ]. Embedded computers are usually relatively simple and physically small and are often used to control other devices. They may help control machines from ] to ]s, ]s, ]s and even ]es. | |||
==History of computing== | ==History of computing== | ||
{{main|History of computing}} | {{main|History of computing}} | ||
] was |
] was one of the first programmable devices.]] | ||
Originally, the term "computer" referred to a ], often with the aid of a ] or ]. Examples of these early devices, the ancestors of the computer, included the ] and the ], an ] device for calculating the movements of ]s which dates from about 87 BC.<ref name="antikythera">{{cite web | author=Phillips, Tony | publisher=American Mathematical Society | year=2000 | title=The Antikythera Mechanism I | url=http://www.math.sunysb.edu/~tony/whatsnew/column/antikytheraI-0400/kyth1.html|accessdate=2006-04-05}}</ref> The end of the ] saw a reinvigoration of European mathematics and engineering, and ]'s 1623 device was the first of a number of mechanical calculators constructed by European engineers.<ref name="Schickard">{{cite web | year=Unknown | publisher=computerhistory.org | title=Visible Storage | url=http://www.computerhistory.org/VirtualVisibleStorage/artifact_main.php?tax_id=01.01.06.00|accessdate=2006-04-05}}</ref> | |||
The question of which was the earliest computer is a difficult one. The very definition of what a computer is has changed over the years and it is therefore impossible to definitively answer the question. | |||
In ], ] made an improvement to the existing loom designs that used a series of punched paper cards as a program to weave intricate patterns. The resulting ] is not considered a true computer but it was an important step in the development of modern digital computers. | |||
Originally, the term "computer" referred to a person who performed numerical calculations (a ]), often with the aid of a ] or ]. Examples of early mechanical computing devices included the ] and the ], an ] device for calculating the movements of ]s which dates from about 87 BC. The end of the ] saw a reinvigoration of European mathematics and engineering, and ]'s 1623 device was the first of a number of mechanical calculators constructed by European engineers. | |||
] was the first to conceptualize and design a fully programmable computer as early as 1820, but due to a combination of the limits of the technology of the time, limited finance, and an inability to resist tinkering with his design, the device was never actually constructed in his lifetime. By the end of the 19th century a number of technologies that would later prove useful in computing had appeared, such as the ] and the ], and large-scale automated data processing using punch cards was performed by tabulating machines designed by ]. | |||
However, none of those devices fit the modern definition of a ''computer'' as a programmable device. In 1801, ] improvement to existing ] designs that used a series of punched paper cards as a template to allow his loom to weave intricate patterns automatically. While the resulting ] is not usually considered to be a computer, it was an important step because the use of punched cards to define woven patterns can be viewed as an early, albeit limited, form of programmability. | |||
During the first half of the 20th century, many scientific computing needs were met by increasingly sophisticated special-purpose ]s, which used a direct mechanical or ] model of the problem as a basis for computation (they became increasingly rare after the development of the programmable digital computer). A succession of steadily more powerful and flexible computing devices were constructed in the 1930s and 1940s, gradually adding the key features of modern computers. | |||
In 1837, ] was the first to conceptualize and design a fully programmable mechanical computer that he called "The ]" (not to be confused with his ] which was a non-programmable mechanical calculator). Due to limits of the technology of the time, finances, and an inability to resist tinkering with his design, the Analytical engine was never actually constructed. Hence, Babbage is generally credited with the first ''design'' of a programmable computer. | |||
The use of digital electronics was introduced by ] in 1937<ref name="shannon">Shannon, Claude Elwood (1940). . Massachusetts Institute of Technology: Thesis (M.S.)</ref> in his thesis ]. Here he introduced switches for implementing logic and aritmethic. He came up with the idea while studying the ] circuits of ]'s ].<ref>{http://scienceworld.wolfram.com/biography/Shannon.html Biography of Claude Elwood Shannon] - URL retrieved ], ]</ref>. In November the same year ] completed a relay-based computer implementing the idea (the "Model K"). This point marked the beginning of binary ] design and the use of ]. Precursors of this idea were ], who patented a device containing a logic gate switch circuit, ] who filed for patents of devices containing logic gate circuits in 1898 (see ]), and ]'s modification, in 1907, who replaced relays with vacuum tubes. | |||
By the end of the 19th century a number of technologies that would later prove useful in the design of practical computers had begun to appear. The ] and the ] had appeared and large-scale automated data processing using machines to read, sort and tabulate punched cards was performed by tabulating machines designed by ] and manufactured by ] who later became ]. | |||
Defining one point along this road as "the first digital electronic computer" is exceedingly difficult. | |||
On ],] ] completed his electromechanical ], being the first working machine featuring automatic ] arithmetic and feasible programmability (therefore the first digital operational programmable computer, although not electronic); other notable achievements include the ] (shown working around Summer 1941), a special-purpose machine that used valve-driven (vacuum tube) computation, ] numbers, and regenerative memory; the secret British ] (demonstrated in 1943), which had limited programmability but demonstrated that a device using thousands of valves could be both made reliable and reprogrammed electronically; the ], a large-scale electromechanical computer with limited programmability (shown working around 1944); the decimal-based American ] (1944) — which was the first ''general purpose'' electronic computer, but originally had an inflexible architecture that meant reprogramming it essentially required it to be rewired. | |||
During the first half of the 20th century, many scientific computing needs were met by increasingly sophisticated special-purpose ]s, which used a direct mechanical or ] model of the problem as a basis for computation. However, these were not programmable and generally lacked the versatility of today's computers. Analog and mechanical computers and calculators became increasingly rare as they were largely superceded by the development of the programmable digital computer. | |||
{{Early computer characteristics}} | |||
] was the first computer to implement the stored program (]) architecture.]] | |||
The team who developed ENIAC, recognizing its flaws, came up with a far more flexible and elegant design, which has become known as the ] (or "stored program architecture"). This stored program architecture became the basis for virtually all modern computers. A number of projects to develop computers based on the stored program architecture commenced in the mid to late-1940s; the first of these were completed in Britain. The first to be up and running was the ], but the ] was perhaps the first practical version that was developed. | |||
A succession of steadily more powerful and flexible computing devices were constructed in the 1930s and 1940s, gradually adding the key features that are seen in modern computers. The use of digital electronics (largely invented by ] in 1937) and more flexible programmability {{Ref harvard|shannon1940|Shannon 1940|a}} were vitally important steps but defining one point along this road as "the first digital electronic computer" is exceedingly difficult. Notable achievements include the ] (1937), a special-purpose machine that used valve-driven (]) computation, ] numbers, and regenerative memory; the secret British ] (1944), which had limited programmability but demonstrated that a device using thousands of valves could be both made reliable and reprogrammed electronically; the ], a large-scale electromechanical computer with limited programmability (1944); the decimal-based American ] (1946)—which was the first ''general purpose'' electronic computer, but originally had an inflexible architecture that meant reprogramming it essentially required it to be rewired; and ]'s Z machines, with the electromechanical ] (1941) being the first working machine featuring automatic binary arithmetic and feasible programmability. | |||
Valve (tube) driven computer designs were in use throughout the 1950s, but were eventually replaced with ]-based computers, which were smaller, faster, cheaper, and much more reliable, thus allowing them to be commercially produced, in the 1960s. By the 1970s, the adoption of ] technology had enabled computers to be produced at a low enough cost to allow individuals to own ]s. | |||
Several developers of ENIAC, recognizing its flaws, came up with a far more flexible and elegant design, which came to be known as the '''stored program architecture''' or ]. This design was first formally described by ] in the paper "]", published in 1945. A number of projects to develop computers based on the stored program architecture commenced around this time; the first of these being completed in ]. The first to be demonstrated working was the ] (SSEM) or "Baby". However, the ], completed a year after SSEM, was perhaps the first practical implementation of the stored program design. Shortly thereafter, the machine originally described by von Neumann's paper—]—was completed but didn't see full-time use for an additional two years. | |||
==How computers work: the stored program architecture== | |||
] are miniaturized devices that often implement stored program ]s.]] | |||
]: | |||
<ol> | |||
<li>] | |||
<li>] | |||
<li>] (]) | |||
<li>] (]) | |||
<li>]s | |||
<li>] | |||
<li>] | |||
<li>] (]) | |||
<li>] | |||
<li>] | |||
</ol>]] | |||
Nearly all modern computers implement some form of the stored program architecture, making it the single trait by which the modern word ''computer'' is defined. By this standard, many earlier devices would no longer be called "computers" by today's definition, but are usually referred to as such in their historical context. | |||
While the technologies used in computers have changed dramatically since the first ], ''general-purpose computers'' of the 1940s, most still use the ] (sometimes called the ''von Neumann architecture''). The design made the universal computer a practical reality. | |||
Vacuum tube driven computer designs were in use throughout the 1950s, but were eventually replaced in the 1960s by ]-based computers, which were smaller, faster, cheaper, and much more reliable - which allowed them to be produced on a commercial scale. By the 1970s, the adoption of ] technology and the subsequent creation of the ] caused another major improvement in size, speed, cost and reliability. By the 1980s, computers were sufficiently small and cheap that it became cost-effective to use them in domestic appliances such as ] and it became easily possible for individuals to own a ]. Fuelled largely by the widespread growth of the ] in the 1990s, ownership of personal computers is becoming as common as the ] or the ] and almost all modern electronic devices contain a computer of some kind. | |||
<!-- this isn't what the stored program architecture is... rewrite --> | |||
The architecture describes a computer with four main sections: the ] (ALU), the ], the ], and the input and output devices (collectively termed ''I/O''). These parts are interconnected by bundles of wires (called "]es" when the same bundle supports more than one data path) and are usually driven by a timer or ] (although other events could drive the control circuitry). | |||
== Stored program architecture == | |||
Conceptually, a computer's memory can be viewed as a list of cells. Each cell has a numbered "address" and can store a small, fixed amount of information. This ] can either be an instruction, telling the computer what to do, or data, the information which the computer is to process using the instructions that have been placed in the memory. In principle, any cell can be used to store either instructions or data. | |||
{{main|Computer program|Computer programming}} | |||
The defining feature of modern computers - and that which distinguishes them from all other machines - is that they can be ]. That is to say that a list of ]s (the ]) can be given to the computer and it will store them and carry them out at some time in the future. | |||
The ] is in many senses the heart of the computer. It is capable of performing two classes of basic operations. The first is arithmetic operations; for instance, adding or subtracting two numbers together. The set of arithmetic operations may be very limited; indeed, some designs do not directly support multiplication and division operations (instead, users support multiplication and division through programs that perform multiple additions, subtractions, and other digit manipulations). The second class of ALU operations involves ''comparison'' operations: given two numbers, determining if they are equal, or if not equal which is larger. | |||
In most cases, computer instructions are simple: add one number to another, move some data from one location to another, send a message to some external device, etc. These instructions are read from the computer's ] and are generally carried out (]) in the order they were given. However, there are usually specialised instructions to tell the computer to jump ahead or backwards to some other place in the program and to carry on executing from there. These are called "jump" instructions (or ]). Furthermore, jump instructions may be made to happen ] so that different sequences of instructions may be used depending on the result of some previous calculation or some external event. | |||
The I/O systems are the means by which the computer receives information from the outside world, and reports its results back to that world. On a typical personal computer, input devices include objects like the keyboard and ], and output devices include ]s, ] and the like, but as will be discussed later a huge variety of devices can be connected to a computer and serve as I/O devices. | |||
It is a convenient metaphor to imagine the computer working its way through the list of instructions in the program, just as a person might read a book—sometimes going back to an earlier place in the text—sometimes skipping sections that are not of interest but generally reading one line at a time. A computer may sometimes go back and repeat the instructions in some section of the program over and over again until some internal condition is met. This is called the ] within the program and it is what allows the computer to perform tasks repeatedly without human intervention. | |||
The control system ties this all together. Its job is to read instructions and data from memory or the I/O devices, decode the instructions, providing the ALU with the correct inputs according to the instructions, "tell" the ALU what operation to perform on those inputs, and send the results back to the memory or to the I/O devices. One key component of the control system is a counter that keeps track of what the address of the current instruction is; typically, this is incremented each time an instruction is executed, unless the instruction itself indicates that the next instruction should be at some other location (allowing the computer to repeatedly execute the same instructions). | |||
A person using a ] can perform a basic arithmetic operation such as adding two numbers with just a few button presses. But to add together all of the numbers from 1 to 1,000 would take thousands of button presses and a lot of time—with a near certainty of making a mistake. On the other hand, a computer may be programmed to do this with just a few simple instructions. For example: | |||
Since the 1980s the ALU and control unit (collectively called a ] or CPU) have typically been located on a single ] called a ]. | |||
sum = 0 ; | |||
The functioning of such a computer is in principle quite straightforward. Typically, on each clock cycle, the computer fetches instructions and data from its memory. The instructions are executed, the results are stored, and the next instruction is fetched. This procedure repeats until a ''halt'' instruction is encountered. | |||
for ( i = 1 ; i <= 1000 ; i++ ) | |||
sum += i ; | |||
print ( sum ) ; | |||
Once told to run this program, the computer will perform the repetitive addition task without further human intervention. It will almost never make a mistake and a modern PC can complete the task in about a millionth of a second. | |||
The set of instructions interpreted by the control unit, and executed by the ALU, are limited in number, precisely defined, and very simple operations. Broadly, they fit into one or more of four categories: 1) moving data from one location to another (an example might be an instruction that "tells" the CPU to "copy the contents of memory cell 5 and place the copy in cell 10"). 2) executing arithmetic and logical processes on data (for instance, "add the contents of cell 7 to the contents of cell 13 and place the result in cell 20"). 3) testing the condition of data ("if the contents of cell 999 are 0, the next instruction is at cell 30"). 4) altering the sequence of operations (the previous example alters the sequence of operations, but instructions such as "the next instruction is at cell 100" are also standard). | |||
However, computers cannot "think" for themselves in the sense that they only solve problems in exactly the way they are programed to. An intelligent human faced with the above addition task might soon realise that instead of adding up all of those numbers one can simply use the equation | |||
Instructions, like data, are represented within the computer as ] code — a base two system of counting. For example, the code for one kind of "copy" operation in the ] ] line of microprocessors is 10110000.<ref>{{cite web | author=Unknown|title=IA-32 architecture | |||
one byte opcodes|publisher= sandpile.org| year=Unknown | url=http://www.sandpile.org/ia32/opc_1.htm | accessdate=2006-04-09}}</ref> The particular instruction set that a specific computer supports is known as that computer's ]. Using an already-popular machine language makes it much easier to run existing software on a new machine; consequently, in markets where commercial software availability is important suppliers have converged on one or a very small number of distinct machine languages. | |||
: <math>1+2+3+...+n = {{n(n+1)} \over 2}</math> | |||
More powerful computers such as ]s, ]s and ] may differ from the model above by dividing their work between more than one main CPU. ] and ] personal and laptop computers are also beginning to become available.<ref>{{cite web | author=Kanellos, Michael | title=Intel: 15 dual-core projects under way | publisher= CNET Networks, Inc.| year=2005 | url=http://news.com.com/Intel+15+dual-core+projects+under+way/2100-1006_3-5594773.html | accessdate=2006-07-15}}</ref><ref>{{cite web | author=Chen, Anne | title=Laptops Leap Forward in Power and Battery Life | publisher= Ziff Davis Publishing Holdings Inc. | year=2006 | url=http://www.eweek.com/article2/0,1895,1948898,00.asp | accessdate=2006-07-15}}</ref> | |||
and arrive at the correct answer (500,500) with little work. Some modern computers are able to make some decisions that speed up the execution of some programs by "guessing" about the outcomes of certain jump instructions and re-arranging the order of instructions slightly without changing their meaning (], ], and ]). However, computers cannot determine a more efficient way to perform the task given to them because they do not have an overall understanding of what the task, or the "big picture", is. In other words, a computer programmed to add up the numbers one by one as in the example above would do exactly that without regard to efficiency or alternative solutions. | |||
]s often have highly unusual architectures significantly different from the basic stored-program architecture, sometimes featuring thousands of CPUs, but such designs tend to be useful only for specialized tasks. At the other end of the size scale, some ]s use the ] that ensures that program and data memory are logically separate. | |||
== |
=== Programs === | ||
The conceptual design above could be implemented using a variety of different technologies. As previously mentioned, a stored program computer could be designed entirely of mechanical components like ]'s devices or the ]. However, ] allow ] and ] to be implemented using ]s — essentially, electrically controlled switches. Shannon's famous thesis showed how relays could be arranged to form units called ]s, implementing simple Boolean operations. Others soon figured out that ]s — electronic devices, could be used instead. Vacuum tubes were originally used as a signal ] for radio and other applications, but were used in digital electronics as a very fast switch; when electricity is provided to one of the pins, current can flow through between the other two. | |||
].]] | |||
Through arrangements of logic gates, one can build digital circuits to do more complex tasks, for instance, an ], which implements in electronics the same method — in computer terminology, an ] — to add two numbers together that children are taught — add one column at a time, and carry what's left over. Eventually, through combining circuits together, a complete ALU and control system can be built up. This does require a considerable number of components. ], one of the earliest stored-program computers, is probably close to the smallest practically useful design. It had about 2,000 valves, some of which were "dual components",<ref>The last of the first : CSIRAC : Australia's first computer, Doug McCann and Peter Thorne, ISBN 0-7340-2024-4.</ref> so this represented somewhere between 2,000 and 4,000 logic components. | |||
In practical terms, a ''']''' might include anywhere from a dozen instructions (such as the simple traffic light example) to many millions of instructions for something like a ] or a ]. A typical modern computer can execute billions of instructions every second and nearly never make a mistake over years of operation. | |||
Large computer programs may take teams of ]s years to write and the probability of the entire program having been written completely in the manner intended is unlikely. Errors in computer programs are called ]s. Sometimes bugs are benign and do not affect the usefulness of the program, in other cases they might cause the program to completely fail (or ]), in yet other cases there may be subtle problems. In the second traffic light example (above), there is a bug; if the traffic signal is showing red when someone switches the 'flash red' switch, it will cycle through green once more before starting to flash red. It is worthwhile to note that bugs are usually not the fault of the computer. Since computers merely execute the instructions they are given, bugs nearly always are the result of programmer error or an oversight made in the program's design. <ref>It is not universally true that bugs are solely due to programmer oversight. Computer hardware may fail or may itself have a fundamental problem that produces unexpected results in certain situations. For instance, the ] caused some ] ]s in the early 1990s to produce inaccurate results for certain ] division operations. This was caused by a flaw in the microprocessor design and resulted in a partial recall of the affected devices.</ref> | |||
Vacuum tubes had severe limitations for the construction of large numbers of gates. They were expensive, unreliable (particularly when used in such large quantities), took up a lot of space, and used a lot of electrical power, and, while incredibly fast compared to a mechanical switch, had limits to the speed at which they could operate. Therefore, by the 1960s they were replaced by the ], a new device which performed the same task as the tube but was much smaller, faster operating, reliable, used much less power, and was far cheaper. | |||
In most computers, individual instructions are stored as ] with each instruction being given a unique number (its operation code or ] for short). The command to add two numbers together would have one opcode, the command to multiply them would have a different number and so on. The simplest computers are able to perform any of a handful of different instructions, the more complex computers have several thousand to choose from—each with a unique numerical code. Since the computer's memory is able to store numbers, it can also store the instruction codes. This leads to the important fact that entire programs (which are just lists of instructions) can be represented as lists of numbers and can themselves be manipulated inside the computer just as if they were numeric data. The fundamental concept of storing programs in the computer's memory alongside the data they operate on is the crux of the von Neumann, or stored program, architecture. | |||
]s are the basis of modern digital computing hardware.]] | |||
While the technologies used in computers have changed dramatically since the first ], general-purpose computers of the 1940s, most still use the ]. The design made the universal computer a practical reality. | |||
In the 1960s and 1970s, the transistor itself was gradually replaced by the ], which placed multiple transistors (and other components) and the wires connecting them on a single, solid piece of silicon. By the 1970s, the entire ALU and control unit, the combination becoming known as a ], were being placed on a single "chip" called a ]. Over the history of the integrated circuit, the number of components that can be placed on one has grown enormously. The first IC's contained a few tens of components; as of 2006, the ] processor contains 151 million transistors.<ref name="toms-tcount">{{cite web | author=Thon, Harald and Töpel, Bert | publisher=Tom's Hardware |title=Will Core Duo Notebooks Trade Battery Life For Quicker Response? | year=January 16, 2006 | url=http://www.tomshardware.com/2006/01/16/will_core_duo_notebooks_trade_battery_life_for_quicker_response/ | accessdate=2006-04-09}}</ref> | |||
In some cases, a computer might store some or all of its program in memory that is kept separate from the data it operates on. This is called the ] after the ] computer. Often, modern computers display some traits of the Harvard architecture in their designs, such as in ]s. | |||
Tubes, transistors, and transistors on integrated circuits can be used as the "storage" component of the stored-program architecture, using a circuit design known as a ], and indeed flip-flops are used for small amounts of very high-speed storage. However, few computer designs have used flip-flops for the bulk of their storage needs. Instead, earliest computers stored data in ]s — essentially, projecting some dots on a TV screen and reading them again, or ]s where the data was stored as sound pulses travelling slowly (compared to the machine itself) along long tubes filled with mercury. These somewhat ungainly but effective methods were eventually replaced by magnetic memory devices, such as ], where electrical currents were used to introduce a permanent (but weak) magnetic field in some ferrous material, which could then be read to retrieve the data. Eventually, ] was introduced. A DRAM unit is a type of integrated circuit containing huge banks of an electronic component called a ] which can store an electrical charge for a period of time. The level of charge in a capacitor could be set to store information, and then measured to read the information when required. | |||
While it is possible to write computer programs as long lists of numbers (]) and this technique was used with many early computers,<ref>Even some later computers were commonly programmed directly in machine code. Some ]s like the ] ] could be programmed directly from a panel of switches. However, this method was usually used only as part of the ] process. Most modern computers boot entirely automatically by reading a boot program from some ]</ref> it becomes extremely tedious to do so in practice, especially for complicated programs. Instead, each basic instruction can be given a short name that is both indicative of its function and easy to remember—a ] such as ADD, SUB, MULT or JUMP. These mnemonics are collectively known as a computer's ]. Converting programs written in assembly language into something the computer can actually understand (machine language) is usually done by a computer program called an ]. | |||
==I/O devices== | |||
I/O (short for input/output) is a general term for devices that send computers information from the outside world and that return the results of computations. These results can either be viewed directly by a user, or they can be sent to another machine, whose control has been assigned to the computer: In a ], for instance, the controlling computer's major output device is the robot itself. | |||
Machine languages and the assembly languages that represent them (collectively termed ]s) tend to be unique to a particular type of computer. This means that an ] computer (such as may be found in a ] or a ]) cannot understand the machine language of an ] or the ] computer that might be in a ].<ref>However, there is sometimes some form of machine language compatibility between different computers. An ] compatible microprocessor like the ] ] is able to run most of the same programs that an ] microprocessor can, as well as programs designed for earlier microprocessors like the Intel ]s and ]. This contrasts with very early commercial computers, which were often one-of-a-kind and totally incompatible with other computers.</ref> | |||
The first generation of computers were equipped with a fairly limited range of input devices. A ] reader, or something similar, was used to enter instructions and data into the computer's memory, and some kind of printer, usually a modified ], was used to record the results. Over the years, other devices have been added. For the personal computer, for instance, ] and ] are the primary ways people directly enter information into the computer; and ] are the primary way in which information from the computer is presented back to the user, though ], ], and headphones are common, too. There is a huge variety of other devices for obtaining other types of input. One example is the ], which can be used to input visual information. There are two prominent classes of I/O devices. The first class is that of ] devices, such as ]s, ]s, ] and the like, which represent comparatively slow, but high-capacity devices, where information can be stored for later retrieval; the second class is that of devices used to access ]s. The ability to transfer data between computers has opened up a huge range of capabilities for the computer. The global ] allows millions of computers to transfer information of all types between each other. | |||
], a popular high-level language.]] | |||
==Programs== | |||
Writing long programs in assembly language is often difficult and error prone, so most complicated programs are written in more abstract ]s that are able to express the needs of the ] more conveniently (and thereby help reduce programmer error). High level languages are usually "compiled" into machine language (or sometimes into assembly language and then into machine language) using another computer program called a ].<ref>High level languages are also often ] rather than compiled. Interpreted languages are translated into machine code on the fly by another program called an ].</ref> Since high level languages are more abstract than assembly language, it is possible to use different compilers to translate the same high level language program into the machine language of many different types of computer. This is part of the means by which software like video games may be made available for different computer architectures such as personal computers and various ]s. | |||
]s are simply lists of instructions for the computer to execute. These can range from just a few instructions which perform a simple task, to a much more complex instruction list which may also include tables of data. Many computer programs contain millions of instructions, and many of those instructions are executed repeatedly. A typical modern ] (in the year 2005) can execute around 3 billion instructions per second. Computers do not gain their extraordinary capabilities through the ability to execute complex instructions. Rather, they do millions of simple instructions arranged by people known as ]s. | |||
=== Example === | |||
In practice, people do not normally write the instructions for computers directly in machine language. Such programming is time-consuming and error-prone, making programmers less productive. Instead, programmers describe the desired actions in a "high level" ] which is then translated into the machine language automatically by special computer programs (] and ]s). Some programming languages map very closely to the machine language, such as ] (low level languages); at the other end, languages like ] are based on abstract principles far removed from the details of the machine's actual operation (high level languages). The language chosen for a particular task depends on the nature of the task, the skill set of the programmers, tool availability and, often, the requirements of the customers (for instance, projects for the US military were often required to be in the ]). | |||
] | |||
'']'' is an alternative term for computer programs; it is a more inclusive phrase and includes all the ancillary material accompanying the program needed to do useful tasks. For instance, a ] includes not only the program itself, but also data representing the pictures, sounds, and other material needed to create the virtual environment of the game. A ] is a piece of computer software provided to many computer users, often in a retail environment. The stereotypical modern example of an application is perhaps the ], a set of interrelated programs for performing common office tasks. | |||
Suppose a computer were being employed to drive a ]. A simple stored program might say: | |||
# Turn off all of the lights | |||
Going from the extremely simple capabilities of a single machine language instruction to the myriad capabilities of application programs means that many computer programs are extremely large and complex. A typical example is ], created from roughly 40 million ] in the ] ];<ref name="WindowsXP-size">Tanenbaum, Andrew S. ''Modern Operating Systems'' (2nd ed.). Prentice Hall. ISBN 0-13-092641-8.</ref> there are many projects of even bigger scope, built by large teams of programmers. The management of this enormous complexity is key to making such projects possible; programming languages, and programming practices, enable the task to be divided into smaller and smaller subtasks until they come within the capabilities of a single programmer in a reasonable period. | |||
# Turn on the red light, wait for sixty seconds | |||
# Turn off the red light, turn on the green light, wait for sixty seconds | |||
# Turn off the green light, turn on the amber light, wait for two seconds | |||
# Turn off the amber light | |||
# Jump to instruction number (2). | |||
With this set of instructions, the computer would cycle the light continually through red, green, amber and back to red again until told to stop running the program. | |||
Nevertheless, the process of developing software remains slow, unpredictable, and error-prone; the discipline of ] has attempted, with some success, to make the process quicker and more productive and improve the quality of the end product. | |||
However, suppose there is a simple on/off ] connected to the computer that is intended be used to make the light flash red while some maintenance operation is being performed. The program might then instruct the computer to: | |||
====Libraries and operating systems==== | |||
Soon after the development of the computer, it was discovered that certain tasks were required in many different programs; an early example was computing some of the standard mathematical functions. For the purposes of efficiency, standard versions of these were collected in libraries and made available to all who required them. A particularly common task set related to handling the gritty details of "talking" to the various I/O devices, so libraries for these were quickly developed. | |||
# Turn off all of the lights | |||
By the 1960s, with computers in wide industrial use for many purposes, it became common for them to be used for many different jobs within an organization. Soon, special software to automate the scheduling and execution of these many jobs became available. The combination of managing "hardware" and scheduling jobs became known as the "]"; the classic example of this type of early operating system was ] by ].<ref name="ibm-pr">{{cite press release | publisher = IBM Data Processing Division | date = April 7, 1964 | title = System/360 Announcement | url=http://www-03.ibm.com/ibm/history/exhibits/mainframe/mainframe_PR360.html}}</ref> | |||
# Turn on the red light, wait for sixty seconds | |||
# Turn off the red light, turn on the green light, wait for sixty seconds | |||
# Turn off the green light, turn on the amber light, wait for two seconds | |||
# Turn off the amber light | |||
# '''If the maintainance switch is NOT turned on then jump to instruction number (2)''' | |||
# '''Turn on the red light, wait for one second''' | |||
# '''Turn off the red light, wait for one second''' | |||
# '''Jump to instruction number (6)''' | |||
In this manner, the computer is either running the instructions from number (2) to (6) over and over or it's running the instructions from (6) down to (9) over and over, depending on the position of the switch. | |||
The next major development in operating systems was ] — the idea that multiple users could use the machine "simultaneously" by keeping all of their programs in memory, executing each user's program for a short time so as to provide the illusion that each user had their own computer. Such a development required the operating system to provide each user's programs with a "virtual machine" such that one user's program could not interfere with another's (by accident or design). The range of devices that operating systems had to manage also expanded; a notable one was ]s; the idea of individual "files" and a hierarchical structure of "directories" (now often called folders) greatly simplified the use of these devices for permanent storage. Security access controls, allowing computer users access only to files, directories and programs they had permissions to use, were also common. | |||
== How computers work == | |||
Perhaps the last major addition to the operating system was tools to provide programs with a standardized ]. While there are few technical reasons why a GUI has to be tied to the rest of an operating system, it allows the operating system vendor to encourage all the software for their operating system to have a similar looking and acting interface. | |||
{{main|Central processing unit|Microprocessor}} | |||
Outside these "core" functions, operating systems are usually shipped with an array of other tools, some of which may have little connection with these original core functions but have been found useful by enough customers for a provider to include them. For instance, Apple's ] ships with a ] application. | |||
A general purpose computer has four main sections: the ] (ALU), the ], the ], and the input and output devices (collectively termed I/O). These parts are interconnected by bundles of wires (called ]es). | |||
The control unit, ALU, registers, and basic I/O (and often other hardware closely linked with these) are collectively known as a ] (CPU). While early CPUs were comprised of many discrete components, since the mid-1970s CPUs have typically been constructed on a single ] called a ]. | |||
Operating systems for smaller computers may not provide all of these functions. The operating systems for early ]s with limited memory and processing capability did not, and ]s typically have specialized operating systems or no operating system at all, with their custom application programs performing the tasks that might otherwise be delegated to an operating system. | |||
=== Control system === | |||
==Computer applications== | |||
{{wrapper}} | |||
|] | |||
| | |||
|] (CGI) is a central ingredient in motion picture visual effects. The seawater creature in '']'' (1989) marked the acceptance of CGI in the visual effects industry.]] | |||
| | |||
|] would not be possible without low-cost embedded computers.]] | |||
{{end}} | |||
{{main|CPU design}} | |||
The first digital computers, with their large size and cost, mainly performed scientific calculations, often to support military objectives. The ] was originally designed to calculate ballistics-firing tables for ], but it was also used to calculate neutron cross-sectional densities to help in the design of the ]<ref>{{cite web | title=Classical Super / Runaway Super | year=Unknown | publisher=Globalsecurity.org|url=http://www.globalsecurity.org/wmd/intro/classical-super.htm|accessdate=2006-04-05}}</ref> significantly speeding up its development. (Many of the most powerful ]s available today are also used for ]s ]s.) The ], the first Australian stored-program computer, was amongst many other tasks used for the evaluation of rainfall patterns for the ] of the ] Scheme, a large ] generation project<ref>The last of the first : CSIRAC : Australia's first computer, Doug McCann and Peter Thorne, ISBN 0-7340-2024-4.</ref> Others were used in ], for example the first programmable (though not general-purpose) digital electronic computer, ], built in 1943 during ]. Despite this early focus of scientific and military engineering applications, computers were quickly used in other areas. | |||
The control system (often called a control unit or central control) directs the other core components of a computer. It reads and interprets (decodes) instructions in the program one by one. Usually the control system will decode each instruction and turn it into a series of control signals that operate the various other portions of the computer.<ref>The control unit's rule in interpreting instructions has varied somewhat in the past. While the control unit is solely responsible for instruction interpretation in most modern computers, this is not always the case. Many computers include some instructions that may only be partially interpreted by the control system and partially interpreted by another device. This is especially the case with specialized computing hardware that may be partially self-contained. For example, ], the first modern stored program computer to be designed, used a central control unit that only interpreted four instructions. All of the arithmetic-related instructions were passed on to its arithmetic unit and further decoded there.</ref> Control systems in advanced computers may also resequence instructions in order to improve performance. A key component common in all control systems is the ], a special memory cell (usually a ]) that keeps track of which location or locations in memory the next instruction is to be read from.<ref>Instructions often occupy more than one memory address, so program counters usually increase by the number of memory locations required to store one instruction.</ref> | |||
From the beginning, stored program computers were applied to business problems. The ], a stored program-computer built by ] in the ], was operational and being used for inventory management and other purposes 3 years before ] built their first commercial stored-program computer. Continual reductions in the cost and size of computers saw them adopted by ever-smaller organizations. Moreover, with the invention of the ] in the 1970s, it became possible to produce inexpensive computers. In the 1980s, ] became popular for many tasks, including ], writing and printing documents, calculating forecasts and other repetitive mathematical tasks involving ]s. | |||
] instruction would be decoded by the control system.]] | |||
As computers have become less expensive, they have been used extensively in the creative arts as well. Sound, still pictures, and video are now routinely created (through ], ] and ]), and near-universally edited by computer. They have also been used for entertainment, with the ] becoming a huge industry. | |||
A simplified sequence describing the control system's function follows. Some of these steps may be performed concurrently or in a slightly different order, depending on the computer's particular design. | |||
Computers have been used to control mechanical devices since they became small and cheap enough to do so; indeed, a major spur for integrated circuit technology was building a computer small enough to guide the ]<ref>{{cite web | author=Brown, Alexander | title=Integrated Circuits in the Apollo Guidance Computer | year=August 22, 2002 | url=http://hrst.mit.edu/hrs/apollo/ic | accessdate=2006-04-05}}</ref><ref>{{cite web | year=Unknown | title=Technological Innovation and the ICBM | publisher=Smithsonian Institution|url=http://www.hrw.com/science/si-science/earth/spacetravel/spacerace/SpaceRace/sec200/sec270.html|accessdate=2006-04-05}}</ref> two of the first major applications for embedded computers. Today, it is almost rarer to find a powered mechanical device ''not'' controlled by a computer than to find one that is at least partly so. Perhaps the most famous computer-controlled mechanical devices are ]s, machines with more-or-less human appearance and some subset of their capabilities. Industrial robots have become commonplace in ], but general-purpose human-like robots have not lived up to the promise of their fictional counterparts and remain either toys or research projects. | |||
# Read the code for the next instruction from the cell indicated by the program counter. | |||
Robotics, indeed, is the physical expression of the field of ], a discipline whose exact boundaries are fuzzy but to some degree involves attempting to give computers capabilities that they do not currently possess but humans do. Over the years, methods have been developed to allow computers to do things previously regarded as the exclusive domain of humans — for instance, "read" handwriting, play chess, or perform ]. However, progress on creating a computer that exhibits "general" intelligence comparable to a human has been extremely slow. | |||
# Decode the numerical code for the instruction into a set of commands or signals for each of the other systems. | |||
# Increment the program counter so it points to the next instruction. | |||
# Read whatever data the instruction requires from cells in memory (or perhaps from an input device). The location of this required data is typically stored within the instruction code. | |||
# Provide the necessary data to an ALU or register. | |||
# If the instruction requires an ALU or specialized hardware to complete, instruct the hardware to perform the requested operation. | |||
# Write the result from the ALU back to a memory location or register or perhaps an output device. | |||
Since the program counter is (conceptually) just another set of memory cells, it can be changed by calculations done in the ALU. Adding 100 to the program counter would cause the next instruction to be read from a place 100 locations further down the program. Instructions that modify the program counter are often known as "jumps" and allow for loops (instructions that are repeated by the computer) and often conditional instruction execution (both examples of ]). | |||
=== Arithmetic/logic unit (ALU) === | |||
{{main|Arithmetic logic unit}} | |||
The ] is capable of performing two classes of basic operations: Arithmetic and logic. | |||
Arithmetic operations include adding, subtracting, multiplying or dividing two numbers. The set of arithmetic operations may be very limited. Indeed, some designs do not directly support multiplication and division operations. Others include more complicated operations such as ] functions (sine, cosine, etc) and ]s. However, any computer that is capable of performing the simplest operations can be programmed to break down the more complex operations into simple steps that it can perform. Therefore, all computers can be programmed to perform all of the arithmetic operations given sufficient instructions and storage. An ALU may also compare numbers and return ] (true or false) in response to operations that instruct the computer to determine the relationship between two numbers. For instance, "is 64 greater than 65?" | |||
Logic operations involve ] logic: ], ], ] and ]. These can be useful both for creating complicated ]s and for certain kinds of data processing that are easily accomplished with boolean logic. | |||
Often, modern computers will contain multiple ALUs in order to facilitate techniques like ] design. Sometimes they will also include specialized structures similar in function to ALUs that perform more specialized tasks. ] units perform many ] arithmetic operations useful for certain types of ] and scientific programs. ]s specifically designed for ] arithmetic are also commonly seen.<ref>Though specialized hardware structures are often included, they are rarely necessary—at least in principle—for the computer to perform a given task. Floating point and vector math can be performed with programs using a series of simpler operations. However, specialized hardware can perform the task many times faster, and is therefore often needed if a computer is expected to complete a related task in a short time.</ref> | |||
=== Memory === | |||
{{main|Computer storage}} | |||
] was popular main memory for computers through the 1960s until it was completely replaced by semiconductor memory.]] | |||
A computer's memory may be viewed as a list of cells. Each cell has a numbered "address" and can store a single number. The computer may be instructed to "Put the number 123 into the cell numbered 1357" or to "Add the number that is in cell 1357 to the number that is in cell 2468 and put the answer into cell 1595". The information stored in memory may represent practically anything. Characters, integers, even computer instructions may be placed into memory with equal ease. Since stored program computers do not usually differentiate between different types of information, it is up to the software to give significance to what the computer sees as nothing but a series of numbers. | |||
In almost all modern computers, each memory cell is set up to store ]s in ]s of ]s. Each octet is able to represent 256 different numbers; usually either 0 to 255 or -128 to 127. An octet of bits is called a ]. To store larger numbers than a single byte allows, several consecutive bytes may be used (typically, two, four or eight). When negative numbers are required, they are usually stored in ] notation. Other arrangements are possible, but are usually seen in specialized applications or historical contexts. However, a modern computer may store any kind of information in memory as long as it can be somehow represented in numerical form. | |||
Many computers—nearly all modern computers—include a special set of memory locations called ]s that can be read and written to much more rapidly than the main memory area. There are typically several registers; ranging in quantity from a two or three to more than a hundred (though a more typical value is twenty or thirty). Registers are used for the most frequently needed data items to avoid having to access main memory every time data is needed. Since computers constantly work with data, reducing the need to access main memory (which is often slow compared to the ALU and control units) greatly increases the computer's speed. | |||
In more sophisticated computers there may be one or more memory ] which are slower than registers but faster than main memory. Generally computers with this sort of cache are designed to move frequently needed data into the cache automatically, often without the need for any intervention on the programmer's part. | |||
=== Input/output (I/O) === | |||
{{main|Input/output}} | |||
]s are common I/O devices used with computers.]] | |||
I/O is the means by which a computer receives information from the outside world, and reports information back to that world. On a typical personal computer, inputs include devices like the keyboard and ], and output devices include ]s, ] and the like.<ref>Although computer keyboards and monitors are the most readily recognizable forms of I/O, they are almost never directly connected to the CPU. Rather, they communicate with the CPU with the aid of several I/O busses and interfaces.</ref> However, a great variety of devices can be connected to a computer and serve as I/O. The computer that controls a modern ] might read the position of the pedals and steering wheel, the output of the engine ], the fuel tank level sensor, temperature readings inside the engine and sensors that monitor the speed of each wheel. The auto computer's output devices may include the various lights and gauges that the driver uses, the spark ignition circuits, fuel injection and other engine controls. Practically any device that can be made to interface with a digital system may be used as I/O. | |||
Some devices, such as ]s, serve as both inputs and outputs. Others, such as a ], are complex computers in their own right with their own I/O devices. Full computers may therefore also be used as I/O devices. A typical ] may contain several small computers that assist the main computer in I/O or are connected for communication purposes. Indeed, various forms of ] may easily be considered nothing more than a long-range extension of I/O. | |||
=== Multitasking === | |||
{{main|Computer multitasking}} | |||
While a computer may be viewed as running one gigantic program stored in its main memory, in some systems it is necessary to give the appearance of running several programs simultaneously. This is achieved by having the computer switch rapidly between running each program in turn. One means by which this is done is with a special signal called an ] which can periodically cause the computer to stop executing instructions where it was and do something else instead. By remembering where it was executing prior to the interrupt, the computer may return to that task later. If several programs are running "at the same time", then the interrupt generator may be causing several hundred interrupts a second, causing a program switch each time. Since modern computers typically execute instructions several orders of magnitude faster than human perception, many programs may seem to be running at the same time even though only one is ever executing in any given instant. This method of multitasking is sometimes termed "time-sharing" since each program is allocated a "slice" of time in turn. | |||
Before the era of cheap computers, the principle use for multitasking was to allow many people to share the same computer. | |||
Seemingly, multitasking would cause a computer that is switching between several programs to run more slowly - in direct proportion to the number of programs it is considering. However, most programs spend much of their time waiting for slow input/output devices to complete their tasks. If a program is waiting for the user to click on the mouse or press a key on the keyboard then it will not take a "time slice" until the event it is waiting for has occurred. This frees up time for other programs to run so that many programs may be run at the same time without unacceptable speed loss. | |||
=== Multiprocessing === | |||
{{main|Multiprocessing}} | |||
] designed many supercomputers that used heavy multiprocessing.]] | |||
Some computers may divide their work between one or more separate CPUs, creating a multiprocessing configuration. Traditionally, this technique was utilized only in large and powerful computers such as ]s, ]s and ]. However, multiprocessor and ] (multiple CPUs on a single integrated circuit) personal and laptop computers have become widely available and are beginning to see increased usage in lower-end markets as a result. | |||
Supercomputers in particular often have highly unique architectures that differ significantly from the basic stored-program architecture and from general purpose computers. They often feature thousands of CPUs, customized high-speed interconnects, and specialized computing hardware. Such designs tend to be useful only for specialized tasks due to the large scale of program organization required to sucessfully utilize most of a the available resources at once. Supercomputers usually see usage in large-scale ], ], and ] applications, as well as with other so-called "]" tasks. | |||
===Networking and the Internet=== | ===Networking and the Internet=== | ||
{{main|Computer networking|Internet}} | |||
] on the Internet.]] | |||
Computers have been used to coordinate information in multiple locations since the 1950s, with the US military's ] system the first large-scale example of such a system, which led to a number of special-purpose commercial systems like ]. | Computers have been used to coordinate information in multiple locations since the 1950s, with the US military's ] system the first large-scale example of such a system, which led to a number of special-purpose commercial systems like ]. | ||
In the 1970s, computer engineers at research institutions throughout the US began to link their computers together using telecommunications technology. This effort was funded by |
In the 1970s, computer engineers at research institutions throughout the US began to link their computers together using telecommunications technology. This effort was funded by ARPA (now ]), and the ] that it produced was called the ]. The technologies that made the Arpanet possible spread and evolved. In time, the network spread beyond academic and military institutions and became known as the ]. The emergence of networking involved a redefinition of the nature and boundaries of the computer. In the phrase of ] and ] (of ]), "the network is the computer". Computer operating systems and applications were modified to include the ability to define and access the resources of other computers on the network, such as peripheral devices, stored information, and the like, as extensions of the resources of an individual computer. Initially these facilities were available primarily to people working in high-tech environments, but in the 1990s the spread of applications like ] and the ], combined with the development of cheap, fast networking technologies like ] and ] saw computer networking become ubiquitous almost everywhere. In fact, the number of computers that are networked is growing phenomenally. A very large proportion of ] regularly connect to the ] to communicate and receive information.<ref>{{cite web | title=North America Internet Usage Stats | publisher=Internet World Stats | year=April 3, 2006|url=http://www.internetworldstats.com/america.htm#us|accessdate=2006-04-05}}</ref> "Wireless" networking, often utilizing ] networks, has meant networking is becoming increasingly ubiquitous even in mobile computing environments. | ||
== Further topics == | |||
==Alternative computing models== | |||
=== Hardware === | |||
The term '''hardware''' covers all of those parts of a computer that are tangible objects. Circuits, displays, power supplies, cables, keyboards, printers and mice are all hardware. | |||
Despite the massive gains in speed and capacity over the history of the digital computer, there are many tasks for which current computers are inadequate. For some of these tasks, conventional computers are fundamentally inadequate, because the time taken to find a solution grows very quickly as the size of the problem to be solved expands. Therefore, there has been research interest in some computer models that use biological processes, or the oddities of ], to tackle these types of problems. For instance, ] is proposed to use biological processes to solve certain problems. Because of the exponential division of cells, a DNA computing system could potentially tackle a problem in a massively parallel fashion. However, such a system is limited by the maximum practical mass of DNA that can be handled. | |||
<!-- WARNING: Please be careful about modifying this table, especially if you are not familiar with Misplaced Pages table syntax. Make judicious use of the "Preview" button! --> | |||
]s, as the name implies, take advantage of the unusual world of quantum physics. If a practical quantum computer is ever constructed, there are a limited number of problems for which the quantum computer is fundamentally faster than a standard computer. However, these problems, relating to ] and, unsurprisingly, quantum physics simulations, are of considerable practical interest. | |||
{| class="wikitable" | |||
|+''']''' | |||
|- | |||
| rowspan="2" | First Generation (Mechanical/Electromechanical) || Calculators || ], ], ] | |||
|- | |||
| Programmable Devices || ], ], ], ], ], ] | |||
|- | |||
| rowspan="2" | Second Generation (Vacuum Tubes) || Calculators || ] | |||
|- | |||
| Programmable Devices || ], ], ], ] | |||
|- | |||
| rowspan="2" | Third Generation (Discrete transistors and SSI, MSI, LSI ]) || ]s || ], ] | |||
|- | |||
| ] || ], ], ], ] | |||
|- | |||
| rowspan="9" | Fourth Generation (VLSI integrated circuits) || Minicomputer || ], ] | |||
|- | |||
| ] microcomputer || ], ] | |||
|- | |||
| ] microcomputer || ], ], ], ], ] | |||
|- | |||
| ] microcomputer || ], ], ] | |||
|- | |||
| ] microcomputer || ], ], ], ] | |||
|- | |||
| ] microcomputer <ref>Most major 64-bit ]s are extensions of earlier designs. All of the architectures mentioned here existed in 32-bit forms before their 64-bit incarnations were introduced.</ref>|| ], ], ], ] | |||
|- | |||
| ] || ], ] | |||
|- | |||
| ] || ], ], ], ] (PDA), ], ], ] | |||
|- | |||
| ] || | |||
|- | |||
| rowspan="4" | Fifth Generation (Theoretical future technologies) || ] || | |||
|- | |||
| ] || | |||
|- | |||
| ] || | |||
|- | |||
| ] || | |||
|} | |||
{| class="wikitable" | |||
These alternative models for computation remain research projects at the present time, and will likely find application only for those problems where conventional computers are inadequate. | |||
|+'''Other Hardware Topics''' | |||
|- | |||
| rowspan="3" | ] (]) || Input || ], ], ], ] | |||
|- | |||
| Output || ], ] | |||
|- | |||
| Both || ], ], ] drive, ] | |||
|- | |||
| rowspan="2" | ]ses || Short range || ], ], ], ] | |||
|- | |||
| Long range (]) || ], ], ] | |||
|- | |||
|} | |||
=== Software === | |||
See also ]. | |||
'''Software''' refers to parts of the computer that have no material form; programs, data, protocols, etc are all software. When software is stored in hardware that cannot easily be modified (such as ] ] in an ]), it is sometimes termed firmware to indicate that it falls into an area of uncertainty between hardware and software. | |||
==Computing professions and disciplines== | |||
In the developed world, virtually every ] makes use of computers. However, certain professional and academic disciplines have evolved that specialize in techniques to construct, program, and use computers. Terminology for different professional disciplines is still somewhat fluid and new fields emerge from time to time: however, some of the major groupings are as follows: | |||
{| class="wikitable" | |||
*] is the branch of ] that focuses both on hardware and software design, and the interaction between the two. | |||
|+''']''' | |||
*] is a traditional name of the academic study of the processes related to computers and computation, such as developing efficient ]s to perform specific class of tasks. It tackles questions as to whether problems can be solved at all using a computer, how efficiently they can be solved, and how to construct efficient programs to compute solutions. A huge array of specialties has developed within computer science to investigate different classes of problems. | |||
|- | |||
*] concentrates on methodologies and practices to allow the development of high quality software systems, while minimizing, and reliably estimating, costs and timelines. | |||
| rowspan="7" | ] || ]/] || ], ], ], ] (]), ], ], ] | |||
*]s concentrates on the use and deployment of computer systems in a wider organizational (usually business) context. | |||
|- | |||
*Many disciplines have developed at the intersection of computers with other professions; one of many examples is experts in ] who apply computer technology to problems of managing geographical information. | |||
| ]/] || ], ] | |||
|- | |||
| ] || ], ], ] | |||
|- | |||
| ] || ], ], ], ], ] | |||
|- | |||
| ] and ] || ] | |||
|- | |||
| ] || ] classic, ] | |||
|- | |||
| Experimental || ], ]/], ] | |||
|- | |||
| rowspan="2" | ] || ] || ], ], ] | |||
|- | |||
| Programming library || ] | |||
|- | |||
| rowspan="2" | ] || ] || ], ], ], ], ] | |||
|- | |||
| ] || ], ], ], ], ] | |||
|- | |||
| rowspan="3" | ] || ] (]) || ], ], ] Photon, ], ] | |||
|- | |||
| ] || ], ]s | |||
|- | |||
| Other || | |||
|- | |||
| rowspan="9" | ] || ] || ], ], ], ], Scheduling & Time management, ], ] | |||
|- | |||
| ] Access || ], ], ], ], ] | |||
|- | |||
| Design and manufacturing || ], ], Plant management, Robotic manufacturing, Supply chain management | |||
|- | |||
| ] || ], ], ], ], ], ], ] | |||
|- | |||
| ] || Music editing, Music playback, Mixing, ] | |||
|- | |||
| ] || ], ], ], ], ], ], ], ], ] | |||
|- | |||
| Educational || ], ], ], ] | |||
|- | |||
| ] || ], Arcade, ], Simulation, ], ], ], ] | |||
|- | |||
| Misc || ], ], ], ]/]s, ] | |||
|} | |||
=== Programming Languages === | |||
There are three major professional societies dedicated to computers, the ] the ] and ] ]. | |||
These are the languages used by ] to describe their ]s. They are generally either translated into ] by a ] or an ] - or they may be executed directly by an ] - or perhaps even some hybrid of the two techniques. There are thousands of different programming languages - some intended to be general purpose, others are useful only for some highly specialised application. | |||
<!-- ATTENTION! AUTHORS: | |||
Please do not add every programming language in existance into this table - there | |||
are vastly too many of them - and the right place for listing obscure languages | |||
is in the 'List of...' articles referenced below. | |||
Please only add very COMMONLY and CURRENTLY used languages to the lists below or | |||
else things will rapidly spiral out of control. | |||
--> | |||
{| class="wikitable" | |||
|+''']''' | |||
| rowspan="1" | ] || ], ], ], ], ], ] | |||
|- | |||
| rowspan="1" | Commonly used ]s || ] | |||
|- | |||
| rowspan="1" | Commonly used ]s || ], ], ], ], ], ], ] | |||
|- | |||
| rowspan="1" | Commonly used ]s || ], ], ], ], ], ] | |||
|- | |||
|} | |||
=== Professions and organizations === | |||
As the use of computers has spread throughout society, there are an increasing number of careers involving computers. Following the theme of hardware, software and firmware, the brains of people who work in the industry are sometimes known irreverently as wetware or meatware. | |||
{| class="wikitable" | |||
|+'''Computer-related professions''' | |||
|- | |||
| Hardware-related || ], ], ] | |||
|- | |||
| Software-related || ], ], ], ], ] | |||
|} | |||
The need for computers to work well together and to be able to exchange information has spawned the need for many standards organisations, clubs and societies of both a formal and informal nature. | |||
{| class="wikitable" | |||
|+'''Organizations''' | |||
| Standards groups || ], ], ], ], ], ] | |||
|- | |||
| Professional Societies || ], ], ] | |||
|- | |||
| Enthusiasts Clubs || .... | |||
|- | |||
| ]/] software groups || ] (FSF), ], ] | |||
|} | |||
==See also== | ==See also== | ||
{{ |
{{Wiktionary}} | ||
{{Wikiquote|Computers}} | |||
{{wikiquote}} | |||
{{Commons|Computer}} | {{Commons|Computer}} | ||
*] | |||
*The ] | |||
*] | |||
*] | |||
*] | |||
*] | *] | ||
*] | |||
*] | |||
*] | *] | ||
*Computer types: ], ], ] (along with the ]), ] computer, ] computers, ], ], ], ], ], ], ], ], ] (and the ]), ], ], and ] | |||
*] | *] | ||
*] | *] | ||
*] | *] | ||
*] and ] challenges such as: ], ], ], and how to solve them, such as ], ] | *] and ] | ||
*] | |||
*] | |||
*] | *] | ||
*] | |||
*] | |||
*] | |||
*] | |||
*] | |||
== |
== Notes == | ||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
See also ]. | |||
==Notes and references== | |||
<div class="references-small"> | <div class="references-small"> | ||
<references/> | <references/> | ||
</div> | </div> | ||
== |
== References == | ||
* | |||
* | |||
* | |||
{{Link FA|vi}} | |||
] | |||
] | |||
* {{note label|kempf1961|Kempf 1961|a}} {{cite paper | |||
| author = Kempf, Karl | |||
| title = Historical Monograph: Electronic Computers Within the Ordnance Corps | |||
| publisher = ] (]) | |||
| url = http://ed-thelen.org/comp-hist/U-S-Ord-61.html | |||
| date = 1961 | |||
}} | |||
* {{note label|phillips2000|Phillips 2000|a}} {{cite web | |||
| last = Phillips | |||
| first = Tony | |||
| publisher = American Mathematical Society | |||
| year = 2000 | |||
| title = The Antikythera Mechanism I | |||
| url = http://www.math.sunysb.edu/~tony/whatsnew/column/antikytheraI-0400/kyth1.html | |||
| accessdate=2006-04-05 | |||
}} | |||
* {{note label|shannon1940|Shannon 1940|a}} {{cite paper | |||
| author = Shannon, Claude Elwood | |||
| title = A symbolic analysis of relay and switching circuits | |||
| publisher = Massachusetts Institute of Technology | |||
| url = http://hdl.handle.net/1721.1/11173 | |||
| date = 1940 | |||
}} | |||
<!-- Don't need the temp article showing up in the categories. --> | |||
] | |||
] | |||
] | |||
{{Link FA|vi}} | |||
] | ] | ||
Line 231: | Line 428: | ||
] | ] | ||
] | ] | ||
] | |||
] | ] | ||
] | ] | ||
Line 240: | Line 436: | ||
] | ] | ||
] | ] | ||
] | |||
] | ] | ||
] | ] | ||
Line 252: | Line 447: | ||
] | ] | ||
] | ] | ||
] | ] | ||
] | ] | ||
] | ] | ||
] | ] | ||
] | ] | ||
] | ] | ||
Line 268: | Line 463: | ||
] | ] | ||
] | ] | ||
] | |||
] | ] | ||
] | ] | ||
Line 290: | Line 484: | ||
] | ] | ||
] | ] | ||
] |
Revision as of 13:22, 6 November 2006
For the IEEE magazine see Computer (magazine).A computer is a machine for manipulating data according to a list of instructions.
A list of computer instructions designed to perform some task is known as a program. When programs are contained in storage that may be easily modified by the computer itself, the device is said to have a von Neumann architecture. The ability to execute stored programs makes computers extremely versatile. The Church–Turing thesis is a mathematical statement of this versatility: Any computer with a certain minimum capability is, in principle, capable of performing the same tasks that any other computer can perform. Therefore, computers with capability and complexity ranging from that of a personal digital assistant to a supercomputer are all able to perform the same computational tasks so long as time and storage capacity are not considerations. Hence the same computer design may be used for tasks ranging from processing company payrolls to controlling unmanned spaceflights.
Computers take numerous physical forms. Early electronic computers were the size of a large room, consuming as much power as several hundred modern personal computers. On the other hand, an entire computer can now fit into a wrist watch. Today, large-scale computing facilities still exist for specialized scientific computation and for the transaction processing requirements of large organizations but society has come to recognise personal computers and their portable equivalent, the laptop computer as icons of the information age. These are what most people think of as a "computer". However, the most common form of computer in use today is the embedded computer. Embedded computers are usually relatively simple and physically small and are often used to control other devices. They may help control machines from fighter aircraft to industrial robots, digital cameras, childrens toys and even electric toothbrushes.
History of computing
Main article: History of computingThe question of which was the earliest computer is a difficult one. The very definition of what a computer is has changed over the years and it is therefore impossible to definitively answer the question.
Originally, the term "computer" referred to a person who performed numerical calculations (a human computer), often with the aid of a mechanical calculating device or analog computer. Examples of early mechanical computing devices included the abacus and the Antikythera mechanism, an ancient Greek device for calculating the movements of planets which dates from about 87 BC. The end of the Middle Ages saw a reinvigoration of European mathematics and engineering, and Wilhelm Schickard's 1623 device was the first of a number of mechanical calculators constructed by European engineers.
However, none of those devices fit the modern definition of a computer as a programmable device. In 1801, Joseph Marie Jacquard improvement to existing loom designs that used a series of punched paper cards as a template to allow his loom to weave intricate patterns automatically. While the resulting Jacquard loom is not usually considered to be a computer, it was an important step because the use of punched cards to define woven patterns can be viewed as an early, albeit limited, form of programmability.
In 1837, Charles Babbage was the first to conceptualize and design a fully programmable mechanical computer that he called "The Analytical engine" (not to be confused with his Difference engine which was a non-programmable mechanical calculator). Due to limits of the technology of the time, finances, and an inability to resist tinkering with his design, the Analytical engine was never actually constructed. Hence, Babbage is generally credited with the first design of a programmable computer.
By the end of the 19th century a number of technologies that would later prove useful in the design of practical computers had begun to appear. The punched card and the vacuum tube had appeared and large-scale automated data processing using machines to read, sort and tabulate punched cards was performed by tabulating machines designed by Hermann Hollerith and manufactured by Computing Tabulating Recording Corporation (CTR) who later became IBM.
During the first half of the 20th century, many scientific computing needs were met by increasingly sophisticated special-purpose analog computers, which used a direct mechanical or electrical model of the problem as a basis for computation. However, these were not programmable and generally lacked the versatility of today's computers. Analog and mechanical computers and calculators became increasingly rare as they were largely superceded by the development of the programmable digital computer.
A succession of steadily more powerful and flexible computing devices were constructed in the 1930s and 1940s, gradually adding the key features that are seen in modern computers. The use of digital electronics (largely invented by Claude Shannon in 1937) and more flexible programmability Template:Ref harvard were vitally important steps but defining one point along this road as "the first digital electronic computer" is exceedingly difficult. Notable achievements include the Atanasoff-Berry Computer (1937), a special-purpose machine that used valve-driven (vacuum tube) computation, binary numbers, and regenerative memory; the secret British Colossus computer (1944), which had limited programmability but demonstrated that a device using thousands of valves could be both made reliable and reprogrammed electronically; the Harvard Mark I, a large-scale electromechanical computer with limited programmability (1944); the decimal-based American ENIAC (1946)—which was the first general purpose electronic computer, but originally had an inflexible architecture that meant reprogramming it essentially required it to be rewired; and Konrad Zuse's Z machines, with the electromechanical Z3 (1941) being the first working machine featuring automatic binary arithmetic and feasible programmability.
Several developers of ENIAC, recognizing its flaws, came up with a far more flexible and elegant design, which came to be known as the stored program architecture or von Neumann architecture. This design was first formally described by John von Neumann in the paper "First Draft of a Report on the EDVAC", published in 1945. A number of projects to develop computers based on the stored program architecture commenced around this time; the first of these being completed in Great Britain. The first to be demonstrated working was the Manchester Small-Scale Experimental Machine (SSEM) or "Baby". However, the EDSAC, completed a year after SSEM, was perhaps the first practical implementation of the stored program design. Shortly thereafter, the machine originally described by von Neumann's paper—EDVAC—was completed but didn't see full-time use for an additional two years.
Nearly all modern computers implement some form of the stored program architecture, making it the single trait by which the modern word computer is defined. By this standard, many earlier devices would no longer be called "computers" by today's definition, but are usually referred to as such in their historical context.
Vacuum tube driven computer designs were in use throughout the 1950s, but were eventually replaced in the 1960s by transistor-based computers, which were smaller, faster, cheaper, and much more reliable - which allowed them to be produced on a commercial scale. By the 1970s, the adoption of integrated circuit technology and the subsequent creation of the microprocessor caused another major improvement in size, speed, cost and reliability. By the 1980s, computers were sufficiently small and cheap that it became cost-effective to use them in domestic appliances such as washing machines and it became easily possible for individuals to own a personal computer. Fuelled largely by the widespread growth of the Internet in the 1990s, ownership of personal computers is becoming as common as the television or the telephone and almost all modern electronic devices contain a computer of some kind.
Stored program architecture
Main articles: Computer program and Computer programmingThe defining feature of modern computers - and that which distinguishes them from all other machines - is that they can be programmed. That is to say that a list of instructions (the program) can be given to the computer and it will store them and carry them out at some time in the future.
In most cases, computer instructions are simple: add one number to another, move some data from one location to another, send a message to some external device, etc. These instructions are read from the computer's memory and are generally carried out (executed) in the order they were given. However, there are usually specialised instructions to tell the computer to jump ahead or backwards to some other place in the program and to carry on executing from there. These are called "jump" instructions (or branches). Furthermore, jump instructions may be made to happen conditionally so that different sequences of instructions may be used depending on the result of some previous calculation or some external event.
It is a convenient metaphor to imagine the computer working its way through the list of instructions in the program, just as a person might read a book—sometimes going back to an earlier place in the text—sometimes skipping sections that are not of interest but generally reading one line at a time. A computer may sometimes go back and repeat the instructions in some section of the program over and over again until some internal condition is met. This is called the flow of control within the program and it is what allows the computer to perform tasks repeatedly without human intervention.
A person using a pocket calculator can perform a basic arithmetic operation such as adding two numbers with just a few button presses. But to add together all of the numbers from 1 to 1,000 would take thousands of button presses and a lot of time—with a near certainty of making a mistake. On the other hand, a computer may be programmed to do this with just a few simple instructions. For example:
sum = 0 ; for ( i = 1 ; i <= 1000 ; i++ ) sum += i ; print ( sum ) ;
Once told to run this program, the computer will perform the repetitive addition task without further human intervention. It will almost never make a mistake and a modern PC can complete the task in about a millionth of a second.
However, computers cannot "think" for themselves in the sense that they only solve problems in exactly the way they are programed to. An intelligent human faced with the above addition task might soon realise that instead of adding up all of those numbers one can simply use the equation
and arrive at the correct answer (500,500) with little work. Some modern computers are able to make some decisions that speed up the execution of some programs by "guessing" about the outcomes of certain jump instructions and re-arranging the order of instructions slightly without changing their meaning (branch prediction, speculative execution, and out-of-order execution). However, computers cannot determine a more efficient way to perform the task given to them because they do not have an overall understanding of what the task, or the "big picture", is. In other words, a computer programmed to add up the numbers one by one as in the example above would do exactly that without regard to efficiency or alternative solutions.
Programs
In practical terms, a computer program might include anywhere from a dozen instructions (such as the simple traffic light example) to many millions of instructions for something like a word processor or a web browser. A typical modern computer can execute billions of instructions every second and nearly never make a mistake over years of operation.
Large computer programs may take teams of computer programmers years to write and the probability of the entire program having been written completely in the manner intended is unlikely. Errors in computer programs are called bugs. Sometimes bugs are benign and do not affect the usefulness of the program, in other cases they might cause the program to completely fail (or crash), in yet other cases there may be subtle problems. In the second traffic light example (above), there is a bug; if the traffic signal is showing red when someone switches the 'flash red' switch, it will cycle through green once more before starting to flash red. It is worthwhile to note that bugs are usually not the fault of the computer. Since computers merely execute the instructions they are given, bugs nearly always are the result of programmer error or an oversight made in the program's design.
In most computers, individual instructions are stored as machine code with each instruction being given a unique number (its operation code or opcode for short). The command to add two numbers together would have one opcode, the command to multiply them would have a different number and so on. The simplest computers are able to perform any of a handful of different instructions, the more complex computers have several thousand to choose from—each with a unique numerical code. Since the computer's memory is able to store numbers, it can also store the instruction codes. This leads to the important fact that entire programs (which are just lists of instructions) can be represented as lists of numbers and can themselves be manipulated inside the computer just as if they were numeric data. The fundamental concept of storing programs in the computer's memory alongside the data they operate on is the crux of the von Neumann, or stored program, architecture.
While the technologies used in computers have changed dramatically since the first electronic, general-purpose computers of the 1940s, most still use the von Neumann architecture. The design made the universal computer a practical reality.
In some cases, a computer might store some or all of its program in memory that is kept separate from the data it operates on. This is called the Harvard architecture after the Harvard Mark I computer. Often, modern computers display some traits of the Harvard architecture in their designs, such as in CPU caches.
While it is possible to write computer programs as long lists of numbers (machine language) and this technique was used with many early computers, it becomes extremely tedious to do so in practice, especially for complicated programs. Instead, each basic instruction can be given a short name that is both indicative of its function and easy to remember—a mnemonic such as ADD, SUB, MULT or JUMP. These mnemonics are collectively known as a computer's assembly language. Converting programs written in assembly language into something the computer can actually understand (machine language) is usually done by a computer program called an assembler.
Machine languages and the assembly languages that represent them (collectively termed low-level programming languages) tend to be unique to a particular type of computer. This means that an ARM architecture computer (such as may be found in a PDA or a hand-held videogame) cannot understand the machine language of an Intel Pentium or the AMD Athlon 64 computer that might be in a PC.
Writing long programs in assembly language is often difficult and error prone, so most complicated programs are written in more abstract High-level programming languages that are able to express the needs of the computer programmer more conveniently (and thereby help reduce programmer error). High level languages are usually "compiled" into machine language (or sometimes into assembly language and then into machine language) using another computer program called a compiler. Since high level languages are more abstract than assembly language, it is possible to use different compilers to translate the same high level language program into the machine language of many different types of computer. This is part of the means by which software like video games may be made available for different computer architectures such as personal computers and various video game consoles.
Example
Suppose a computer were being employed to drive a traffic light. A simple stored program might say:
- Turn off all of the lights
- Turn on the red light, wait for sixty seconds
- Turn off the red light, turn on the green light, wait for sixty seconds
- Turn off the green light, turn on the amber light, wait for two seconds
- Turn off the amber light
- Jump to instruction number (2).
With this set of instructions, the computer would cycle the light continually through red, green, amber and back to red again until told to stop running the program.
However, suppose there is a simple on/off switch connected to the computer that is intended be used to make the light flash red while some maintenance operation is being performed. The program might then instruct the computer to:
- Turn off all of the lights
- Turn on the red light, wait for sixty seconds
- Turn off the red light, turn on the green light, wait for sixty seconds
- Turn off the green light, turn on the amber light, wait for two seconds
- Turn off the amber light
- If the maintainance switch is NOT turned on then jump to instruction number (2)
- Turn on the red light, wait for one second
- Turn off the red light, wait for one second
- Jump to instruction number (6)
In this manner, the computer is either running the instructions from number (2) to (6) over and over or it's running the instructions from (6) down to (9) over and over, depending on the position of the switch.
How computers work
Main articles: Central processing unit and MicroprocessorA general purpose computer has four main sections: the arithmetic and logic unit (ALU), the control circuitry, the memory, and the input and output devices (collectively termed I/O). These parts are interconnected by bundles of wires (called buses).
The control unit, ALU, registers, and basic I/O (and often other hardware closely linked with these) are collectively known as a central processing unit (CPU). While early CPUs were comprised of many discrete components, since the mid-1970s CPUs have typically been constructed on a single integrated circuit called a microprocessor.
Control system
Main article: CPU designThe control system (often called a control unit or central control) directs the other core components of a computer. It reads and interprets (decodes) instructions in the program one by one. Usually the control system will decode each instruction and turn it into a series of control signals that operate the various other portions of the computer. Control systems in advanced computers may also resequence instructions in order to improve performance. A key component common in all control systems is the program counter, a special memory cell (usually a register) that keeps track of which location or locations in memory the next instruction is to be read from.
A simplified sequence describing the control system's function follows. Some of these steps may be performed concurrently or in a slightly different order, depending on the computer's particular design.
- Read the code for the next instruction from the cell indicated by the program counter.
- Decode the numerical code for the instruction into a set of commands or signals for each of the other systems.
- Increment the program counter so it points to the next instruction.
- Read whatever data the instruction requires from cells in memory (or perhaps from an input device). The location of this required data is typically stored within the instruction code.
- Provide the necessary data to an ALU or register.
- If the instruction requires an ALU or specialized hardware to complete, instruct the hardware to perform the requested operation.
- Write the result from the ALU back to a memory location or register or perhaps an output device.
Since the program counter is (conceptually) just another set of memory cells, it can be changed by calculations done in the ALU. Adding 100 to the program counter would cause the next instruction to be read from a place 100 locations further down the program. Instructions that modify the program counter are often known as "jumps" and allow for loops (instructions that are repeated by the computer) and often conditional instruction execution (both examples of control flow).
Arithmetic/logic unit (ALU)
Main article: Arithmetic logic unitThe ALU is capable of performing two classes of basic operations: Arithmetic and logic.
Arithmetic operations include adding, subtracting, multiplying or dividing two numbers. The set of arithmetic operations may be very limited. Indeed, some designs do not directly support multiplication and division operations. Others include more complicated operations such as trigonometry functions (sine, cosine, etc) and square roots. However, any computer that is capable of performing the simplest operations can be programmed to break down the more complex operations into simple steps that it can perform. Therefore, all computers can be programmed to perform all of the arithmetic operations given sufficient instructions and storage. An ALU may also compare numbers and return boolean truth values (true or false) in response to operations that instruct the computer to determine the relationship between two numbers. For instance, "is 64 greater than 65?"
Logic operations involve boolean logic: AND, OR, XOR and NOT. These can be useful both for creating complicated conditional statements and for certain kinds of data processing that are easily accomplished with boolean logic.
Often, modern computers will contain multiple ALUs in order to facilitate techniques like superscalar design. Sometimes they will also include specialized structures similar in function to ALUs that perform more specialized tasks. SIMD units perform many vector arithmetic operations useful for certain types of multimedia and scientific programs. Floating point units specifically designed for floating point arithmetic are also commonly seen.
Memory
Main article: Computer storageA computer's memory may be viewed as a list of cells. Each cell has a numbered "address" and can store a single number. The computer may be instructed to "Put the number 123 into the cell numbered 1357" or to "Add the number that is in cell 1357 to the number that is in cell 2468 and put the answer into cell 1595". The information stored in memory may represent practically anything. Characters, integers, even computer instructions may be placed into memory with equal ease. Since stored program computers do not usually differentiate between different types of information, it is up to the software to give significance to what the computer sees as nothing but a series of numbers.
In almost all modern computers, each memory cell is set up to store binary numbers in octets of bits. Each octet is able to represent 256 different numbers; usually either 0 to 255 or -128 to 127. An octet of bits is called a byte. To store larger numbers than a single byte allows, several consecutive bytes may be used (typically, two, four or eight). When negative numbers are required, they are usually stored in two's complement notation. Other arrangements are possible, but are usually seen in specialized applications or historical contexts. However, a modern computer may store any kind of information in memory as long as it can be somehow represented in numerical form.
Many computers—nearly all modern computers—include a special set of memory locations called registers that can be read and written to much more rapidly than the main memory area. There are typically several registers; ranging in quantity from a two or three to more than a hundred (though a more typical value is twenty or thirty). Registers are used for the most frequently needed data items to avoid having to access main memory every time data is needed. Since computers constantly work with data, reducing the need to access main memory (which is often slow compared to the ALU and control units) greatly increases the computer's speed.
In more sophisticated computers there may be one or more memory cache memories which are slower than registers but faster than main memory. Generally computers with this sort of cache are designed to move frequently needed data into the cache automatically, often without the need for any intervention on the programmer's part.
Input/output (I/O)
Main article: Input/outputI/O is the means by which a computer receives information from the outside world, and reports information back to that world. On a typical personal computer, inputs include devices like the keyboard and mouse, and output devices include computer monitors, printers and the like. However, a great variety of devices can be connected to a computer and serve as I/O. The computer that controls a modern automobile might read the position of the pedals and steering wheel, the output of the engine oxygen sensor, the fuel tank level sensor, temperature readings inside the engine and sensors that monitor the speed of each wheel. The auto computer's output devices may include the various lights and gauges that the driver uses, the spark ignition circuits, fuel injection and other engine controls. Practically any device that can be made to interface with a digital system may be used as I/O.
Some devices, such as hard disks, serve as both inputs and outputs. Others, such as a graphics processing unit, are complex computers in their own right with their own I/O devices. Full computers may therefore also be used as I/O devices. A typical personal computer may contain several small computers that assist the main computer in I/O or are connected for communication purposes. Indeed, various forms of computer networking may easily be considered nothing more than a long-range extension of I/O.
Multitasking
Main article: Computer multitaskingWhile a computer may be viewed as running one gigantic program stored in its main memory, in some systems it is necessary to give the appearance of running several programs simultaneously. This is achieved by having the computer switch rapidly between running each program in turn. One means by which this is done is with a special signal called an interrupt which can periodically cause the computer to stop executing instructions where it was and do something else instead. By remembering where it was executing prior to the interrupt, the computer may return to that task later. If several programs are running "at the same time", then the interrupt generator may be causing several hundred interrupts a second, causing a program switch each time. Since modern computers typically execute instructions several orders of magnitude faster than human perception, many programs may seem to be running at the same time even though only one is ever executing in any given instant. This method of multitasking is sometimes termed "time-sharing" since each program is allocated a "slice" of time in turn.
Before the era of cheap computers, the principle use for multitasking was to allow many people to share the same computer.
Seemingly, multitasking would cause a computer that is switching between several programs to run more slowly - in direct proportion to the number of programs it is considering. However, most programs spend much of their time waiting for slow input/output devices to complete their tasks. If a program is waiting for the user to click on the mouse or press a key on the keyboard then it will not take a "time slice" until the event it is waiting for has occurred. This frees up time for other programs to run so that many programs may be run at the same time without unacceptable speed loss.
Multiprocessing
Main article: MultiprocessingSome computers may divide their work between one or more separate CPUs, creating a multiprocessing configuration. Traditionally, this technique was utilized only in large and powerful computers such as supercomputers, mainframe computers and servers. However, multiprocessor and multi-core (multiple CPUs on a single integrated circuit) personal and laptop computers have become widely available and are beginning to see increased usage in lower-end markets as a result.
Supercomputers in particular often have highly unique architectures that differ significantly from the basic stored-program architecture and from general purpose computers. They often feature thousands of CPUs, customized high-speed interconnects, and specialized computing hardware. Such designs tend to be useful only for specialized tasks due to the large scale of program organization required to sucessfully utilize most of a the available resources at once. Supercomputers usually see usage in large-scale simulation, graphics rendering, and cryptography applications, as well as with other so-called "embarrassingly parallel" tasks.
Networking and the Internet
Main articles: Computer networking and InternetComputers have been used to coordinate information in multiple locations since the 1950s, with the US military's SAGE system the first large-scale example of such a system, which led to a number of special-purpose commercial systems like Sabre.
In the 1970s, computer engineers at research institutions throughout the US began to link their computers together using telecommunications technology. This effort was funded by ARPA (now DARPA), and the computer network that it produced was called the ARPANET. The technologies that made the Arpanet possible spread and evolved. In time, the network spread beyond academic and military institutions and became known as the Internet. The emergence of networking involved a redefinition of the nature and boundaries of the computer. In the phrase of John Gage and Bill Joy (of Sun Microsystems), "the network is the computer". Computer operating systems and applications were modified to include the ability to define and access the resources of other computers on the network, such as peripheral devices, stored information, and the like, as extensions of the resources of an individual computer. Initially these facilities were available primarily to people working in high-tech environments, but in the 1990s the spread of applications like e-mail and the World Wide Web, combined with the development of cheap, fast networking technologies like Ethernet and ADSL saw computer networking become ubiquitous almost everywhere. In fact, the number of computers that are networked is growing phenomenally. A very large proportion of personal computers regularly connect to the Internet to communicate and receive information. "Wireless" networking, often utilizing mobile phone networks, has meant networking is becoming increasingly ubiquitous even in mobile computing environments.
Further topics
Hardware
The term hardware covers all of those parts of a computer that are tangible objects. Circuits, displays, power supplies, cables, keyboards, printers and mice are all hardware.
Peripheral device (Input/output) | Input | Mouse, Keyboard, Joystick, Image scanner |
Output | Monitor, Printer | |
Both | Floppy disk drive, Hard disk, Optical disc drive, Teleprinter | |
Computer busses | Short range | RS-232, SCSI, PCI, USB |
Long range (Computer networking) | Ethernet, ATM, FDDI |
Software
Software refers to parts of the computer that have no material form; programs, data, protocols, etc are all software. When software is stored in hardware that cannot easily be modified (such as BIOS ROM in an IBM PC compatible), it is sometimes termed firmware to indicate that it falls into an area of uncertainty between hardware and software.
Programming Languages
These are the languages used by Computer programmers to describe their algorithms. They are generally either translated into machine language by a compiler or an assembler - or they may be executed directly by an interpreter - or perhaps even some hybrid of the two techniques. There are thousands of different programming languages - some intended to be general purpose, others are useful only for some highly specialised application.
Professions and organizations
As the use of computers has spread throughout society, there are an increasing number of careers involving computers. Following the theme of hardware, software and firmware, the brains of people who work in the industry are sometimes known irreverently as wetware or meatware.
Hardware-related | Electrical engineering, Electronics engineering, Computer engineering |
Software-related | Human-computer interaction, Information technology, Software engineering, Systems analyst, Web design |
The need for computers to work well together and to be able to exchange information has spawned the need for many standards organisations, clubs and societies of both a formal and informal nature.
Standards groups | ANSI, IEC, IEEE, IETF, ISO, W3C |
Professional Societies | ACM, SIGGRAPH, IET |
Enthusiasts Clubs | .... |
Free/Open source software groups | Free Software Foundation (FSF), Mozilla Foundation, Apache Software Foundation |
See also
- Computability theory
- Computer science
- Computing
- Computers in fiction
- Computer music
- Computer security and Computer insecurity
- List of computer term etymologies
Notes
- In 1961, ENIAC consumed an estimated 174 kW. By comparison, a typical personal computer may use around 400 W; over four hundred times less. Template:Ref harvard
- It is not universally true that bugs are solely due to programmer oversight. Computer hardware may fail or may itself have a fundamental problem that produces unexpected results in certain situations. For instance, the Pentium FDIV bug caused some Intel microprocessors in the early 1990s to produce inaccurate results for certain floating point division operations. This was caused by a flaw in the microprocessor design and resulted in a partial recall of the affected devices.
- Even some later computers were commonly programmed directly in machine code. Some minicomputers like the DEC PDP-8 could be programmed directly from a panel of switches. However, this method was usually used only as part of the booting process. Most modern computers boot entirely automatically by reading a boot program from some non-volatile memory
- However, there is sometimes some form of machine language compatibility between different computers. An x86-64 compatible microprocessor like the AMD Athlon 64 is able to run most of the same programs that an Intel Core 2 microprocessor can, as well as programs designed for earlier microprocessors like the Intel Pentiums and Intel 80486. This contrasts with very early commercial computers, which were often one-of-a-kind and totally incompatible with other computers.
- High level languages are also often interpreted rather than compiled. Interpreted languages are translated into machine code on the fly by another program called an interpreter.
- The control unit's rule in interpreting instructions has varied somewhat in the past. While the control unit is solely responsible for instruction interpretation in most modern computers, this is not always the case. Many computers include some instructions that may only be partially interpreted by the control system and partially interpreted by another device. This is especially the case with specialized computing hardware that may be partially self-contained. For example, EDVAC, the first modern stored program computer to be designed, used a central control unit that only interpreted four instructions. All of the arithmetic-related instructions were passed on to its arithmetic unit and further decoded there.
- Instructions often occupy more than one memory address, so program counters usually increase by the number of memory locations required to store one instruction.
- Though specialized hardware structures are often included, they are rarely necessary—at least in principle—for the computer to perform a given task. Floating point and vector math can be performed with programs using a series of simpler operations. However, specialized hardware can perform the task many times faster, and is therefore often needed if a computer is expected to complete a related task in a short time.
- Although computer keyboards and monitors are the most readily recognizable forms of I/O, they are almost never directly connected to the CPU. Rather, they communicate with the CPU with the aid of several I/O busses and interfaces.
- "North America Internet Usage Stats". Internet World Stats. April 3, 2006. Retrieved 2006-04-05.
{{cite web}}
: CS1 maint: year (link) - Most major 64-bit instruction set architectures are extensions of earlier designs. All of the architectures mentioned here existed in 32-bit forms before their 64-bit incarnations were introduced.
References
- Kempf, Karl (1961). "Historical Monograph: Electronic Computers Within the Ordnance Corps". Aberdeen Proving Ground (United States Army).
{{cite journal}}
: Cite journal requires|journal=
(help) - Phillips, Tony (2000). "The Antikythera Mechanism I". American Mathematical Society. Retrieved 2006-04-05.
- Shannon, Claude Elwood (1940). "A symbolic analysis of relay and switching circuits". Massachusetts Institute of Technology.
{{cite journal}}
: Cite journal requires|journal=
(help)
Category:Computing Category:Classes of computers
Category: