Info in zeros and ones

Digitizing information 

We will look at three types of data: text, pictures/film and sound. How can a computer system digitally encode those three forms of information. Furthermore, how can you encode that information into numbers containing only zeros and ones? And why only zeros and ones? 

Switches

Let's start with that last question. A computer runs on electricity. Electrical voltage can be on (1) or off (0). Take the light switches at your home as an example. If you press them, the light comes on. If you press it again, it turns off again. The switch box, however, is a bit more like your computer. There are already a few more switches in there. A modern computer processor contains millions, if not billions, of those switches that you can turn on and off. 

When you combine switches, you can create logical circuits. For example: if you turn on two switches (both on 1), the end result is also a 1. In that case you determine that one AND (AND) the other must be on to get a 1 as the final result. But you could also say that one or (OR) the other must be on to get a 1 as the final result. In short: a programmer determines what should happen when one or more switches are on or off. Caution: that explanation is a bit brief, but it basically boils down to this.

Zeros and ones

Digital computer systems, as a result of their architecture, know only 2 states: on (1) and off (0) and combinations of zeros and ones..If we want to enter data into computers, we will first have to convert/translate them into combinations of zeros and ones. 

The text you are reading here has been translated by the computer system into zeros and ones. What you are reading now is the result of yet another translation: the computer has converted the stored zeros and ones into pixels on your screen. A '1' on your screen consists of a series of small 'lights' (picture elements = pixels) that are turned off (they are black). The white background behind these letters are lights that assign as many values to red as to blue and green. The result of that combination produces white light. Strange, isn't it? But that's what's happening in front of your eyes right now.

Binary? Read more:  Arithmetic systems

Below we provide answers (in addition to brief bits of history) to the following questions:

  1. How is text converted to zeros and ones?
  2. How are images converted to zeros and ones?
  3. How is sound converted to zeros and ones?

Question 1. Text encoding

Each key on a keyboard is assigned a particular number. An uppercase A, for example, is assigned the number 65. In this way, each key corresponds to a particular decimal number. If you press the space bar, your computer internally receives the decimal number 32 as a signal. This assignment of keys to decimal numbers is standardized. All types of keyboards (azerty, querty, touchscreen keyboards...) make the same standardized translation.  

