Binary Number System
Binary Number System
Binary Number System
number system
I am highly indebted to our faculty( miss Gaganpreet kour) for providing me necessary guidance and
inspirational support throughout this work, without which this work would not have been in present shape.
I am also thankful to (Miss Gaganpreet kour) for providing their full support, at all the times whole
heartedly, without which it was impossible to complete this work.
I also extend my thanks to library staff of the my college for their corporation. And I would also like to
thank all my teachers who have helped me directly or
indirectly during my work.
SANJEEV SHARMA
RD1801A27
Content
Binary number system
Introduction of binary number system
Basic concepts of binary number system
Binary addition
Binary division
Binary multiplication
Position notation
Bibliography
Binary Number System numbers for everyday calculations. There
are no shortcuts for converting a number
from the commonly used denary scale
(base ten) to the binary scale.
The binary number system, base two, uses
only two symbols, 0 and 1. Two is the Over the years, several prominent
smallest whole number that can be used as mathematicians have recognized the
the base of a number system. For many potential of the binary system. Francis
years, mathematicians saw base two as a Bacon (1561-1626) invented a "bilateral
primitive system and overlooked the alphabet code," a binary system that used
potential of the binary system as a tool for the symbols A and B rather than 0 and 1. In
developing computer science and many his philosophical work, The Advancement
electrical devices.Base two has several of Learning , Bacon used his binary system
other names, including the binary to develop ciphers and codes. These
positional numeration system and the studies laid the foundation for what was to
dyadic system. Many civilizations have used become word processing in the late
the binary system in some form, including twentieth century. The American Standard
inhabitants of Australia, Polynesia, South Code for Information Interchange (ASCII),
America, and Africa. Ancient Egyptian adopted in 1966, accomplishes the same
arithmetic depended on the binary system. purpose as Bacon's alphabet code. Bacon's
Records of Chinese mathematics trace the discoveries were all the more remarkable
binary system back to the fifth century and because at the time Bacon was writing,
possibly earlier. The Chinese were probably Europeans had no information about the
the first to appreciate the simplicity of Chinese work on binary systems.
noting integers as sums of powers of 2,
with each coefficient being 0 or 1. For A German mathematician, Gottfried
example, the number 10 would be written Wilhelm von Leibniz (1646-1716), learned
as 1010: of the binary system from Jesuit
missionaries who had lived in China. Leibniz
10= 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 was quick to recognize the advantages of
the binary system over the denary system,
Users of the binary system face something
but he is also well known for his attempts
of a trade-off. The two-digit system has a
to transfer binary thinking to theology. He
basic purity that makes it suitable for
speculated that the creation of the
solving problems of modern technology.
universe may have been based on a binary
However, the process of writing out binary
scale, where "God, represented by the
numbers and using them in mathematical
number 1, created the Universe out of
computation is long and cumbersome,
nothing, represented by 0." This widely
making it impractical to use binary
quoted analogy rests on an error, in that it
is not strictly correct to equate nothing decimal.The binary system, once dismissed
with zero. 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 ray tube, telegraph,
The English mathematician and logician and transistor, could not have been
George Boole (1815-1864) developed a developed without the work of Bacon and
system of Boolean logic that could be used Boole. Contemporary applications of binary
to analyze any statement that could be numerals include statistical investigations
broken down into binary form (for and probability studies. Mathematicians
example, true/false, yes/no, male/female). and everyday citizens use the binary system
Boole's work was ignored by to explain strategy, prove mathematical
mathematicians for 50 years, until a theorems, and solve puzzles.
graduate student at the Massachusetts
Institute of Technology realized that
Boolean algebra could be applied to
problems of electronic circuits. Boolean Basic Concepts behind the Binary
logic is one of the building blocks of System
computer science, and computer users
To understand binary numbers, begin by
apply binary principles every time they recalling elementary school math. When we
conduct an electronic search. first learned about numbers, we were taught
that, in the decimal system, things are
The binary system works well for organized into columns:
computers because the mechanical and
H | T | O
electronic relays recognize only two states
1 | 9 | 3
of operation, such as on/off or such that "H" is the hundreds column, "T" is
closed/open.Operational characters 1 and the tens column, and "O" is the ones
0 stand for 1 = on = closed circuit = true 0 = column. So the number "193" is 1-
off = open circuit = falseThe telegraph hundreds plus 9-tens plus 3-ones.
system, which relies on binary code,
demonstrates the ease with which binary Years later, we learned that the ones column
numbers can be translated into electrical meant 10^0, the tens column meant 10^1,
impulses. The binary system works well the hundreds column 10^2 and so on, such
that
with electronic machines and can also aid
in encrypting messages. Calculating 10^2|10^1|10^0
machines using base two convert decimal 1 | 9 | 3
numbers to binary form, then take the the number 193 is really
process back again, from binary to {(1*10^2)+(9*10^1)+(3*10^0)}.
As you know, the decimal system uses the 11110
digits 0-9 to represent numbers. If we
wanted to put a larger number in column Remember:
10^n (e.g., 10), we would have to multiply 2^4| 2^3| 2^2| 2^1| 2^0
10*10^n, which would give 10^(n+1), and | | | 1 | 0
be carried a column to the left. For example, | | 1 | 1 | 1
putting ten in the 10^0 column is 1 | 0 | 1 | 0 | 1
impossible, so we put a 1 in the 10^1 1 | 1 | 1 | 1 | 0
column, and a 0 in the 10^0 column, thus
using two columns. Twelve would be
12*10^0, or 10^0(10+2), or 10^1+2*10^0, Binary Addition
which also uses an additional column to the
left (12).
Consider the addition of decimal numbers:
The binary system works under the exact
23
same principles as the decimal system, only +48
it operates in base 2 rather than base 10. In ___
other words, instead of columns being
We begin by adding 3+8=11. Since 11 is
10^2|10^1|10^0 greater than 10, a one is put into the 10's
they are column (carried), and a 1 is recorded in the
one's column of the sum. Next, add {(2+4)
2^2|2^1|2^0 +1} (the one is from the carry)=7, which is
put in the 10's column of the sum. Thus, the
Instead of using the digits 0-9, we only use answer is 71.
0-1 (again, if we used anything larger it
would be like multiplying 2*2^n and getting Binary addition works on the same
2^n+1, which would not fit in the 2^n principle, but the numerals are different.
column. Therefore, it would shift you one Begin with one-bit binary addition:
column to the left. For example, "3" in
binary cannot be put into one column. The 0 0 1
first column we fill is the right-most +0 +1 +0
column, which is 2^0, or 1. Since 3>1, we ___ ___ ___
need to use an extra column to the left, and 0 1 1
indicate it as "11" in binary (1*2^1) +
(1*2^0). 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
Try converting these numbers from binary number "2" is written in binary notation as
to decimal: "10" (1*2^1)+(0*2^0). Record the 0 in the
ones column, and carry the 1 to the twos
10 column to get an answer of "10." In our
vertical notation,
111
10101 1
+1 111 101 111
___ +110 +111 +111
10 ______ _____ _____
1101 1100 1110
The process is the same for multiple-bit
binary numbers: Binary Multiplication
1010
Multiplication in the binary system works
+1111
the same way as in the decimal system:
______
1*1=1
Step one:
1*0=0
Column 2^0: 0+1=1.
0*1=0
Record the 1.
Temporary Result: 1; Carry: 0 101
Step two: * 11
Column 2^1: 1+1=10. ____
Record the 0, carry the 1. 101
Temporary Result: 01; Carry: 1 1010
Step three: _____
Column 2^2: 1+0=1 Add 1 from 1111
carry: 1+1=10.
Record the 0, carry the 1. Note that multiplying by two is extremely
Temporary Result: 001; Carry: 1 easy. To multiply by two, just add a 0 on
Step four: the end.
Column 2^3: 1+1=10. Add 1 from
carry: 10+1=11. Binary Division
Record the 11.
Follow the same rules as in decimal
Final result: 11001
division. For the sake of simplicity, throw
away the remainder.
Alternately:
For Example: 111011/11
11 (carry)
1010
+1111
10011 r 10
______
_______
11001
11)111011
-11
Always remember ______
101
0+0=0 -11
1+0=1 ______
1+1=10 101
11
Try a few examples of binary addition: ______
10 we would put a 1 in the 2^6 column, and
subtract 64 from 75, giving us 11. The
Decimal to Binary 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.
Converting from decimal to binary notation
is slightly more difficult conceptually, but Subtract 8 from 11 to get 3. Put 1 in the
can easily be done once you know how 2^1 column, 0 in 2^2, and subtract 2 from
through the use of algorithms. Begin by 3. We're left with 1, which goes in 2^0, and
thinking of a few examples. We can easily we subtract one to get zero. Thus, our
see that the number 3= 2+1. and that this is
equivalent to (1*2^1)+(1*2^0). This number is 1001011.
translates into putting a "1" in the 2^1
column and a "1" in the 2^0 column, to get Making this algorithm a bit more formal
"11". Almost as intuitive is the number 5: it gives us:
is obviously 4+1, which is the same as
saying [(2*2) +1], or 2^2+1. This can also 1. Let D=number we wish to convert
be written as [(1*2^2)+(1*2^0)]. Looking at from decimal to binary
this in columns, 2. Repeat until D=0
o a. Find the largest power of
2^2 | 2^1 | 2^0 two in D. Let this equal P.
1 0 1 o b. Put a 1 in binary column
or 101. P.
o c. Subtract P from D.
What we're doing here is finding the largest 3. Put zeros in all columns which don't
power of two within the number (2^2=4 is have ones.
the largest power of 2 in 5), subtracting that
from the number (5-4=1), and finding the This algorithm is a bit awkward. Particularly
largest power of 2 in the remainder (2^0=1
is the largest power of 2 in 1). Then we just step 3, "filling in the zeros." Therefore, we
put this into columns. This process should rewrite it such that we ascertain the
continues until we have a remainder of 0. value of each column individually, putting
Let's take a look at how it works. We know in 0's and 1's as we go:
that:
1. Let D= the number we wish to
2^0=1
2^1=2 convert from decimal to binary
2^2=4 2. Find P, such that 2^P is the largest
2^3=8 power of two smaller than D.
2^4=16 3. Repeat until P<0
2^5=32 o If 2^P<=D then
2^6=64 put 1 into column P
2^7=128 subtract 2^P from D
and so on. To convert the decimal number o Else
75 to binary, we would find the largest put 0 into column P
power of 2 less than 75, which is 64. Thus, o End if
o Subtract 1 from P All binary numbers are in the form
Dec
ima 20 25 30 40 50 100 200 500
l:
www.pdfsearchengine.com