Binary coding
   HOME

TheInfoList



OR:

A binary code represents
text Text may refer to: Written word * Text (literary theory), any object that can be read, including: **Religious text, a writing that a religious tradition considers to be sacred **Text, a verse or passage from scripture used in expository preachin ...
, computer processor instructions, or any other
data In the pursuit of knowledge, data (; ) is a collection of discrete Value_(semiotics), values that convey information, describing quantity, qualitative property, quality, fact, statistics, other basic units of meaning, or simply sequences of sy ...
using a two-symbol system. The two-symbol system used is often "0" and "1" from the binary number system. The binary code assigns a pattern of binary digits, also known as
bit The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represente ...
s, to each character, instruction, etc. For example, a binary string of eight bits (which is also called a byte) can represent any of 256 possible values and can, therefore, represent a wide variety of different items. In computing and telecommunications, binary codes are used for various methods of
encoding In communications and information processing, code is a system of rules to convert information—such as a letter, word, sound, image, or gesture—into another form, sometimes shortened or secret, for communication through a communication ...
data, such as
character string In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and the length changed, or it may be fixed (after creation). ...
s, into bit strings. Those methods may use fixed-width or variable-width strings. In a fixed-width binary code, each letter, digit, or other character is represented by a bit string of the same length; that bit string, interpreted as a binary number, is usually displayed in code tables in
octal The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. This is to say that 10octal represents eight and 100octal represents sixty-four. However, English, like most languages, uses a base-10 number ...
, decimal or hexadecimal notation. There are many
character sets Character encoding is the process of assigning numbers to graphical characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using digital computers. The numerical values that ...
and many
character encoding Character encoding is the process of assigning numbers to Graphics, graphical character (computing), characters, especially the written characters of Language, human language, allowing them to be Data storage, stored, Data communication, transmi ...
s for them. A
bit string A bit array (also known as bitmask, bit map, bit set, bit string, or bit vector) is an array data structure that compactly stores bits. It can be used to implement a simple set data structure. A bit array is effective at exploiting bit-level ...
, interpreted as a binary number, can be translated into a decimal number. For example, the lower case ''a'', if represented by the bit string 01100001 (as it is in the standard
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
code), can also be represented as the decimal number "97".


History of binary codes

The modern binary number system, the basis for binary code, was invented by
Gottfried Leibniz Gottfried Wilhelm (von) Leibniz . ( – 14 November 1716) was a German polymath active as a mathematician, philosopher, scientist and diplomat. He is one of the most prominent figures in both the history of philosophy and the history of mathem ...
in 1689 and appears in his article ''Explication de l'Arithmétique Binaire''. The full title is translated into English as the "Explanation of the binary arithmetic", which uses only the characters 1 and 0, with some remarks on its usefulness, and on the light it throws on the ancient Chinese figures of
Fu Xi Fuxi or Fu Hsi (伏羲 ~ 伏犧 ~ 伏戲) is a culture hero in Chinese legend and mythology, credited along with his sister and wife Nüwa with creating humanity and the invention of music, hunting, fishing, domestication, and cooking as well a ...
.Leibniz G., Explication de l'Arithmétique Binaire, Die Mathematische Schriften, ed. C. Gerhardt, Berlin 1879, vol.7, p.223; Engl. trans

