Binary code
   HOME

TheInfoList



OR:

A binary code represents
text Text may refer to: Written word * Text (literary theory) In literary theory, a text is any object that can be "read", whether this object is a work of literature, a street sign, an arrangement of buildings on a city block, or styles of clothi ...
, computer processor instructions, or any other
data Data ( , ) are a collection of discrete or continuous values that convey information, describing the quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted for ...
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 bits, 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 Data processing, information processing, code is a system of rules to convert information—such as a letter (alphabet), letter, word, sound, image, or gesture—into another form, sometimes data compression, shortened or ...
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 A binary number is a number expressed in the Radix, base-2 numeral system or binary numeral system, a method for representing numbers that uses only two symbols for the natural numbers: typically "0" (zero) and "1" (one). A ''binary number'' may ...
, is usually displayed in code tables in
octal Octal (base 8) is a numeral system with eight as the base. In the decimal system, each place is a power of ten. For example: : \mathbf_ = \mathbf \times 10^1 + \mathbf \times 10^0 In the octal system, each place is a power of eight. For ex ...
,
decimal The decimal numeral system (also called the base-ten positional numeral system and denary or decanary) is the standard system for denoting integer and non-integer numbers. It is the extension to non-integer numbers (''decimal fractions'') of th ...
or
hexadecimal Hexadecimal (also known as base-16 or simply hex) is a Numeral system#Positional systems in detail, positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbo ...
notation. There are many
character sets Character encoding is the process of assigning numbers to graphical character (computing), characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using computers. The numerical v ...
and many
character encoding Character encoding is the process of assigning numbers to graphical character (computing), characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using computers. The numerical v ...
s for them. A bit string, interpreted as a binary number, can be translated into a decimal number. For example, the
lower case Letter case is the distinction between the letters that are in larger uppercase or capitals (more formally ''majuscule'') and smaller lowercase (more formally '' minuscule'') in the written representation of certain languages. The writing system ...
''a'', if represented by the bit string 01100001 (as it is in the standard
ASCII ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
code), can also be represented as the decimal number 97.


History of binary codes


Invention

The modern binary number system, the basis for binary code, is an invention by
Gottfried Leibniz Gottfried Wilhelm Leibniz (or Leibnitz; – 14 November 1716) was a German polymath active as a mathematician, philosopher, scientist and diplomat who is credited, alongside Isaac Newton, Sir Isaac Newton, with the creation of calculus in ad ...
in 1689 and appears in his article ''Explication de l'Arithmétique Binaire (''English: ''Explanation of the Binary Arithmetic'') which uses only the characters 1 and 0, and some remarks on its usefulness. Leibniz's system uses 0 and 1, like the modern binary numeral system. Binary numerals were central to Leibniz's intellectual and theological ideas. He believed that binary numbers were symbolic of the Christian idea of '' creatio ex nihilo'' or creation out of nothing.Leibniz G., Explication de l'Arithmétique Binaire, Die Mathematische Schriften, ed. C. Gerhardt, Berlin 1879, vol.7, p.223; Engl. trans

/ref> In Leibniz's view, binary numbers represented a fundamental form of creation, reflecting the simplicity and unity of the divine. Leibniz was also attempting to find a way to translate logical reasoning into pure mathematics. He viewed the binary system as a means of simplifying complex logical and mathematical processes, believing that it could be used to express all concepts of arithmetic and logic.


Previous Ideas

Leibniz explained in his work that he encountered the ''
I Ching The ''I Ching'' or ''Yijing'' ( ), usually translated ''Book of Changes'' or ''Classic of Changes'', is an ancient Chinese divination text that is among the oldest of the Chinese classics. The ''I Ching'' was originally a divination manual in ...
'' by Fu Xi that dates from the 9th century BC in China, through French Jesuit Joachim Bouvet 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 Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
he admired. Leibniz saw the hexagrams as an affirmation of the universality of his own religious belief. After Leibniz ideas were ignored, 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. The binary system of the ''I Ching'' is based on the duality of
yin and yang Originating in Chinese philosophy, yin and yang (, ), also yinyang or yin-yang, is the concept of opposite cosmic principles or forces that interact, interconnect, and perpetuate each other. Yin and yang can be thought of as complementary an ...
. Slit drums with binary tones are used to encode messages across Africa and Asia. The Indian scholar Pingala (around 5th–2nd centuries BC) developed a binary system for describing prosody in his ''Chandashutram''.
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 ...
people in
French Polynesia French Polynesia ( ; ; ) is an overseas collectivity of France and its sole #Governance, overseas country. It comprises 121 geographically dispersed islands and atolls stretching over more than in the Pacific Ocean, South Pacific Ocean. The t ...
were using a hybrid binary-
decimal The decimal numeral system (also called the base-ten positional numeral system and denary or decanary) is the standard system for denoting integer and non-integer numbers. It is the extension to non-integer numbers (''decimal fractions'') of th ...
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 In mathematics, the lexicographic or lexicographical order (also known as lexical order, or dictionary order) is a generalization of the alphabetical order of the dictionaries to sequences of ordered symbols or, more generally, of elements of a ...
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) was an English philosopher and statesman who served as Attorney General and Lord Chancellor of England under King James I. Bacon argued for the importance of nat ...
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".


