

Abinary code is the value of adata-encoding convention represented in abinary notation that usually is a sequence of 0s and 1s; sometimes called abit string. For example,ASCII is an 8-bit text encoding that in addition to thehuman readable form (letters) can be represented as binary.Binary code can also refer to themass nouncode that is not human readable in nature such asmachine code andbytecode.
Even though all modern computer data is binary in nature, and therefore can be represented as binary, othernumerical bases may be used.Power of 2 bases (includinghex andoctal) are sometimes considered binary code since their power-of-2 nature makes them inherently linked to binary.Decimal is, of course, a commonly used representation. For example, ASCII characters are often represented as either decimal or hex. Some types of data such asimage data is sometimes represented as hex, but rarely as decimal.
This section'sfactual accuracy isdisputed. Relevant discussion may be found on thetalk page. Please help to ensure that disputed statements arereliably sourced.(April 2015) (Learn how and when to remove this message) |

The modern binary number system, the basis for binary code, is an invention byGottfried Leibniz in 1689 and appears in his articleExplication 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 ofcreatio ex nihilo or creation out of nothing.[1][2] In Leibniz's view, binary numbers represented a fundamental form of creation, reflecting the simplicity and unity of the divine.[2] 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.[2]
Leibniz explained in his work that he encountered theI Ching byFu Xi[2] that dates from the 9th century BC in China,[3] through French JesuitJoachim Bouvet and noted with fascination how itshexagrams 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 binarymathematics he admired.[4][5] Leibniz saw the hexagrams as an affirmation of the universality of his own religious belief.[5] 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.[6] The binary system of theI Ching is based on the duality ofyin and yang.[7]Slit drums with binary tones are used to encode messages across Africa and Asia.[7] The Indian scholarPingala (around 5th–2nd centuries BC) developed a binary system for describingprosody in hisChandashutram.[8][9]
Mangareva people inFrench Polynesia were using a hybrid binary-decimal system before 1450.[10] In the 11th century, scholar and philosopherShao 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 theleast significant bit on top. The ordering is also thelexicographical order onsextuples of elements chosen from a two-element set.[11]

In 1605Francis Bacon 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.[12] 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".[12]
George Boole published a paper in 1847 called 'The Mathematical Analysis of Logic' that describes an algebraic system of logic, now known asBoolean algebra. 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.[13] This system was not put into use until a graduate student fromMassachusetts Institute of Technology,Claude Shannon, 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.[14]
This sectionpossibly containsoriginal research. Pleaseimprove it byverifying the claims made and addinginline citations. Statements consisting only of original research should be removed.(March 2015) (Learn how and when to remove this message) |

A binary code can be rendered using any two distinguishable indications. In addition to the bit string, other notable ways to render a binary code are described below.

Innumerable encoding systems exists. Some notable examples are described here.
1100001.{{cite book}}:ISBN / Date incompatibility (help)