Friday, June 14, 2019

XI.The 20th Century International Binary Language of Computers



XI. The 20th Century International Binary Language of Computers
        [Contd. A Journey to the Wonderland of Math. by Ajay Kumar Chaudhuri]

Our own century has introduced another international language, which most of us use but few are aware of. This is the binary language of computers. When interpreting coded material by means of electricity, speed is tackling a simple task is easy to achieve and complexity merely complicates. So the simple counting system is best, and this means with the lowest possible base 2 rather than 10.
Our far-off ancestors tried much to read the language of creation of this universe. Philosophers and Scientists of all ages till today have tried tirelessly to unravel the mysteries of creation. In the process they committed omissions and error of varying degree. In 1679, the German philosopher, polymath and great mathematician Gottfried Wilhelm Von Leibnitz (1646 – 1716) prompted by such huge mistakes as Columbus finding the West Indies in the Americas when in fact he thought he was in Japan, decided to stop human error with a better numerical system. He tried to express the universal language or script with mathematical elegance in briefest form. According to his thought the universe may be depicted as a progression of contradicting dualities, a series of on-off, yes-no possibilities, such as dark-light, male-female etc., which formed the interaction of life and consciousness. He reasoned the life could itself be reduced to straight forward proportions, so could logic and thought. In the process he invented the binary number system which allowed the representation of all numbers with only ones and zeros.
Heartened by his new insights, Leibnitz set out to refine his rudimentary transposing numerals into seemingly infinite rows of ones and zeros even though he really couldn’t find use for them. Leibnitz’s Stepped Wheel calculator was built for decimal numbers, although he apparently gave some thought over the years to another machine which could incorporate his beloved binary system, the long string of binary numbers that replaced single decimal digits must have seem challenging.
Leibnitz seemed to lose the plot towards the end of his life, endowing his binary system with a quasi-religious mysticism. Binary numbers, he came to believe represent creation. The number one is portraying God; and zero is depicting void. Leibnitz died without achieving his dream of a universal mathematical/ logic language, but leaving behind fundamental idea of the binary yes-no/ on-off principle for others to play with.
Leibnitz’s dream of a machine incorporating his binary system came true almost after three hundred years through the birth of today’s computer.
This system of binary numbers provide the most efficient way of adding and subtracting numbers and is ideally suited for the computer, though Leibnitz never built the binary machine, that he designed at that time. It wasn’t until 1944 in the midst of World War II, that world’s first binary computer, Colossus, was developed in England utilizing the simple system of electrical currents being either off or on as representing zero or one. In this binary format millions of rapid calculations were made, allowing the Allies to crack the German coded messages with such skill that they often knew the contents of these messages even before Hitler did.
Numbers and counting have become an integral part of our everyday life, especially when we take into account modern computer. These words you are reading have been recorded on a computer using a code of ones and zeros. It is an interesting story how these digits have come to dominate our world.
If we look back to the counting systems and numerals of different ancient civilizations we are convinced to believe that before Leibnitz, Egyptians, Chinese, Indians and some others  had utilized this binary system, though in a very crude form and not knowing fully its great implications.
Binary numbers look bizarre when they are written in out directly; for the digits weight increases by powers of 2, rather than our most commonly used decimal numbers by powers of 10. In our customary base-ten system we have digits for the numbers zero to nine. We have no single digit number for “ten”. Yes, we write “10”. In fact it stands for “1 ten and 0 ones”. More clearly when we need to count one more than nine, we zero out the ones column and add one to the tens column. Similarly in the process of counting when reach 99, which means nine times ten together with nine times one, and try to count one more, we zero out the tens and ones column, and add one to the ten times – ten or hundreds column. So, the number next to 99 will be written as 100. Likewise the number next to 999 will be represented as 1000 or a thousand and so forth.
This rule of representation of numbers in base-ten system hold good for members expressed in other bases, which have modern usages, like hexadecimal (16 – base), octal (8 – base) including binary or base 2 numbers.
As in a binary digital numeral, digits weight increases in power of 2, so, the digit furthest to the right is the “ones” digit, the next digit to the left is “twos” digit; next comes the “fours” digit, then the “eights”, then “sixteenths” digit and so on. The decimal equivalent of a binary can be found by summing up all the digits.
Let us see at first the mechanism of writing numbers in base-ten system. For example the number 4652 is read as “Four thousand six hundred fifty two”. Imposing place-value of the digits, we can write as 4652 = 4 x 1000 + 6 x 100 + 5 x 10 + 1 x 2
Or in powers of 10 as 4652 = 4 x 103 + 6 x 102 + 5 x 101 + 2 x 100
But in a binary system we have only two digits, namely zero and one. All the numbers in this system are expressed in ascending powers of two, beginning with the power of zero. It will be clear from the following list of binary equivalent of few decimal numbers.
So, conversion of a number in binary system to decimal base and vice-versa is simple, so long we remember that each digit in a binary number represents a power of 2.
Let us, for example, convert the binary number 11010111012 to ten-base number. For convenience and to understand better, we first list the digits in order and count then off from the right, starting with zero.
Digits           :
1
1
0
1
0
1
1
1
0
1
Numbering :
9
8
7
6
5
4
3
2
1
0
So, the decimal equivalence of 11010111012 will be
    1 x 29 + 1 x 28 + 0 x 27 + 1 x 26 + 0 x 25 + 1 x 24 + 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20
 = 1 x 512 + 1 x 256 + 0 x 128 + 1 x 64 + 0 x 32 + 1 x 16 + 1 x 8 + 1 x 4 + 0 x 2 + 1 x 1
