Monday, June 3, 2019

Advantages of Binary System

Advantages of binary star dustThe binary star sum up establishment, base devil, uses only two symbols, 0 and 1. Two is the smallest complete f ar that muckle be used as the base of a number system. For many years, mathematicians saw base two as a bounderish system and overlooked the potential of the binary system as a tool for developing computer science and many electrical devices. Base two has several other names, including the binary positional numeration system and the dyadic system. Many civilizations have used the binary system in some form, including inhabitants of Australia, Polynesia, s tabuhwestward America, and Africa. Ancient Egyptian arithmetic depended on the binary system. Records of Chinese mathematics trace the binary system back to the fifth century and possibly earlier. The Chinese were probably the first to appreciate the simplicity of noting integers as sums of functions of 2, with each coefficient being 0 or 1. For example, the number 10 would be pen as one hundred one010= 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20Users of the binary system grimace something of a trade-off. The two-digit system has a basic purity that makes it suitable for solving problems of modern technology. However, the forge of writing out binary numbers and using them in mathematical computation is long and cumbersome, making it impractical to use binary numbers for allday calculations.There are no shortcuts for permuteing a number from the usually used denary scale (base ten) to the binary scale.Over the years, several prominent mathematicians have recognized the potential of the binary system. Francis Bacon (1561-1626) invented a bilateral alphabet code, a binary system that used the symbols A and B rather than 0 and 1. In his philosophical work, The Advancement of Learning, Bacon used his binary system to develop ciphers and codes. These studies unyielding the foundation for what was to become word processing in the late twentieth century. The Americ an Standard Code for Information Interchange (ASCII), adopted in 1966, accomplishes the uniform purpose as Bacons alphabet code. Bacons discoveries were all the more(prenominal) remarkable because at the time Bacon was writing, Europeans had no information virtually the Chinese work on binary systems.A German mathematician, Gottfried Wilhelm von Leibniz (1646-1716), learned of the binary system from Jesuit missionaries who had lived in China. Leibniz was quick to recognize the advantages of the binary system over the denary system, but he is also easy k presentlyn for his attempts to transfer binary thinking to theology. He speculated that the creation of the universe may have been based on a binary scale, where God, stand for by the number 1, created the Universe out of nothing, represented by 0. This widely quoted analogy rests on an error, in that it is not strictly correct to twin nothing with zero.The English mathematician and logician George Boole (1815-1864) developed a system of Boolean logic that could be used to analyze any statement that could be rugged down into binary form (for example, true/false, yes/no, male/female). Booles work was ignored by mathematicians for 50 years, until a graduate student at the Massachusetts convey of Technology realized that Boolean algebra could be applied to problems of electronic circuits. Boolean logic is one of the building blocks of computer science, and computer users apply binary principles e actually time they conduct an electronic search.The binary system works well for computers because the mechanical and electronic relays recognize only two states of operation, such as on/off or closed/ blossom forth. Operational characters 1 and 0 stand for 1 = on = closed circuit = true 0 = off = open circuit = false. The telegraph system, which relies on binary code, demonstrates the ease with which binary numbers can be translated into electrical impulses. The binary system works well with electronic machines a nd can also aid in encrypting messages. Calculating machines using base two qualify quantitative fraction numbers to binary form, then take the process back again, from binary to decimal. The binary system, once dismissed as primitive, is thus central to the development of computer science and many forms of electronics. Many important tools of communication, including the typewriter, cathode dig tube, telegraph, and transistor, could not have been developed without the work of Bacon and Boole. Contemporary applications of binary numerals include statistical investigations and probability studies. Mathematicians and everyday citizens use the binary system to explain strategy, prove mathematical theorems, and solve puzzles.Basic Concepts behind the binary SystemTo understand binary numbers, begin by remembering basic school math. When we were first taught about numbers, we learnt that, in the decimal system, things are categorised into tugsH T O1 9 3such that H is the hundre ds tugboat, T is the tens editorial, and O is the ones tug. So the number 193 is 1-hundreds plus 9-tens plus 3-ones.Afterwards we learnt that the ones tower meant 100, the tens editorial meant 101, the hundreds column 102 and so on, such that1021011001 9 3The number 193 is really (1*102) + (9*101) + (3*100).We know that the decimal system uses the digits 0-9 to represent numbers. If we wished to put a larger number in column 10n (e.g., 10), we would have to multiply 10*10n, which would give 10 (n+1), and be carried a column to the left. For example, if we put ten in the 100 column, it is impossible, so we put a 1 in the 101 column, and a 0 in the 100 column, on that pointfore using two columns. Twelve would be 12*100, or 100(10+2), or 101+2*100, which also uses an additional column to the left (12).The binary system works under the exact said(prenominal) principles as the decimal system, only it operates in base 2 rather than base 10. In other words, instead of columns bein g102101100They are,222120Instead of using the digits 0-9, we only use 0-1 (again, if we used anything larger it would be like multiplying 2*2n and nourishting 2n+1, which would not fit in the 2n column. Therefore, it would shift you one column to the left. For example, 3 in binary cannot be put into one column. The first column we fill is the right-most column, which is 20, or 1. Since 31, we need to use an extra column to the left, and indicate it as 11 in binary (1*21) + (1*20).Binary AdditionConsider the addition of decimal numbers23+48___We begin by adding 3+8=11. Since 11 is greater than 10, a one is put into the 10s column (carried), and a 1 is recorded in the ones column of the sum. Next, add (2+4) +1 (the one is from the carry) = 7, which is put in the 10s column of the sum. Thus, the answer is 71.Binary addition works on the same principle, but the numerals are different. lead off with one-bit binary addition0 0 1+0 +1 +0___ ___ ___0 1 11+1 carries us into the attached c olumn. 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*21)+(0*20). 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___10The process is the same for multiple-bit binary numbers1010+1111______ musical note one pillar 20 0+1=1.Record the 1.Temporary Result 1 Carry 0Step twoColumn 21 1+1=10.Record the 0 carry the 1.Temporary Result 01 Carry 1Step leadColumn 22 1+0=1 Add 1 from carry 1+1=10.Record the 0, carry the 1.Temporary Result 001 Carry 1Step fourColumn 23 1+1=10. Add 1 from carry 10+1=11.Record the 11.Final closure 1 coulomb1Alternately11 (carry)1010+1111______11001Always remember0+0=01+0=11+1=10Try a few examples of binary addition111 101 111+110 +111 +111______ _____ _____1101 1100 1110Binary MultiplicationMultiplication in the binary system works the same way as in the deci mal system1*1=11*0=00*1=0101* 11____1011010_____1111Note that multiplying by two is extremely easy. To multiply by two, just add a 0 on the end.Binary DivisionFollow the same rules as in decimal division. For the sake of simplicity, throw away the symme tense.For Example 111011/1110011 r 10_______11)111011-11______101-11______10111______10 quantitative to BinaryConverting from decimal to binary notation is slightly more difficult conceptually, but can easily be done once you know how by 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*21)+(1*20). This translates into putting a 1 in the 21 column and a 1 in the 20 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 22+1. This can also be written as (1*22)+(1*20). Looking at this in columns,22 21 201 0 1or 101.What were doing here is finding the largest power of two within the nu mber (22=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 (20=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. Lets take a look at how it works. We know that20=121=222=423=824=1625=3226=6427=128and 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 26 column, and subtract 64 from 75, giving us 11. The largest power of 2 in 11 is 8, or 23. Put 1 in the 23 column, and 0 in 24 and 25. Subtract 8 from 11 to get 3. Put 1 in the 21 column, 0 in 22, and subtract 2 from 3. Were left with 1, which goes in 20, and we subtract one to get zero. Thus, our number is 1001011.Making this algorithm a bit more semiformal gives usLet D=number we wish to convert from decimal to binaryRepeat until D=0a. Find the largest power of two in D. Let this equal P. b. Put a 1 in binary column P.c. Subtract P from D.Put zeros in all columns which dont have ones.This algorithm is a bit awkward. Particularly step 3, filling in the zeros. Therefore, we should rewrite it such that we ascertain the judge of each column individually, putting in 0s and 1s as we goLet D= the number we wish to convert from decimal to binaryFind P, such that 2P is the largest power of two littler than D.Repeat until PIf 2Pput 1 into column Psubtract 2P from DElseput 0 into column PEnd ifSubtract 1 from PNow that we have an algorithm, we can use it to convert numbers from decimal to binary relatively painlessly. Lets exploit the number D=55.Our first step is to find P. We know that 24=16, 25=32, and 26=64. Therefore, P=5.25Subtracting 55-32 leaves us with 23. Subtracting 1 from P gives us 4.Following step 3 again, 24Next, subtract 16 from 23, to get 7. Subtract 1 from P gives us 3.237, so we put a 0 in the 23 column110Next, subtract 1 from P, which gives us 2.22Subtract 4 from 7 to get 3. Subtract 1 from P to get 1.21Subtract 2 from 3 to get 1. Subtract 1 from P to get 0.20Subtract 1 from 1 to get 0. Subtract 1 from P to get -1.P is now less than zero, so we stop.Another algorithm for converting decimal to binaryHowever, this is not the only approach possible. We can start at the right, rather than the left. on the whole binary numbers are in the forman*2n + an-1*2(n-1)++a1*21 + a0*20where each ai is either a 1 or a 0 (the only possible digits for the binary system). The only way a number can be odd is if it has a 1 in the 20 column, because all powers of two greater than 0 are even numbers (2, 4, 8, 16). This gives us the rightmost digit as a starting point.Now we need to do the remaining digits. One idea is to shift them. It is also easy to see that multiplying and dividing by 2 shifts everything by one column two in binary is 10, or (1*21). Dividing (1*21) by 2 gives us (1*20), or just a 1 in binary. Similarly, multiplying by 2 shifts in the ot her direction (1*21)*2=(1*22) or 10 in binary. Thereforean*2n + an-1*2(n-1) + + a1*21 + a0*20/2is equal toan*2(n-1) + an-1*2(n-2) + + a120Lets look at how this can foster us convert from decimal to binary. Take the number 163. We know that since it is odd, there must be a 1 in the 20 column (a0=1). We also know that it equals 162+1. If we put the 1 in the 20 column, we have 162 left, and have to decide how to translate the remaining digits.Twos column Dividing 162 by 2 gives 81. The number 81 in binary would also have a 1 in the 20 column. Since we divided the number by two, we took out one power of two. Similarly, the statement an-1*2(n-1) + an-2*2(n-2) + + a1*20 has a power of two removed. Our new 20 column now contains a1. We learned earlier that there is a 1 in the 20 column if the number is odd. Since 81 is odd, a1=1. Practically, we can simply keep a running total, which now stands at 11 (a1=1 and a0=1). Also note that a1 is essentially multiplied again by two just by putt ing it in front of a0, so it is automatically fit into the correct column.Fours column Now we can subtract 1 from 81 to see what remainder we passive must place (80). Dividing 80 by 2 gives 40. Therefore, there must be a 0 in the 4s column, (because what we are actually placing is a 20 column, and the number is not odd).Eights column We can divide by two again to get 20. This is even, so we put a 0 in the 8s column. Our running total now stands at a3=0, a2=0, a1=1, and a0=1.Negation in the Binary SystemSigned MagnitudeOnes accompanimentTwos ComplementExcess 2(m-1)These techniques work well for non-negative integers, but how do we indicate negative numbers in the binary system?Before we investigate negative numbers, we note that the computer uses a fixed number of bits or binary digits. An 8-bit number is 8 digits long. For this section, we will work with 8 bits.Signed MagnitudeThe simplest way to indicate negation is gestural magnitude. In signed magnitude, the left-most bit is no t actually part of the number, but is just the equivalent of a +/- sign. 0 indicates that the number is positive, 1 indicates negative. In 8 bits, 00001100 would be 12 (break this down into (1*23) + (1*22) ). To indicate -12, we would simply put a 1 rather than a 0 as the first bit 10001100.Ones ComplementIn ones complement, positive numbers are represented as usual in regular binary. However, negative numbers are represented differently. To negate a number, replace all zeros with ones, and ones with zeros flip the bits. Thus, 12 would be 00001100, and -12 would be 11110011. As in signed magnitude, the leftmost bit indicates the sign (1 is negative, 0 is positive). To compute the value of a negative number, flip the bits and translate as before.Twos ComplementBegin with the number in ones complement. Add 1 if the number is negative. Twelve would be represented as 00001100, and -12 as 11110100. To verify this, lets subtract 1 from 11110100, to get 11110011. If we flip the bits, we g et 00001100, or 12 in decimal.In this notation, m indicates the total number of bits. For us (working with 8 bits), it would be excess 27. To represent a number (positive or negative) in excess 27, begin by taking the number in regular binary representation. Then add 27 (=128) to that number. For example, 7 would be 128 + 7=135, or 27+22+21+20, and, in binary, 10000111. We would represent -7 as 128-7=121, and, in binary, 01111001.NoteUnless you know which representation has been used, you cannot figure out the value of a number.A number in excess 2 (m-1) is the same as that number in twos complement with the leftmost bit flipped.To see the advantages and disadvantages of each method, lets try working with them.Using the regular algorithm for binary addition, add (5+12), (-5+12), (-12+-5), and (12+-12) in each system. Then convert back to decimal numbers.APPLICATIONS OF BINARY NUMBER systemThe binary number system, also called thebase-2number system, is a method of representing nu mbers that counts by using combinations of only two numerals zero (0) and one (1). Computers use the binary number system to manipulate and store all of their data including numbers, words, videos, graphics, and music.The term bit, the smallest unit of digital technology, stands for Binary digit. A byte is a group of eight bits. A kilobyte is 1,024 bytes or 8,192 bits.Using binary numbers, 1 + 1 = 10 because 2 does not exist in this system. A different number system, the commonly used decimal orbase-10number system, counts by using 10 digits (0,1,2,3,4,5,6,7,8,9) so 1 + 1 = 2 and 7 + 7 = 14. Another number system used by computer programmers is hexadecimal system,base-16, which uses 16 symbols (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F), so 1 + 1 = 2 and 7 + 7 = E. Base-10 and base-16 number systems are more compact than the binary system. Programmers use the hexadecimal number system as a convenient, more compact way to represent binary numbers because it is very easy to convert from binar y to hexadecimal and vice versa. It is more difficult to convert from binary to decimal and from decimal to binary.The advantage of the binary system is its simplicity. A computing device can be created out of anything that has a series of switches, each of which can alternate between an on position and an off position. These switches can be electronic, biological, or mechanical, as long as they can be moved on command from one position to the other. Most computers have electronic switches.When a switch is on it represents the value of one, and when the switch is off it represents the value of zero. Digital devices perform mathematical operations by turning binary switches on and off. The faster the computer can turn the switches on and off, the faster it can perform its calculations.Binary ten-foldHexadecimalNumberNumberNumberSystemSystemSystem0001111022113310044101551106611177100088100199101010A101111B110012C110113D111014E111115F100001610Positional NotationEach numeral in a binary number takes a value that depends on its position in the number. This is called positional notation. It is a concept that also applies to decimal numbers.For example, the decimal number 123 represents the decimal value 100 + 20 + 3. The number one represents hundreds, the number two represents tens, and the number three represents units. A mathematical formula for generating the number 123 can be created by multiplying the number in the hundreds column (1) by 100, or 102 multiplying the number in the tens column (2) by 10, or 101 multiplying the number in the units column (3) by 1, or 100 and then adding the products together. The formula is 1-102+ 2-101+ 3-100= 123.This shows that each value is multiplied by the base (10) raised to increasing powers. The value of the power starts at zero and is incremented by one at each new position in the formula.This concept of positional notation also applies to binary numbers with the difference being that the base is 2. For example, to find the decimal value of the binary number 1101, the formula is 1-23+ 1-22+ 0-21+ 1-20= 13.Binary OperationsBinary numbers can be manipulated with the same familiar operations used to calculate decimal numbers, but using only zeros and ones. To add two numbers, there are only four rules to rememberTherefore, to solve the following addition problem, start in the rightmost column and add 1 + 1 = 10 write down the 0 and carry the 1. Working with each column to the left, continue adding until the problem is solved.To convert a binary number to a decimal number, each digit is multiplied by a power of two. The products are then added together. For example, to translate the binary number 11010 to decimal, the formula would be as followsTo convert a binary number to a hexadecimal number, separate the binary number into groups of four starting from the right and then translate each group into its hexadecimal equivalent. Zeros may be added to the left of the binary number to complete a group of f our. For example, to translate the number 11010 to hexadecimal, the formula would be as followsBinary Number SystemA Binary Number is made up of only 0s and 1s.http//www.mathsisfun.com/images/binary-number.gifThis is 1-8 + 1-4 + 0-2 + 1 + 1-(1/2) + 0-(1/4) + 1-(1/8)(= 13.625 in Decimal)Similar to theDecimal System, numbers can be placed to the left or right of the point, to indicate values greater than one or less than one. For Binary Numbers2 Different ValuesBecause you can only have 0s or 1s, this is how you count using BinaryDecimal0123456789101112131415Binary01101110010111011110001001101010111100110111101111Binary is as easy as 1, 10, 11.Here are some more equivalent valuesDecimal2025304050100200500Binary101001100111110101000110010110010011001000111110100How to file that a Number is BinaryTo show that a number is abinarynumber, follow it with a little 2 like this1012This way mess wont think it is the decimal number 101 (one hundred and one).ExamplesExample 1 What is 11112in De cimal?The 1 on the left is in the 2-2-2 position, so that means 1-2-2-2 (=8)The next 1 is in the 2-2 position, so that means 1-2-2 (=4)The next 1 is in the 2 position, so that means 1-2 (=2)The last 1 is in the units position, so that means 1Answer 1111 = 8+4+2+1 = 15 in DecimalExample 2 What is 10012in Decimal?The 1 on the left is in the 2-2-2 position, so that means 1-2-2-2 (=8)The 0 is in the 2-2 position, so that means 0-2-2 (=0)The next 0 is in the 2 position, so that means 0-2 (=0)The last 1 is in the units position, so that means 1Answer 1001 = 8+0+0+1 = 9 in DecimalExample 3 What is 1.12in Decimal?The 1 on the left side is in the units position, so that means 1.The 1 on the right side is in the halves position, so that means 1-(1/2)So, 1.1 is 1 and 1 half = 1.5 in DecimalExample 4 What is 10.112in Decimal?The 1 is in the 2 position, so that means 1-2 (=2)The 0 is in the units position, so that means 0The 1 on the right of the point is in the halves position, so that means 1- (1/2)The last 1 on the right side is in the quarters position, so that means 1-(1/4)So, 10.11 is 2+0+1/2+1/4 = 2.75 in Decimal

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.