Boolean Logical System

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 Ireland. H ...
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 variable (mathematics), variables are the truth values ''true'' and ''false'', usually denot ...
. 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 university, private research university in Cambridge, Massachusetts, United States. Established in 1861, MIT has played a significant role in the development of many areas of moder ...
,
Claude Shannon Claude Elwood Shannon (April 30, 1916 – February 24, 2001) was an American mathematician, electrical engineer, computer scientist, cryptographer and inventor known as the "father of information theory" and the man who laid the foundations of th ...
, 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'', 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 ( , ) is a Tactile alphabet, tactile writing system used by blindness, blind or visually impaired people. It can be read either on embossed paper or by using refreshable braille displays that connect to computers and smartphone device ...
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'' are diagrams used in ''
feng shui Feng shui ( or ), sometimes called Chinese geomancy, is a traditional form of geomancy that originated in ancient China and claims to use energy forces to harmonize individuals with their surrounding environment. The term ''feng shui'' mean ...
,''
Taoist Taoism or Daoism (, ) is a diverse philosophical and religious tradition indigenous to China, emphasizing harmony with the Tao ( zh, p=dào, w=tao4). With a range of meaning in Chinese philosophy, translations of Tao include 'way', 'road', ...
cosmology Cosmology () is a branch of physics and metaphysics dealing with the nature of the universe, the cosmos. The term ''cosmology'' was first used in English in 1656 in Thomas Blount's ''Glossographia'', with the meaning of "a speaking of the wo ...
and ''
I Ching The ''I Ching'' or ''Yijing'' ( ), usually translated ''Book of Changes'' or ''Classic of Changes'', is an ancient Chinese divination text that is among the oldest of the Chinese classics. The ''I Ching'' was originally a divination manual in ...
'' 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, and Ewe, consists of an elaborate traditional ceremony producing 256 oracles made up by 16 symbols with 256 = 16 x 16. An initiated priest, or Babalawo, 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 Islam is an Abrahamic religions, Abrahamic monotheistic religion based on the Quran, and the teachings of Muhammad. Adherents of Islam are called Muslims, who are estimated to number Islam by country, 2 billion worldwide and are the world ...
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, a compound of Greek roots denoting "earth divination", was originally used to mean methods of divination that interpret geographic features, markings on the ground, or the patterns formed by soil, rock (geology), rocks, or sand. Its d ...
) 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 The ''I Ching'' or ''Yijing'' ( ), usually translated ''Book of Changes'' or ''Classic of Changes'', is an ancient Chinese divination text that is among the oldest of the Chinese classics. The ''I Ching'' was originally a divination manual in ...
(17th Century, described by
Gottfried Wilhelm Leibniz Gottfried Wilhelm Leibniz (or Leibnitz; – 14 November 1716) was a German polymath active as a mathematician, philosopher, scientist and diplomat who is credited, alongside Sir Isaac Newton, with the creation of calculus in addition to ...
).


Coding systems


ASCII code

The American Standard Code for Information Interchange (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 decimal 97).


Binary-coded decimal

Binary-coded decimal (BCD) is a binary encoded representation of integer values that uses a 4-bit
nibble In computing, a nibble, or spelled nybble to match byte, is a unit of information that is an aggregation of four- bits; half of a byte/ octet. The unit is alternatively called nyble, nybl, half-byte or tetrade. In networking or telecommuni ...
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 prin ...
"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 which is 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 one-time use. Li ...
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. He was highly influential in the development of theoretical computer ...
electro-mechanical binary multiplier * 1937:
George Stibitz George Robert Stibitz (April 30, 1904 – January 31, 1995) was an American researcher at Bell Labs who is 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 r ...
"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, List of pioneers in computer science, pioneering computer scientist, inventor and businessman. His greatest achievement was the world's first programm ...
Z1


Current uses of binary

Most modern computers use binary encoding for instructions and data. CDs, DVDs, and
Blu-ray Disc Blu-ray (Blu-ray Disc or BD) is a Digital media, digital optical disc data storage format designed to supersede the DVD format. It was invented and developed in 2005 and released worldwide on June 20, 2006, capable of storing several hours of ...
s 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 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, the amplitud ...
, and on
voice over IP Voice over Internet Protocol (VoIP), also known as IP telephony, is a set of technologies used primarily for voice communication sessions over Internet Protocol (IP) networks, such as the Internet. VoIP enables voice calls to be transmitted as ...
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 or ''m''-out-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 ...
s,Table of Constant Weight Binary Codes
/ref> is the
Hamming weight The Hamming weight of a string (computer science), 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 mo ...
of the binary words coding for the represented words or sequences.


See also

*
Binary number A binary number is a number expressed in the Radix, base-2 numeral system or binary numeral system, a method for representing numbers that uses only two symbols for the natural numbers: typically "0" (zero) and "1" (one). A ''binary number'' may ...
* 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 files ...
*
Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
*
Gray code The reflected binary code (RBC), also known as reflected binary (RB) or Gray code after Frank Gray (researcher), Frank Gray, is an ordering of the binary numeral system such that two successive values differ in only one bit (binary digit). For ...


References


External links

* , predates binary number system. *
Table of general binary codes
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.
First book in the world fully written in binary code
(IT) Luigi Usai, ''01010011 01100101 01100111 01110010 01100101 01110100 01101001'', Independently published, 2023, ISBN 979-8-8604-3980-1. URL consulted September 8, 2023. Computer data English inventions Encodings Gottfried Wilhelm Leibniz 2 (number)