Origin of The Binary Number System
Origin of The Binary Number System
The ancient Indian mathematician Pingala presented the first known description of a binary numeral system in the 3rd century BC, which coincided with his discovery of the concept of zero. The modern binary number system was fully documented by Gottfried Leibniz in the 17th century in his article Explication de l'Arithmtique Binaire. Leibniz's uses 0 and 1, like the modern binary numeral system. In 1854, British mathematician George Boole published a landmark paper detailing a system of logic that would become known as Boolean algebra. His logical system proved instrumental in the development of the binary system, particularly in its implementation in electronic circuitry. In 1937, Claude Shannon produced his master's thesis at MIT that implemented Boolean algebra and binary arithmetic using electronic relays and switches for the first time in history. Entitled A Symbolic Analysis of Relay and Switching Circuits, Shannon's thesis essentially founded practical digital circuit design. In November of 1937, George Stibitz, then working at Bell Labs, completed a relaybased computer he dubbed the "Model K" (for "kitchen", where he had assembled it), which calculated using binary addition. Bell Labs thus authorized a full research program in late 1938 with Stibitz at the helm. Their Complex Number Computer, completed January 8, 1940, was able to calculate complex numbers. In a demonstration to the American Mathematical Society conference at Dartmouth College on September 11, 1940, Stibitz was able to send the Complex Number Calculator remote commands over telephone lines by a teletype. It was the first computing machine ever used remotely over a phone line.
BASIC CONCEPT
The Binary System of numeration is the simplest of all positional number systems. The base - or theradix - of the binary system is 2, which means that only two digits - 0 and 1 may appear in a binary representation of any number. The binary system underlies modern technology of electronic digital computers. Computer memory comprises small elements that may only be in two states - off/on - that are associated with digits 0 and 1. Such an element is said to represent one bit - binary digit.
There are four number bases commonly used in programming. These are: Name Binary Octal Decimal Base Base 2 Base 8 Symbol B Q or O
Base 10 none or D H
Hexadecimal Base 16
The main difference between the binary number system and our familiar base 10 numeration system is that grouping is done in groups of 2 instead of 10. For instance, to represent 24 in base 10 using sticks, you could use two groups of ten and 4 as shown below
The digits 0,1,2,3,4,5,6,7,8,9 are used to represent all possible numbers. Notice that base 10 has 10 digits
Depend on how big the number is, we make groups of ten, hundred, thousand, ten-thousand, etc...(These are power of 10: 101 = 10, 102 = 100, 103 = 1000)
If a number is less than 10 for example 8 and 9, there is no need to create groups. And this number will occupy the ones place value.
If a number is bigger than 9 and less than 100 for example 10, 55 and 98, there is a need to create groups of ten. Groups of ten will occupy the tens place value.
If a number is bigger than 99 and less than 1000 for example 100, 255 and 999, there is a need to create groups of hundred. Groups of hundred will occupy the hundreds place value.
For example, if we carefully study the following number to see how it was organized,
Since the number is bigger than 99, we had to make groups of hundred and ten. Notice also how groups of hundred are put in the hundreds place value and groups of ten are put in the tens place value.
In a similar way, the binary number system has its own place value. The digits 0,1 are used to represent all possible numbers in the binary number system. Notice that base 2 has 2 digits to represent all possible numbers.
Depend on how big the number is, we make groups of 2, 4, 8, 16, 32 etc...(These are power of 2: 21 = 2, 22 = 4, 23 = 8)
If a number is less than 2 for example 1 there is no need to create groups. And this number will occupy the first place value. This place value correspond to the ones place in base 10
In fact this 1 is the same in the binary system and the base 10 system.
If a number is bigger than 1 and less than 4 for example 2 and 3, there is a need to create a group of two. A group of two will occupy the second place value. You could also call it "two" place value If a number is bigger than 3 and less than 8 for example 4 and 7,there is a need to create a group of four. A group of four will occupy the third place value. You could also call it "four" place value
If a number is bigger than 7 and less than 16 for example 8, 11, and 14, there is a need to create a group of eight.A group of eight will occupy the fourth place value. You could also call it "eight" place value.
If a number is bigger than 15 and less than 32 for example 16, 21, and 30, there is a need to create a group of sixteen. A group of sixteen will occupy the fifth place value. You could also call it "sixteen" place value.
If a number is bigger than 31 and less than 64 for example 32, 45, and 63, there is a need to create a group of thirty-two. A group of thirty-two will occupy the sixth place value. You could also call it "thirty-two" place value.
Binary Addition
Consider the addition of decimal numbers: 23 +48 ___
We begin by adding 3+8=11. Since 11 is greater than 10, a one is put into the 10's column (carried), and a 1 is recorded in the one's column of the sum. Next, add {(2+4) +1} (the one is from the carry)=7, which is put in the 10's column of the sum. Thus, the answer is 71. Binary addition works on the same principle, but the numerals are different. Begin with one-bit binary addition: 0 +0 ___ 0 0 1 +1 +0 ___ ___ 1 1
1+1 carries us into the next column. In decimal form, 1+1=2. In binary, any digit higher than 1 puts us a column to the left (as would 10 in decimal notation). The decimal number "2" is written in binary notation as "10" (1*2^1)+(0*2^0). Record the 0 in the ones column, and carry the 1 to the twos column to get an answer of "10." In our vertical notation, 1 +1 ___ 10 The process is the same for multiple-bit binary numbers: 1010 +1111 ______
Step one: Column 2^0: 0+1=1. Record the 1. Temporary Result: 1; Carry: 0 Step two: Column 2^1: 1+1=10. Record the 0, carry the 1. Temporary Result: 01; Carry: 1 Step three: Column 2^2: 1+0=1 Add 1 from carry: 1+1=10. Record the 0, carry the 1. Temporary Result: 001; Carry: 1 Step four: Column 2^3: 1+1=10. Add 1 from carry: 10+1=11. Record the 11. Final result: 11001
Binary Multiplication
Multiplication in the binary system works the same way as in the decimal system:
101 * 11 ____ 101 1010 _____ 1111 Note that multiplying by two is extremely easy. To multiply by two, just add a 0 on the end.
Binary Division
We follow the same rules as in decimal division. For the sake of simplicity, we throw away the remainder. For Example: 111011/11 10011 r 10 _______ 11)111011 -11 ______ 101 -11 ______ 101
11 ______ 10
10000 1000
We have been using the decimal (base 10) numbering system for so long that we often take it for granted. When you see a number like "123", you don't think about the value 123. Instead, you generate a mental image of how many items this value represents. In reality, however, the number 123 represents:
1 * 10^2 + 2 * 10^1 + 3 * 10^0 = 1 * 100 + 2 * 10 + 3 * 1 = 100 + 20 + 3 = 123 Each digit appearing to the left of the decimal point represents a value between zero and nine times power of ten represented by its position in the number. Digits appearing to the right of the decimal point represent a value between zero and nine times an increasing negative power of ten. For example, the value 725.194 is represented as follows: 7 * 10^2 + 2 * 10^1 + 5 * 10^0 + 1 * 10^-1 + 9 * 10^-2 + 4 * 10^-3 = 7 * 100 + 2 * 10 + 5 * 1 + 1 * 0.1 + 9 * 0.01 + 4 * 0.001 = 700 + 20 + 5 + 0.1 + 0.09 + 0.004 = 725.194
Converting from decimal to binary notation is slightly more difficult conceptually, but can easily be done once you know how through the use of algorithms. Begin by thinking of a few examples. We can easily see that the number 3= 2+1. and that this is equivalent to (1*2^1)+(1*2^0). This translates into putting a "1" in the 2^1 column and a "1" in the 2^0 column, to get "11". Almost as intuitive is the number 5: it is obviously 4+1, which is the same as saying [(2*2) +1], or 2^2+1. This can also be written as [(1*2^2)+(1*2^0)]. Looking at this in columns, 2^2 | 2^1 | 2^0 1 0 1 or 101. What we're doing here is finding the largest power of two within the number (2^2=4 is the largest power of 2 in 5), subtracting that from the number (5-4=1), and finding the largest power of 2 in the remainder (2^0=1 is the largest power of 2 in 1). Then we just put this into columns. This process continues until we have a remainder of 0. Let's take a look at how it works. We know that: 2^0=1 2^1=2 2^2=4 2^3=8 2^4=16 2^5=32 2^6=64 2^7=128 and so on. To convert the decimal number 75 to binary, we would find the largest power of 2 less than 75, which is 64. Thus, we would put a 1 in the 2^6 column, and subtract 64 from 75, giving us 11. The largest power of 2 in 11 is 8, or 2^3. Put 1 in the 2^3 column, and 0 in 2^4 and 2^5. Subtract 8 from 11 to get 3. Put 1 in the 2^1 column, 0 in 2^2, and subtract 2 from 3. We're left with 1, which goes in 2^0, and we subtract one to get zero. Thus, our number is 1001011.