Copyrighted Material
Total Page:16
File Type:pdf, Size:1020Kb
1 From the Calculator to the Supercomputer 1.1. Introduction As noted in the Preface of this book, almost everyone uses computers, often unknowingly, in both professional and personal activities. The first computers weighed tons and took up a lot of space, while consuming a lot of energy. Today, our mobile phones have several tiny, energy-efficient computers built into them. The history of these machines, known to us as computers, is marked by a few major steps that we present in this chapter. Let us first look at the evolution of hardware; we will deal with computer networks and software in the chapters that follow. 1.2. Some important concepts Before describing the main steps that precede the construction of the first computers, let us clarify a few concepts that are important in this history. 1.2.1. InformationCOPYRIGHTED and data MATERIAL The word “information” covers a wide variety of fields. For example, our five senses (sight, smell, taste, hearing and touch) transmit information to our brains that is essential to our lives and even our survival. 2 Inside the World of Computing Native Americans exchanged more structured information (e.g. as a way of inviting people to a tribal gathering) by means of smoke signals. These signals were coded and communicated, but they could not be stored. Today, the word “information” is predominantly used to refer to events such as those presented in journalism (written or digital press, television news, radio, etc.). For our purposes, we will use a narrower definition: information is an element of knowledge that can be translated into a set of signals, according to a determined code, in order to be stored, processed or communicated. Analog information is supported by a continuous signal, an oscillation in a power line, for example, or a bird song. Digital information is information that is symbolically coded with numbers (e.g. 384,400 for the distance in kilometers from the Earth to the Moon). The theoretical concept of information was introduced from theoretical research on electrical communication systems. In a general sense, an information theory is a theory that aims to quantify and qualify the notion of information content present in a dataset. In 1948, the American mathematician Claude Shannon published the article, “A Mathematical Theory of Communication”1 and has since been considered the father of information theory. Data are what computers deal with, and we will come back to data in Chapter 4. These are raw quantities (numbers, texts, etc.) that will be digitized (converted into a series of numbers) so that they can be understood and manipulated by computers. Alphabetic characters (and other characters) can be easily digitized. A sound can be represented by a sequence of regularly sampled sound intensities, each digitally encoded. The information contained in digital data, that is, a number, depending on its context (on a pay slip, name and gross salary is information obtained from digital data based on their place on the pay slip). 1 Claude Shannon (1916–2001), an American engineer and mathematician, split his career between the Massachusetts Institute of Technology (MIT) and Bell Laboratories. In this article, he proposes a unit of information that is exactly the amount of information that a message can bring, which can only take two possible values, and with the same probability (e.g. 0 or 1). From the Calculator to the Supercomputer 3 1.2.2. Binary system Computers process digital data encoded in base-2, and we will see why; but first, a brief description of this binary system. We usually count in base-10, the decimal system that uses 10 digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). To go beyond 9, we have to “change rank”: if the rank of the units is full, we start the rank of the tens and reset the units to zero and so on. So, after 9, we have 10. When you get to 19, the row of units is full. So, we add a dozen and reset the unit rank to zero: we get to 20. The binary system, or base-2 numbering system, uses only two symbols, typically “0” and “1”. The number zero is written as “0”, one is written as “1”, two is written as “10”, three is written as “11”, four is written as “100”, etc. In the binary system, the unit of information is called the bit (contraction of “binary digit”). For example, the base-2 number “10011” uses 5 bits. It is quite easy to convert a decimal number (dn) to a binary number (bn). The simple solution is to divide the dn by 2; note the remainder of the division (0 or 1) which will be the last bit of the bn, start again with the previous quotient until the quotient is zero. For example, if the dn is 41, the division by 2 gives 20 + 1; the last bit (called rank 1) of the bn is 1; we divide 20 by 2, which gives 10 + 0; the bit of rank 2 is 0; we divide 10 by 2, which gives 5 + 0; the bit of rank 3 is 0; we divide 5 by 2, which gives 2 + 1; the bit of rank 4 is 1; we divide 2 by 2, which gives 1 + 0; the bit of rank 5 is 0; we divide 1 by 2, which gives 0 + 1; the bit of rank 6 is 1. So, the binary number is 101001. The importance of the binary system for mathematics and logic was first understood by the German mathematician and philosopher Leibnitz in the 17th century. The binary system is at the heart of modern computing and electronics (calculators, computers, etc.) because the two numbers 0 and 1 are easily translated into the voltage or current flow. 1.2.3. Coding In real life, the same information can be represented in different ways. For example, administrations use different forms to represent a date of birth: January 10, 1989; 01/10/1989; 10/JAN/89; etc. It is therefore necessary to 4 Inside the World of Computing agree on the same way of representing numbers and characters. This is coding. Coding of information has existed for several years. For example, Morse code, named after its inventor Samuel Morse (1791–1872), is a telegraphic code using a conventional alphabet to transmit a text, using a series of long and short pulses. 1. A hyphen is equal to three dots. 2. Spacing between two elements of the same letter is equal to one dot. 3. Spacing between two letters is equal to three dots. 4. Spacing between two words is equal to seven dots. Figure 1.1. Morse code Information coding refers to the means of formalizing information so that it can be manipulated, stored or transmitted. It is not concerned with the content but only with the form and size of the information to be coded. With the advent of the computer, it has been necessary to develop data coding standards to facilitate their manipulation by computer tools around the world. We can represent the set of characters by binary codes of determined length. Binary is used for obvious reasons, one bit being the minimum amount of information that can be transmitted. From the Calculator to the Supercomputer 5 In computer science, we mainly use the bit, the byte (unit of information composed of 8 bits, which allows us to store a character such as a number or a letter) and the word (unit of information composed of 16 bits). We commonly use multiples: kilobyte (KB) for a thousand bytes, megabyte (MB) for a million bytes, gigabyte (GB) for a billion bytes and so on. 1.2.4. Algorithm What should the computer do with this data encoded in binary numbers? What processing must it do? Adding two numbers is a trivial process, but we expect much more from a computer, and we must tell it what is expected of it! The word algorithm comes from the name of the great Persian mathematician Al Khwarizmi (ca. 820 CE), who introduced decimal numeration (brought from India) in the West and taught the elementary rules of calculation related to it. The notion of the algorithm is thus historically linked to numerical manipulations, but it has gradually developed to deal with increasingly complex objects, texts, images, logical formulas, etc. An algorithm, very simply, is a method, a systematic way of doing something: sorting objects, indicating a path to a lost tourist, multiplying two numbers or looking up a word in the dictionary. A recipe can be considered an algorithm if we can reduce its specificity to its constituent elements: – input information (ingredients, materials used); – simple elementary instructions (slicing, salting, frying, etc.), which are carried out in a precise order to achieve the desired result; – a result: the prepared dish. Algorithms, in the computer sense, appeared with the invention of the first machines equipped with automations. More precisely, in computer science, an algorithm is a finite and unambiguous sequence of operations or instructions to solve a problem or to obtain a result. It can be translated, thanks to a programming language, into a program executable by a computer. 6 Inside the World of Computing Here is a simple example, the algorithm for determining the greatest common divisor (GCD) of two integers, a and b (Euclid’s algorithm): READ a and b If b>a, then PERMUTE a and b RETURN r=the remainder of the division of a by b If r is different from 0 REPLACE a by b then b by r GO TO RETURN WRITE b END Algorithms, in the real lives of computer scientists, are of course more complex.