= 512 + 256 + 64 + 16 + 8 + 4 + 1
= 861
Hence 11010111012 =  86110
To convert a decimal number to binaries, we need to divide the number repeatedly by 2, keeping track the remainder in each step as we go.
If we like to convert 35710 to a binary form we proceed as follows :
These remainders tell us what the binary number is. We read the division starting on top and wrapping our way around and noting the remainder in each step. So 35710 (dividing successively by2 and noting the remainders in the following table) will be equivalent to
1 x28 + 0 x 27 + 1 x 26 + 1 x 25 + 0 x 24 + 0 x 23
     + 1 x 22 + 0 x 21 + 1 x 2
and in binary form                                                                              

101100101
Therefore 35710 = 1011001012
We have learnt arithmetic of numbers, namely, addition, subtraction, multiplication and division many years ago in our early school years, of course with the numbers in decimal base system. But to be familiar with these operations for binary numbers is useful in our modern everyday lives; for these processes are often stepping stones to more complex processes which can do very powerful things.
Binary arithmetic is essential part of all digital computers and many other digital systems. There are many calculators now which can do binary arithmetic for us. Just about every desktop operating system, smart phone and tablet has one built or one can easily be acquired. It is perfectly fine to use calculator but we should know how to do it by hand as well. This will give us a much better understanding as to what is actually happening. That understanding is important in order to understand how certain mechanisms work, especially in computing.
Right from the eleventh century CE up to the twentieth century we have come across many counting systems and numerals of many civilizations of the world. The Inca civilization flourished in Peru of South America used essentially a decimal base system, not in writing but in knots on strings without clear concept of zero. Another South American civilization of Mesoamerica, the Maya civilization used vigesimal (base 20) base. The Babylonians used sexagesimal (base 60) system. The Egyptians used writing numeration that was changed to hieroglyphic or pictorial form, principally based on powers of 10. Greeks alphabetical numerals were basically represented in multiples of 10 or in other words based on decimal system. Roman numerals were represented by only seven Roman letters. Romans used decimal system for whole numbers and duodecimal (base 12) for fractions. The most important of these counting systems and numerals, now used world-wide is the Hindu-Arabic or precisely the Hindu decimal system and numerals with clear idea or “nothingness” or zero with its circle like symbol and magnificent place holder characteristic. Towards the last quarter of the 17th century, the great German mathematician Leibnitz gave the concept of binary numbers or base-2 system numbers, though it was fully utilized in 1949 during World War – II in first binary computers for millions of rapid calculations.
Apart from the above counting systems and numerals, the 20th century witnessed along with international binary language of computers, two more base systems – octal and hexadecimal, also sometimes suitable for computer programming or computer graphics.
The positional octal (base-8) number was being used in papers as far as 1668. So, it must have been invented at least by the beginning of the 17th century.
Historically, some Native American tribes actually used this system in life, perhaps the idea came from the counting spaces between fingers. But it can’t be ascertained at what time this could be attributed.
The octal or base-8 number system consists of digits 0, 1, 2, 3, 4, 6 and 7, Because of its relationship with binary system, it is useful in some programming in certain computers. In fact, one octal digit has the equivalent value of three binary digits.
The octal number system is a positional number system. Just as the decimal system uses powers of 10 and the binary system uses powers of 2, the octal system uses powers of 8. The bar graph below shows the positions and powers of the base 8.
----- 83 82 81 80 8–1 8–2 8–3 ------
The conversions of numbers in octal base to decimal and vice-versa as simple as conversions in case of binary and decimal. In fact, we can convert any number expressed in a certain base to any other base.
So, if we like to convert the number 4307 in octal base to our most familiar decimal base, considering the place-value of 8 for this number, we can do it as :

43078   =  4 x 83 + 3 x 82 + 0 x 81 + 7 x 80
=  2048 + 192 + 7
=  2247
So, 43078 =  224710
Conversely, if we wish to convert 1234 in decimal system to a number in octal form we should proceed as : divide the number successively by 8 and note the remainder in each step as we go. From these remainders we can find the number in octal base. As in the conversion of a number in decimal to a number in binary we read the division stating on top and wrapping our way around and noting the remainder in each case.
So, 1234 = 2 x 83 + 3 x 82 + 2 x 81 + 2 x 80
= 1024 + 192 + 16 + 2
 = 1234