That standard technique bears the name ASCII( American Standard for Information Interchange . However, it has a limitation, as the abbreviation actually indicates. Originally, it is an American standard and, consequently, it knows only symbols used by Americans. For that reason, the technique has been extended with other (mainly non-western) symbols to make it usable worldwide. It now bears the name UTF-8( Unicode Transformation Format .) Read more about ASCII and UTF-8 on the next page.

The ASCII table

In summary, it boils down to the following:

  1. You tap a key on your keyboard.
  2. The key corresponds to a decimal number.
  3. The computer translates the decimal number into a binary number.

The Romans did it too: a short history

Visualization of Roman long-distance communications.

The idea of converting the alphabet to a table was certainly not new. Cleoxenus and Democleitus devised a method further elaborated by Polybius, which greatly improved long-distance communication. They used combinations of torches attached to panels. Each combination of torches represented a particular letter of the alphabet. Two (wooden?) panels were set up for that purpose. Each panel had holders for up to five torches. This gave a total of 25 possible combinations, which roughly corresponded to the number of letters in the Greek alphabet. 

By analogy, we can compare this to how a crossword works. The first panel then represents the horizontal digits in the grid, the second (right) panel represents the vertical digits in the grid. Two torches on the left panel and five torches on the right panel stood for the letter k. 

The comparison to a crossword puzzle somewhat detracts from the inventiveness of this invention. The transmitter "scans" a two-dimensional row of characters. It transmits information about the position of each element in a grid. It evokes comparisons to the methods used by televisions and fax machines to scan and transmit images. It also brings to mind "discretization" in digitizing images, which will be discussed later. 

Modern visualization of the two-dimensional assignment of the alphabet to numbers.

Polybius advised recipients to use a stenoscope, a kind of viewing tube with two funnels through which you could better fix the eyes. (The telescope had not yet been invented. The 11th-century Arab scientist Alhazen experimented with parabolic mirrors and magnifying glasses. His work was translated into Latin in 1572 and helped lead to the development of the telescope with which Galilei became famous.) A stenoscope also had its limitations because it did not magnify the image. Over a distance of more than one kilometer, the different flares could hardly be distinguished from each other. Moreover, the dispatch post required a lot of people to quickly place and move the torches. No evidence has been found that this system of communication was ever put into practice.

Sextus Julius Africanus (232-290) described a similar Roman method of transmitting texts using fire signals. This involved splitting the alphabet into three columns:

"The Romans use a system, a very remarkable one in my opinion, to tell each other all kinds of things using fire signals. They divide the places for signaling in such a way that they have fields in the middle, right and left. Then they divide the letters in such a way that alpha to theta get their place on the left, those from iota to pi in the middle, and those from rho to psi on the right. For example, if they want to send the letter rho, they put one flare in the air on the right side, for sigma two (...). The receivers write down the letters in the form of fire signals and send it to the next station, which in turn forwards it to the next and so on until the last station is reached."

Of course, it is not the same technique, but the principles are similar. 

  1. The ASCII table links "letters" to numbers.
  2. The Romans assigned each letter an X and Y position in a table. Mathematically, we could speak of a two-dimensional vector space.

Question 2. Digitizing images

How can a digital computer system translate an image into binary numbers? It's much simpler than it seems. 

A digital camera or scanner divides an image of reality into rows and columns, as if you were holding a transparent crossword puzzle in front of your eyes. Each box in such a table is called a pixel. For each pixel, the system measures the color value. If no light falls on a pixel at all, the pixel is black or simply 0. 

No doubt you know that you can split white light into all the colors of the rainbow and that you can obtain colors by mixing them. The three basic colors you can 'add' together (additive colors) are RED, GREEN and BLUE. This is why screens are referred to as RGB colors. If you add these three basic colors together in their maximum quantity, you get white again. On a computer system, one sets this maximum value equal to 255. 

R = 255, G = 255 and B = 255 results in white. Setting the three values to 0 results in a black pixel. So the value can vary between 0 and 255 for each base color. In other words, for each base color, this yields 256 different possibilities. By mixing those quantities together to a greater or lesser extent, you can obtain 16,777,216 different color combinations. That's quite a lot. 

  
Transcription of the film: " Digital photographs are made up of pixels. That's short for "picture elements." Here I have opened a picture in GIMP, a free and open source image editing program. A pixel image consists of horizontal rows and vertical columns. If you just look at the image you don't see the pixels. When you zoom deep into an image, you see the different cells of the grid. Each pixel has an x-position in a row and a y-position in a column. For each pixel, you can see the color values for red, green and blue on a scale between the minimum value 0 and the maximum value 255. This pixel has a value of 129.7 for red, 131.1 for green and 125.5 for blue. If you change the values to white, the 3 basic colors will have a value of 255. If we choose black, then the colors get the minimum value 0. RGB uses decimal values, but at the bottom you see a different color notation. That one is the hexadecimal value notated in the sixteenth-number system."

Summary:  

  1. A digital system places a "grid" (with x number of columns and y number of rows) over an image. Each box in such a grid is a pixel. 
  2. For each pixel, the value for the three basic colors is measured.
  3. For each pixel, the computer "remembers" 5 number data: the X position in the grid, the Y position in the grid, the value for RED, the value for GREEN and the value for BLUE.
  4. The computer converts those 5 numbers into binary numbers.
Russell Kirsch

RGB and pixels... nothing new under the sun

The RGB color system has existed since the mid-19th century. It is based on theories of physicists such as Thomas Young, Hermann Helmholtz and James Maxwell.

Russell Kirschis considered the inventor of the square pixel. In the 1950s, he was part of a team that developed the square pixel. 

"Squares were the most logical choice," Kirsch says. "Of course it wasn't the only option, but we used squares. It was something very silly that everyone in the world has suffered from ever since."

Kirsch tries to make up for his "mistake. Inspired by the mosaic builders of antiquitywho constructed scenes of stunning detail with pieces of tile, Kirsch wrote a program that transforms the thick, clunky squares of a digital image into a smoother image formed by variably shaped pixels.

Question 3: From sound to number

Remains the final question: how can you convert sound, whether music or voice, into numbers? 

Sound are vibrations in the air. Sound propagates like a wave. The more waves in a given time (higher frequency), the higher the tone. The higher the wave, the higher the volume.In other words, a high wave hurts the ears more. 

When digitizing sound, the system measures the number of waves in a given time and of each wave it also measures the height.So the measurement results are also numbers. You can guess the rest: the computer translates the decimal measurement results into binary numbers.... The more measurements per unit of time, the more accurate the result. After all, it makes no sense to make only a single measurement per second. That way, you would no longer be able to reproduce the sound. The sound of an audio CD contains no less than 44,100 measurements per second.That's quite a lot.

Sound recordings were analog for a long time, meaning they really recorded the sound as a wave and not as a disguised digital signal. An LP or phonograph record is not digital. Unlike a punched record and a CD, the record contains no holes or pits but "mountains and valleys" over which the needle glides. The sound is literally recorded to ANALOGY with reality. This is why people use the designation analogfor such recording.

Summary:

  1. The amplitude or "height" of the sound wave indicates the sound level. The higher the sound level, the higher the wave. 
  2. The wavelength, "the width" of the sound wave, is inversely proportional to frequency. the higher the frequency (i.e., the more waves per unit length), the shorter the wavelength and the higher the perceived tone.
  3. Sound is continuous.  If you want to record sound very accurately, you have to take a lot of measurements.

Microphone and speaker: a short history

It may be said: sound recordings came later than the microphone and speaker. The first practical application of the microphone and speaker, was the telephone, discovered earlier by accident by Graham Bell. 

The first usable telephone came from Alexander Graham Bell (1847- 1922), who discovered proper technology rather by accident. Bell was fascinated by the human voice for good reason, as he was an active teacher of the deaf and dumb. He wanted to make the human voice "visible" to the deaf and dumb. He built a phonautograph as had already been described by Frenchman Léon Scott de Martinville (1817-1879) in 1857. He rotated a side-moving rotating and soot-covered cylinder. In front of it, he placed a marker glued at the other end to a fleece. When you spoke to it, the marker vibrated and drew a visible trace in the soot. Bell believed that the deaf and dumb could learn to read this trace. He thought it should be possible to reproduce the sound with compressed air if he could get the stylus in the cylinder to cut a trace. Yet he did not pursue this idea, which would be developed into the phonograph a short time later by Thomas Alva Edison. Bell wanted to put all his time into a harmonic telegraph that would allow you to send multiple signals simultaneously over one line. He was only too happy to demonstrate this by singing tones aimed at the strings of a piano. With each tone produced, not one, but several strings vibrated. Looking for a practical realization, he discovered the telephone earlier by accident. A steel spring pressed against the telegraph transmitter's magnetic coil produced an alternating magnetic field, which could be heard as a buzzing tone at the receiving station. Bell and Thomas Augustus Watson (1854-1934) immediately set to work and developed a microphone/speaker with a diaphragm and a vibrating spring. Like Reis, the human voice was difficult to understand. In 1876 he obtained a patent on the harmonic telegraph and on the speaking telegraph, even though it was far from complete or usable. A liquid microphone in which a conductive liquid caused the resistance to change as the needle was dipped deeper or less deeply into the liquid brought some improvement. On March 10, 1876, the stage was set. Bell wrote of that day in his notes, "I shouted (...) the following phrase: "Mr. Watson, come here. I want to see you." To my delight, he came and declared that he had heard and understood what I said. I asked him to repeat the words. He replied, "You said, 'Mr. Watson, come here. I want to see you."' In 1876, the U.S. celebrated its centennial of independence. For Bell, it was a unique opportunity to present his invention at the "Centennial Exhibition" in Philadelphia. Even though he had only a small booth at this show, he managed to arouse the enthusiasm of William Thomson (1824-1907) and Dom Pedro II, Emperor of Brazil (1825-1891), among others. The telephone became a grandiose success story, and the Bell Telephone Company founded by Bell was an outright hit. The first step had been taken: sound could be converted into electricity and reconverted into air vibrations.

First came the phonograph: a short history

It was the famous Edison who, to the regret of Frenchman Charles Cros, managed to capture sound in a mechanical memory, the phonograph. In 1878, Edison gave his plans for the phonograph to his instrument maker. Again, the principle was as simple as it was ingenious. A needle attached to a vibrating diaphragm scratched grooves in a tin-foil-covered wax cylinder that rotated on a metal cylinder. Recording quality was greatly improved by its carbon-resistance microphone. The sound could be replayed afterwards by placing a needle against the rotating cylinder. The vibrations of the needle were amplified by a horn. The devices had a mechanical motor driven by a crank. Thus, the playback speed initially also depended on the speed at which the crank was turned.

Edison saw several target audiences. First, the business world benefited. Until now, notes were written down in shorthand, a kind of abbreviated script. Now a meeting or appointment could be recorded and afterwards listened to and/or noted down again. With this goal in mind, he built the dictaphone for the professional market. In addition, he started the production of toy dolls that could speak through a built-in small phonograph. Big problem was that the wax cylinders only had a limited lifespan and quickly lost their quality. So a better alternative was necessary. Moreover, it would take years before one managed to multiply the recorded reels.

"After enregistration, the thick, positive (grooved) wax plates are electroplated by means of electric currents. A negative print is thus obtained (the grooved lines have now become bumpy). From this plate new plates are cast, with which one prints the plates intended for the trade." (Van Iseghem)

Emile Berliner (1851-1929) would replace the cylinder with a rotating disc and came up with the gramophone (phonograph in America), which is still in use today and can be called the forerunner of the digital CD (compact disc), DVD (digital versatile disc) and BD (bluray disc).

Edison's phonograph and wax rolls with sound recordings (author's collection)  
Next page