Binary Number
Binary Number
History
The modern binary number system was
studied in Europe in the 16th and 17th
centuries by Thomas Harriot, Juan
Caramuel y Lobkowitz, and Gottfried
Leibniz. However, systems related to
binary numbers have appeared earlier in
multiple cultures including ancient Egypt,
China, and India. Leibniz was specifically
inspired by the Chinese I Ching.
Egypt
Arithmetic values represented by parts of the Eye of
Horus
China
Daoist Bagua
India
The Indian scholar Pingala (c. 2nd century
BC) developed a binary system for
describing prosody.[8][9] He used binary
numbers in the form of short and long
syllables (the latter equal in length to two
short syllables), making it similar to Morse
code.[10][11] Pingala's Hindu classic titled
Chandaḥśāstra (8.23) describes the
formation of a matrix in order to give a
unique value to each meter. The binary
representations in Pingala's system
increases towards the right, and not to the
left like in the binary numbers of the
modern, Western positional notation.[12][13]
Other cultures
The residents of the island of Mangareva
in French Polynesia were using a hybrid
binary-decimal system before 1450.[14] Slit
drums with binary tones are used to
encode messages across Africa and
Asia.[6] Sets of binary combinations similar
to the I Ching have also been used in
traditional African divination systems such
as Ifá as well as in medieval Western
geomancy.
Gottfried Leibniz
0 0 0 1 numerical value 20
0 0 1 0 numerical value 21
0 1 0 0 numerical value 22
1 0 0 0 numerical value 23
Leibniz interpreted the hexagrams of the I
Ching as evidence of binary calculus.[19]
As a Sinophile, Leibniz was aware of the I
Ching, noted with fascination how its
hexagrams correspond to the binary
numbers from 0 to 111111, and concluded
that this mapping was evidence of major
Chinese accomplishments in the sort of
philosophical mathematics he admired.[20]
Leibniz was first introduced to the I Ching
through his contact with the French Jesuit
Joachim Bouvet, who visited China in 1685
as a missionary. Leibniz saw the I Ching
hexagrams as an affirmation of the
universality of his own religious beliefs as
a Christian.[19] Binary numerals were
central to Leibniz's theology. He believed
that binary numbers were symbolic of the
Christian idea of creatio ex nihilo or
creation out of nothing.[21]
Later developments
George Boole
In 1854, British mathematician George
Boole published a landmark paper
detailing an algebraic system of logic that
would become known as Boolean algebra.
His logical calculus was to become
instrumental in the design of digital
electronic circuitry.[22]
Representation
Any number can be represented by a
sequence of bits (binary digits), which in
turn may be represented by any
mechanism capable of being in two
mutually exclusive states. Any of the
following rows of symbols can be
interpreted as the binary numeric value of
667:
1010011011
| ― | ―― | | ― | |
☒☐☒☐☐☒☒☐☒☒
ynynny yny y
A binary clock might use LEDs to express binary
values. In this clock, each column of LEDs shows a
binary-coded decimal numeral of the traditional
sexagesimal time.
Counting in binary
Decimal Binary
pattern number
0 0
1 1
2 10
3 11
4 100
5 101
6 110
7 111
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111
Counting in binary is similar to counting in
any other number system. Beginning with
a single digit, counting proceeds through
each symbol, in increasing order. Before
examining binary counting, it is useful to
briefly discuss the more familiar decimal
counting system as a frame of reference.
Decimal counting
Binary counting
0000,
0001, (rightmost digit starts over, and
next digit is incremented)
0010, 0011, (rightmost two digits start
over, and next digit is incremented)
0100, 0101, 0110, 0111, (rightmost three
digits start over, and the next digit is
incremented)
1000, 1001, 1010, 1011, 1100, 1101,
1110, 1111 ...
1001012 = [ ( 1 ) × 25 ] + [ ( 0 ) × 24 ] + [ (
0 ) × 23 ] + [ ( 1 ) × 22 ] + [ ( 0 ) × 21 ] + [ (
1 ) × 20 ]
1001012 = [ 1 × 32 ] + [ 0 × 16 ] + [ 0 × 8 ]
+[1×4]+[0×2]+[1×1]
1001012 = 3710
Fractions
Fractions in binary only terminate if the
denominator has 2 as the only prime
factor. As a result, 1/10 does not have a
finite binary representation, and this
causes 10 × 0.1 not to be precisely equal
to 1 in floating point arithmetic. As an
example, to interpret the binary expression
for 1/3 = .010101..., this means: 1/3 = 0 ×
2−1 + 1 × 2−2 + 0 × 2−3 + 1 × 2−4 + ... =
0.3125 + ... An exact value cannot be
found with a sum of a finite number of
inverse powers of two, the zeros and ones
in the binary representation of 1/3
alternate forever.
Fraction Decimal Binary Fractional approximation
1/2 0.5 or 0.4999... 0.1 or 0.0111... 1/4 + 1/8 + 1/16 . . .
1/4 0.25 or 0.24999... 0.01 or 0.00111... 1/8 + 1/16 + 1/32 . . .
1/8 0.125 or 0.124999... 0.001 or 0.000111... 1/16 + 1/32 + 1/64 . . .
1/16 0.0625 or 0.0624999... 0.0001 or 0.0000111... 1/32 + 1/64 + 1/128 . . .
Binary arithmetic
Arithmetic in binary is much like arithmetic
in other numeral systems. Addition,
subtraction, multiplication, and division
can be performed on binary numerals.
Addition
0+0→0
0+1→1
1+0→1
1 + 1 → 0, carry 1 (since 1 + 1 = 2 = 0 +
(1 × 21) )
5 + 5 → 0, carry 1 (since 5 + 5 = 10 = 0 +
(1 × 101) )
7 + 9 → 6, carry 1 (since 7 + 9 = 16 = 6 +
(1 × 101) )
This is known as carrying. When the result
of an addition exceeds the value of a digit,
the procedure is to "carry" the excess
amount divided by the radix (that is,
10/10) to the left, adding it to the next
positional value. This is correct since the
next position has a weight that is higher by
a factor equal to the radix. Carrying works
the same way in binary:
1 1 1 1 1 (carried
digits)
0 1 1 0 1
+ 1 0 1 1 1
-------------
= 1 0 0 1 0 0 = 36
Binary
Decimal
1 1 1 1 1 likewise
9 9 9 9 9
+ 1
+ 1
———————————
———————————
1 0 0 0 0 0
1 0 0 0 0 0
vs.
1 1 1 1 1 1 1 1
(carried digits) 1 ←
1 ← carry the 1
until it is one digit past
the "string" below
1 1 1 0 1 1 1 1 1 0
1 1 1 0 1 1 1 1 1 0 cross
out the "string",
+ 1 0 1 0 1 1 0 0 1 1
+ 1 0 1 0 1 1 0 0 1 1 and
cross out the digit that was
added to it
———————————————————————
——————————————————————
= 1 1 0 0 1 1 1 0 0 0 1
1 1 0 0 1 1 1 0 0 0 1
Addition table
0 1
0 0 1
1 1 10
Subtraction
0−0→0
0 − 1 → 1, borrow 1
1−0→1
1−1→0
* * * * (starred
columns are borrowed from)
1 1 0 1 1 1 0
− 1 0 1 1 1
----------------
= 1 0 1 0 1 1 1
* (starred
columns are borrowed from)
1 0 1 1 1 1 1
- 1 0 1 0 1 1
----------------
= 0 1 1 0 1 0 0
Multiplication
1 0 1 1 (A)
× 1 0 1 0 (B)
---------
0 0 0 0 ←
Corresponds to the rightmost
'zero' in B
+ 1 0 1 1 ←
Corresponds to the next
'one' in B
+ 0 0 0 0
+ 1 0 1 1
---------------
= 1 1 0 1 1 1 0
1 0 1 . 1 0 1
A (5.625 in decimal)
× 1 1 0 . 0 1
B (6.25 in decimal)
---------------
----
1 . 0 1 1
0 1 ← Corresponds to a
'one' in B
+ 0 0 . 0 0 0
0 ← Corresponds to a
'zero' in B
+ 0 0 0 . 0 0 0
+ 1 0 1 1 . 0 1
+ 1 0 1 1 0 . 1
-----------------------
----
= 1 0 0 0 1 1 . 0 0 1
0 1 (35.15625 in decimal)
See also Booth's multiplication algorithm.
Multiplication table
0 1
0 0 0
1 0 1
Division
1
___________
1 0 1 ) 1 1 0 1 1
− 1 0 1
-----
0 0 1
1 0 1
___________
1 0 1 ) 1 1 0 1 1
− 1 0 1
-----
1 1 1
− 1 0 1
-----
1 0
Thus, the quotient of 110112 divided by
1012 is 1012, as shown on the top line,
while the remainder, shown on the bottom
line, is 102. In decimal, 27 divided by 5 is 5,
with a remainder of 2.
Square root
1 0 0 1
---------
√ 1010001
1
---------
101 01
0
--------
1001 100
0
--------
10001 10001
10001
-------
0
Bitwise operations
Though not directly related to the
numerical interpretation of binary symbols,
sequences of bits may be manipulated
using Boolean logical operators. When a
string of binary symbols is manipulated in
this way, it is called a bitwise operation;
the logical operators AND, OR, and XOR
may be performed on corresponding bits
in two binary numerals provided as input.
The logical NOT operation may be
performed on individual bits in a single
binary numeral provided as input.
Sometimes, such operations may be used
as arithmetic short-cuts, and may have
other computational benefits as well. For
example, an arithmetic shift left of a binary
number is the equivalent of multiplication
by a (positive, integral) power of 2.
0 ×2+ 1 =1
1 ×2+ 0 =2
2 ×2+ 0 =4
4 ×2+ 1 =9
9 ×2+ 0 = 18
18 × 2 + 1 = 37
37 × 2 + 0 = 74
74 × 2 + 1 = 149
149 × 2 + 1 = 299
299 × 2 + 0 = 598
598 × 2 + 1 = 1197
The result is 119710. Note that the first
Prior Value of 0 is simply an initial decimal
value. This method is an application of the
Horner scheme.
Binary 1 0 0 1 0 1 0
1×210 0×29 0×28 1×27 0×26 1×25 0×24
Decimal
+ + + + + + +
Converting Result
0.
0.0
0.01
0.010
0.0101
Converting Result
0.1 0.
Hexadecimal
0hex = 0dec = 0oct 0 0 0 0
1hex = 1dec = 1oct 0 0 0 1
2hex = 2dec = 2oct 0 0 1 0
3hex = 3dec = 3oct 0 0 1 1
4hex = 4dec = 4oct 0 1 0 0
5hex = 5dec = 5oct 0 1 0 1
6hex = 6dec = 6oct 0 1 1 0
7hex = 7dec = 7oct 0 1 1 1
8hex = 8dec =10oct 1 0 0 0
9hex = 9dec =11oct 1 0 0 1
Ahex =10dec =12oct 1 0 1 0
Bhex =11dec =13oct 1 0 1 1
Chex =12dec =14oct 1 1 0 0
Dhex =13dec =15oct 1 1 0 1
Ehex =14dec =16oct 1 1 1 0
Fhex =15dec =17oct 1 1 1 1
Octal
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
= = 0.10110100
10110100 10110100...2
0.10100100010000100000100... does
have a pattern, but it is not a fixed-length
recurring pattern, so the number is
irrational
1.011010100000100111100110011001
1111110... is the binary representation
of , the square root of 2, another
irrational. It has no discernible pattern.
See irrational number.
See also
Binary code
Binary-coded decimal
Finger binary
Gray code
Linear feedback shift register
Offset binary
Quibinary
Reduction of summands
Redundant binary representation
Repeating decimal
SZTAKI Desktop Grid searches for
generalized binary number systems up
to dimension 11.
Two's complement
References
1. Robson, Eleanor; Stedall, Jacqueline, eds.
(2009), "Myth No. 2: the Horus eye
fractions", The Oxford Handbook of the
History of Mathematics , Oxford University
Press, p. 790, ISBN 9780199213122
2. Chrisomalis, Stephen (2010), Numerical
Notation: A Comparative History ,
Cambridge University Press, pp. 42–43,
ISBN 9780521878180.
3. Rudman, Peter Strom (2007), How
Mathematics Happened: The First 50,000
Years , Prometheus Books, pp. 135–136,
ISBN 9781615921768.
4. Edward Hacker; Steve Moore; Lorraine
Patsco (2002). I Ching: An Annotated
Bibliography . Routledge. p. 13. ISBN 978-0-
415-93969-0.
5. Redmond & Hon (2014), p. 227.
6. Jonathan Shectman (2003).
Groundbreaking Scientific Experiments,
Inventions, and Discoveries of the 18th
Century . Greenwood Publishing. p. 29.
ISBN 978-0-313-32015-6.
7. Zhonglian, Shi; Wenzhao, Li; Poser, Hans
(2000). Leibniz’ Binary System and Shao
Yong’s ”Xiantian Tu‘‘ in :Das Neueste über
China: G.W. Leibnizens Novissima Sinica
von 1697 : Internationales Symposium,
Berlin 4. bis 7. Oktober 1997 . Stuttgart:
Franz Steiner Verlag. pp. 165–170.
ISBN 3515074481.
8. Sanchez, Julio; Canton, Maria P. (2007).
Microcontroller programming: the microchip
PIC. Boca Raton, Florida: CRC Press. p. 37.
ISBN 0-8493-7189-9.
9. W. S. Anglin and J. Lambek, The Heritage
of Thales, Springer, 1995, ISBN 0-387-
94544-X
10. Binary Numbers in Ancient India
11. Math for Poets and Drummers (pdf,
145KB)
12. "Binary Numbers in Ancient India" .
13. Stakhov, Alexey; Olsen, Scott Anthony
(2009). The mathematics of harmony: from
Euclid to contemporary mathematics and
computer science . ISBN 978-981-277-582-
5.
14. Bender, Andrea; Beller, Sieghard (16
December 2013). "Mangarevan invention of
binary steps for easier calculation" .
Proceedings of the National Academy of
Sciences. 111: 1322–1327.
doi:10.1073/pnas.1309160110 .
PMC 3910603 . PMID 24344278 .
15. Bacon, Francis (1605). "The
Advancement of Learning" . London.
pp. Chapter 1.
16. Shirley, John W. (1951). "Binary
numeration before Leibniz". American
Journal of Physics. 19 (8): 452–454.
doi:10.1119/1.1933042 .
17. Ineichen, R. (2008). "Leibniz, Caramuel,
Harriot und das Dualsystem" (PDF).
Mitteilungen der deutschen Mathematiker-
Vereinigung (in German). 16 (1): 12–15.
18. Leibniz G., Explication de l'Arithmétique
Binaire, Die Mathematische Schriften, ed. C.
Gerhardt, Berlin 1879, vol.7, p.223; Engl.
transl.[1]
19. J.E.H. Smith (2008). Leibniz: What Kind
of Rationalist?: What Kind of Rationalist? .
Springer. p. 415. ISBN 978-1-4020-8668-7.
20. Aiton, Eric J. (1985). Leibniz: A
Biography. Taylor & Francis. pp. 245–8.
ISBN 0-85274-470-6.
21. Yuen-Ting Lai (1998). Leibniz,
Mysticism and Religion . Springer. pp. 149–
150. ISBN 978-0-7923-5223-5.
22. Boole, George (2009) [1854]. An
Investigation of the Laws of Thought on
Which are Founded the Mathematical
Theories of Logic and Probabilities
(Macmillan, Dover Publications, reprinted
with corrections [1958] ed.). New York:
Cambridge University Press. ISBN 978-1-
108-00153-3.
23. Shannon, Claude Elwood (1940). A
symbolic analysis of relay and switching
circuits . Cambridge: Massachusetts
Institute of Technology.
24. "National Inventors Hall of Fame –
George R. Stibitz" . 20 August 2008.
Archived from the original on 9 July 2010.
Retrieved 5 July 2010.
25. "George Stibitz : Bio" . Math & Computer
Science Department, Denison University. 30
April 2004. Retrieved 5 July 2010.
26. "Pioneers – The people and ideas that
made a difference – George Stibitz (1904–
1995)" . Kerry Redshaw. 20 February 2006.
Retrieved 5 July 2010.
27. "George Robert Stibitz – Obituary" .
Computer History Association of California.
6 February 1995. Retrieved 5 July 2010.
28. "Konrad Zuse's Legacy: The Architecture
of the Z1 and Z3" (PDF). IEEE Annals of the
History of Computing. 19 (2): 5–15. 1997.
doi:10.1109/85.586067 .
29. Küveler, Gerd; Schwoch, Dietrich (2013)
[1996]. Arbeitsbuch Informatik - eine
praxisorientierte Einführung in die
Datenverarbeitung mit Projektaufgabe (in
German). Vieweg-Verlag, reprint: Springer-
Verlag. doi:10.1007/978-3-322-92907-5 .
ISBN 978-3-528-04952-2. 9783322929075.
Retrieved 2015-08-05.
30. Küveler, Gerd; Schwoch, Dietrich (2007-
10-04). Informatik für Ingenieure und
Naturwissenschaftler: PC- und
Mikrocomputertechnik, Rechnernetze (in
German). 2 (5 ed.). Vieweg, reprint:
Springer-Verlag. ISBN 3834891916.
9783834891914. Retrieved 2015-08-05.
31. "Base System" . Retrieved 31 August
2016.
Further reading
Sanchez, Julio; Canton, Maria P. (2007).
Microcontroller programming: the
microchip PIC. Boca Raton, FL: CRC
Press. p. 37. ISBN 0-8493-7189-9.
Redmond, Geoffrey; Hon, Tze-Ki (2014).
Teaching the I Ching. Oxford University
Press. ISBN 0-19-976681-9.
External links
Wikimedia Commons has media related to
Binary numeral system.
Retrieved from
"https://en.wikipedia.org/w/index.php?
title=Binary_number&oldid=875088692"