Considering the multipliers (called the “co-efficient” in the language of mathematics) of
 different powers of 8 in a descending order the intended conversion will be 123410 = 23228
We have already seen that many counting systems and numerals were invented with the progress of human civilization for practical needs and dire necessities. In the modern computer and digital age, we are in need of most convenient and elegant counting systems and numerals for computer programming and computer graphics. The invention of binary system is a great step forward for this purpose. The octal base system which we have already seen, are also useful in some cases. There is another system of counting suitable for computers called “Hexadecimal System” or in short “Hex”.
This is actually a 16 base number system which means we need to have digits 0 through 15. For this purpose we would need single solitary digits those stands for the values of “ten”, “eleven”, “twelve”, “thirteen”, “fourteen” and “fifteen”. But we don’t do so. Instead we adopt a unique method of representing these numbers by the letters A, B, C, D, E and F respectively. That is in counting in hexadecimal, the sixteen numerals are
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
The idea of this hexadecimal counting system was first originated in France in the year 770 AD. There is an interesting story in the backdrop of this invention.
The story runs thus : In that time Mervin, a famous wizard, became a counselor to King Charlemagne because he had 8 fingers on each hand. For this advantage Mervin could count faster than the other counselors and treasurers. When the other mathematicians in the King’s Court had risen to 100, Mervin would only be at 0 x 64 (meaning 16x6 + 4x1 which is 100). This meant Mervin could express larger numbers in smaller space.
But there was a more fundamental advantage. King Charlemagne wanted to divide his country into fiefdom for taxation purposes. His treasurers proposed to divide the country into 2 duchies, each of which into 2 earldoms, each of which into 2 counties, each of which into 2 estates, each of it into 2 hamlets.
This means the entire country consisted of 32 hamlets and 16 estates. But to Mervin there would be 0 x 20 hamlets (actually counting would be as 2 x 16 + 0 x 1) and 0 x 10 estates (meaning 1 x 16 + 0 x 1).
Because of Mervin’s total finger count of 16, he could more easily divide and multiply. Mervin paved the way of counting based on 16.
Now let us see the forms of hexadecimal numbers and conversions to other bases, particularly to decimal and its converse. In hexadecimal numbers we are concerned only with the ascending powers of 16, starting from 0, as we go to the left.
For example, DICE is a hexadecimal number. If we like to convert it to a number in decimal base, we do it as :
Remembering D stands for thirteen, C for twelve and E for 14 and positions of D, I, C and E are fourth, third, second and first respectively and hence place values of 16 are 163, 162, 161 and 160 or 1 respectively. So DICE may be written in decimal form as 13 x 163 + 1 x 162 + 12 x 16 + 14 x1
=  53,248 + 256 + 192 + 14
=  53,710
So, DICE16   =   53,71010
The use of letters as numbers in hexadecimal base reminds us the alphabetical number systems of the ancient Greeks and the uses of Latin letters for numerals by the Romans.
Now, the conversion of a decimal number to a hexadecimal one, we will proceed as the same way as in conversions of decimal numbers to binary and octal numbers which we have already done.
For example, let us convert the number 63933 in decimal base to a number in hexadecimal. We will divide this number repeatedly by 16, keeping track of the remainders.
From this long division, we see that the hexadecimal number will have a “fifteen” in the sixteen-cubed column, a “nine” the sixteen-squared column, an “eleven” in the sixteen’s column and “thirteen” in the ones column.


So, we will write the number 63933 in hexadecimal form as F9BD
             6393310  =  F9BD16
Though the binary, octal and hexadecimal number systems were known much earlier, in one form or other, their applications found their way in the language of computers in the 20th century.
The first mechanical computer created by Charles Babbage in London in 1822, doesn’t really resemble what most would consider a computer today.
The “colossus” was the first electric programmable computer, developed by Tommy Flowers and first demonstrated in December 1943. As has already been mentioned, colossus was created to help the British code breakers to read the encrypted German messages in the midst of the World War – II in 1944.
The first digital computer was developed by Prof. John Vincent Atanasoff in New York and a graduate student Cliff Berry in 1937. Its development continued until 1942.
Then after, there was a sea change in designing and applications of computer technology. Computers helped a lot in our scientific researches, technologies, space research and adventures. The space ship Voyager-I sent by U.S in 1977 has already enter interstellar space in 2012. Voyager-2 sent a few days later is currently in which is bubble like region of space dominated by the Sun that extends far beyond the orbit of Pluto.
So the question arises, to further our expedition in the realm of knowledge, will we be in need of more convenient, elegant and most suited counting systems and numerals?
                                                                                                              [To continue]

No comments:

Post a Comment