/ref> Leibniz's system uses 0 and 1, like the modern binary numeral system. Leibniz encountered the '' I Ching'' through French Jesuit
Joachim Bouvet Joachim Bouvet (, courtesy name: 明远) (July 18, 1656, in Le Mans – June 28, 1730, in Peking) was a French Jesuit who worked in China, and the leading member of the Figurist movement. China Bouvet came to China in 1687, as one of six Jesuit ...
and 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 visual binary mathematics he admired. Leibniz saw the hexagrams as an affirmation of the universality of his own religious belief. Binary numerals were central to Leibniz's theology. He believed that binary numbers were symbolic of the Christian idea of ''
creatio ex nihilo (Latin for "creation out of nothing") is the doctrine that matter is not eternal but had to be created by some divine creative act. It is a theistic answer to the question of how the universe comes to exist. It is in contrast to ''Ex nihilo n ...
'' or creation out of nothing. Leibniz was trying to find a system that converts logic verbal statements into a pure mathematical one. After his ideas were ignored, he came across a classic Chinese text called ''I Ching'' or ‘Book of Changes’, which used 64 hexagrams of six-bit visual binary code. The book had confirmed his theory that life could be simplified or reduced down to a series of straightforward propositions. He created a system consisting of rows of zeros and ones. During this time period, Leibniz had not yet found a use for this system. Binary systems predating Leibniz also existed in the ancient world. The aforementioned ''I Ching'' that Leibniz encountered dates from the 9th century BC in China. The binary system of the ''I Ching'', a text for divination, is based on the duality of
yin and yang Yin and yang ( and ) is a Chinese philosophical concept that describes opposite but interconnected forces. In Chinese cosmology, the universe creates itself out of a primary chaos of material energy, organized into the cycles of yin and ya ...
.
Slit drum A slit drum or slit gong is a hollow percussion instrument. In spite of the name, it is not a true drum but an idiophone, usually carved or constructed from bamboo or wood into a box with one or more slits in the top. Most slit drums have one slit ...
s with binary tones are used to encode messages across Africa and Asia. The Indian scholar
Pingala Acharya Pingala ('; c. 3rd2nd century BCE) was an ancient Indian poet and mathematician, and the author of the ' (also called the ''Pingala-sutras''), the earliest known treatise on Sanskrit prosody. The ' is a work of eight chapters in the la ...
(around 5th–2nd centuries BC) developed a binary system for describing prosody in his ''Chandashutram''. The residents of the island of
Mangareva Mangareva is the central and largest island of the Gambier Islands in French Polynesia. It is surrounded by smaller islands: Taravai in the southwest, Aukena and Akamaru in the southeast, and islands in the north. Mangareva has a permanent p ...
in French Polynesia were using a hybrid binary- decimal system before 1450. In the 11th century, scholar and philosopher Shao Yong developed a method for arranging the hexagrams which corresponds, albeit unintentionally, to the sequence 0 to 63, as represented in binary, with yin as 0, yang as 1 and the least significant bit on top. The ordering is also the lexicographical order on sextuples of elements chosen from a two-element set. In 1605
Francis Bacon Francis Bacon, 1st Viscount St Alban (; 22 January 1561 – 9 April 1626), also known as Lord Verulam, was an English philosopher and statesman who served as Attorney General and Lord Chancellor of England. Bacon led the advancement of both ...
discussed a system whereby letters of the alphabet could be reduced to sequences of binary digits, which could then be encoded as scarcely visible variations in the font in any random text. Importantly for the general theory of binary encoding, he added that this method could be used with any objects at all: "provided those objects be capable of a twofold difference only; as by Bells, by Trumpets, by Lights and Torches, by the report of Muskets, and any instruments of like nature".
George Boole George Boole (; 2 November 1815 – 8 December 1864) was a largely self-taught English mathematician, philosopher, and logician, most of whose short career was spent as the first professor of mathematics at Queen's College, Cork in ...
published a paper in 1847 called 'The Mathematical Analysis of Logic' that describes an algebraic system of logic, now known as
Boolean algebra In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variables are the truth values ''true'' and ''false'', usually denoted 1 and 0, whereas i ...
. Boole's system was based on binary, a yes-no, on-off approach that consisted of the three most basic operations: AND, OR, and NOT. This system was not put into use until a graduate student from
Massachusetts Institute of Technology The Massachusetts Institute of Technology (MIT) is a private land-grant research university in Cambridge, Massachusetts. Established in 1861, MIT has played a key role in the development of modern technology and science, and is one of the ...
,
Claude Shannon Claude Elwood Shannon (April 30, 1916 – February 24, 2001) was an American mathematician, electrical engineer, and cryptographer known as a "father of information theory". As a 21-year-old master's degree student at the Massachusetts Inst ...
, noticed that the Boolean algebra he learned was similar to an electric circuit. In 1937, Shannon wrote his master's thesis, ''
A Symbolic Analysis of Relay and Switching Circuits "A Symbolic Analysis of Relay and Switching Circuits" is the title of a master's thesis written by computer science pioneer Claude E. Shannon while attending the Massachusetts Institute of Technology (MIT) in 1937. In his thesis, Shannon, a dual ...
'', which implemented his findings. Shannon's thesis became a starting point for the use of the binary code in practical applications such as computers, electric circuits, and more.


Other forms of binary code

The bit string is not the only type of binary code: in fact, a binary system in general, is any system that allows only two choices such as a switch in an electronic system or a simple true or false test.


Braille

Braille Braille (Pronounced: ) is a tactile writing system used by people who are visually impaired, including people who are blind, deafblind or who have low vision. It can be read either on embossed paper or by using refreshable braille disp ...
is a type of binary code that is widely used by the blind to read and write by touch, named for its creator, Louis Braille. This system consists of grids of six dots each, three per column, in which each dot has two states: raised or not raised. The different combinations of raised and flattened dots are capable of representing all letters, numbers, and punctuation signs.


Bagua

The ''
bagua The bagua or pakua (八卦) are a set of eight symbols that originated in China, used in Taoist cosmology to represent the fundamental principles of reality, seen as a range of eight interrelated concepts. Each consists of three lines, each li ...
'' are diagrams used in '' feng shui,''
Taoist Taoism (, ) or Daoism () refers to either a school of philosophical thought (道家; ''daojia'') or to a religion (道教; ''daojiao''), both of which share ideas and concepts of Chinese origin and emphasize living in harmony with the '' Tao ...
cosmology Cosmology () is a branch of physics and metaphysics dealing with the nature of the universe. The term ''cosmology'' was first used in English in 1656 in Thomas Blount's ''Glossographia'', and in 1731 taken up in Latin by German philosopher ...
and '' I Ching'' studies. The ''ba gua'' consists of 8 trigrams; ''bā'' meaning 8 and ''guà'' meaning divination figure. The same word is used for the 64 guà (hexagrams). Each figure combines three lines (''yáo'') that are either broken ( ''yin'') or unbroken (''yang''). The relationships between the trigrams are represented in two arrangements, the primordial, "Earlier Heaven" or "Fuxi" ''bagua'', and the manifested, "Later Heaven,"or "King Wen" ''bagua.'' (See also, the King Wen sequence of the 64 hexagrams).


Ifá, Ilm Al-Raml and Geomancy

The Ifá/Ifé system of divination in African religions, such as of Yoruba,
Igbo Igbo may refer to: * Igbo people, an ethnic group of Nigeria * Igbo language, their language * anything related to Igboland, a cultural region in Nigeria See also * Ibo (disambiguation) * Igbo mythology * Igbo music * Igbo art * * Igbo-Ukwu, a ...
, Ewe, consists of an elaborate traditional ceremony producing 256 oracles made up by 16 symbols with 256 = 16 x 16. An initiated priest "babalowo" who had memorized oracles, would request sacrifice from consulting clients and make prayers. Then, divination nuts or a pair of chains are used to produce random binary numbers, which are drawn with sandy material on an "Opun" figured wooden tray representing the totality of fate. Through the spread of Islamic culture, Ifé/Ifá was assimilated as the "Science of Sand" (ilm al-raml), which then spread further and became "Science of Reading the Signs on the Ground" (
Geomancy Geomancy ( Greek: γεωμαντεία, "earth divination") is a method of divination that interprets markings on the ground or the patterns formed by tossed handfuls of soil, rocks, or sand. The most prevalent form of divinatory geomancy in ...
) in Europe. This was thought to be another possible route from which computer science was inspired, as Geomancy arrived at Europe at an earlier stage (about 12th Century, described by Hugh of Santalla) than I Ching (17th Century, described by
Gottfried Wilhelm Leibniz Gottfried Wilhelm (von) Leibniz . ( – 14 November 1716) was a German polymath active as a mathematician, philosopher, scientist and diplomat. He is one of the most prominent figures in both the history of philosophy and the history of math ...
).


Coding systems


ASCII code

The
American Standard Code for Information Interchange ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of ...
(ASCII), uses a 7-bit binary code to represent text and other characters within computers, communications equipment, and other devices. Each letter or symbol is assigned a number from 0 to 127. For example, lowercase "a" is represented by 1100001 as a bit string (which is "97" in decimal).


Binary-coded decimal

Binary-coded decimal (BCD) is a binary encoded representation of integer values that uses a 4-bit nibble to encode decimal digits. Four binary bits can encode up to 16 distinct values; but, in BCD-encoded numbers, only ten values in each nibble are legal, and encode the decimal digits zero, through nine. The remaining six values are illegal and may cause either a machine exception or unspecified behavior, depending on the computer implementation of BCD arithmetic. BCD arithmetic is sometimes preferred to floating-point numeric formats in commercial and financial applications where the complex rounding behaviors of floating-point numbers is inappropriate.


Early uses of binary codes

* 1875:
Émile Baudot Jean-Maurice-Émile Baudot (; 11 September 1845 – 28 March 1903), French telegraph engineer and inventor of the first means of digital communication Baudot code, was one of the pioneers of telecommunications. He invented a multiplexed printi ...
"Addition of binary strings in his ciphering system," which, eventually, led to the ASCII of today. * 1884: The
Linotype machine The Linotype machine ( ) is a "line casting" machine used in printing; manufactured and sold by the former Mergenthaler Linotype Company and related It was a hot metal typesetting system that cast lines of metal type for individual uses. Lin ...
where the matrices are sorted to their corresponding channels after use by a binary-coded slide rail. * 1932: C. E. Wynn-Williams "Scale of Two" counter * 1937:
Alan Turing Alan Mathison Turing (; 23 June 1912 – 7 June 1954) was an English mathematician, computer scientist, logician, cryptanalyst, philosopher, and theoretical biologist. Turing was highly influential in the development of theoretical co ...
electro-mechanical binary multiplier * 1937:
George Stibitz George Robert Stibitz (April 30, 1904 – January 31, 1995) was a Bell Labs researcher internationally recognized as one of the fathers of the modern digital computer. He was known for his work in the 1930s and 1940s on the realization of Boolea ...
"excess three" code in the Complex Computer * 1937: Atanasoff–Berry Computer * 1938:
Konrad Zuse Konrad Ernst Otto Zuse (; 22 June 1910 – 18 December 1995) was a German civil engineer, pioneering computer scientist, inventor and businessman. His greatest achievement was the world's first programmable computer; the functional program ...
Z1


Current uses of binary

Most modern computers use binary encoding for instructions and data. CDs,
DVD The DVD (common abbreviation for Digital Video Disc or Digital Versatile Disc) is a digital optical disc data storage format. It was invented and developed in 1995 and first released on November 1, 1996, in Japan. The medium can store any kind ...
s, and Blu-ray Discs represent sound and video digitally in binary form. Telephone calls are carried digitally on long-distance and mobile phone networks using
pulse-code modulation Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM Stream (comp ...
, and on
voice over IP Voice over Internet Protocol (VoIP), also called IP telephony, is a method and group of technologies for the delivery of voice communications and multimedia sessions over Internet Protocol (IP) networks, such as the Internet. The terms Internet t ...
networks.


Weight of binary codes

The weight of a binary code, as defined in the table of
constant-weight code In coding theory, a constant-weight code, also called an ''m''-of-''n'' code, is an error detection and correction code where all codewords share the same Hamming weight. The one-hot code and the balanced code are two widely used kinds of constan ...
s,Table of Constant Weight Binary Codes
/ref> is the
Hamming weight The Hamming weight of a string is the number of symbols that are different from the zero-symbol of the alphabet used. It is thus equivalent to the Hamming distance from the all-zero string of the same length. For the most typical case, a string ...
of the binary words coding for the represented words or sequences.


See also

* Binary number * List of binary codes *
Binary file A binary file is a computer file that is not a text file. The term "binary file" is often used as a term meaning "non-text file". Many binary file formats contain parts that can be interpreted as text; for example, some computer document fil ...
*
Unicode Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, wh ...
* Gray code


References


External links


Sir Francis Bacon's BiLiteral Cypher system
predates binary number system. *

An updated version of the tables of bounds for small general binary codes given in .
Table of Nonlinear Binary Codes
Maintained by Simon Litsyn, E. M. Rains, and N. J. A. Sloane. Updated until 1999. * {{Cite book , last = Glaser , first = Anton , title = History of Binary and other Nondecimal Numeration , publisher = Tomash , year = 1971 , chapter = Chapter VII Applications to Computers , isbn = 978-0-938228-00-4 cites some pre-ENIAC milestones. Computer data English inventions Encodings Gottfried Wilhelm Leibniz 2 (number)