A binary code represents text, computer processor instructions, or any other data 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 data, such as character strings, 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, decimal or hexadecimal notation. There are many character sets and many character encodings for them.
A bit string, 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 code), can also be represented as the decimal number "97".
This section has multiple issues. Please help improve it or discuss these issues on the talk page . (Learn how and when to remove these messages)
|
The modern binary number system, the basis for binary code, is an invention by Gottfried Leibniz 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. [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 the I Ching, by Fu Xi [2] that dates from 9th Centry BC in China [3] , 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 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 the I Ching is based on the duality of yin and yang. [7] Slit drums with binary tones are used to encode messages across Africa and Asia. [7] The Indian scholar Pingala (around 5th–2nd centuries BC) developed a binary system for describing prosody in his Chandashutram. [8] [9]
Mangareva people in French Polynesia were using a hybrid binary-decimal system before 1450. [10] 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. [11]
In 1605 Francis 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 as Boolean 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 from Massachusetts 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 section possibly contains original research .(March 2015) |
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 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.
The bagua are diagrams used in feng shui, Taoist cosmology 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. [15] (See also, the King Wen sequence of the 64 hexagrams).
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, [16] 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) in Europe.
This was thought to be another possible route from which computer science was inspired, [17] 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).
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 "97" in 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. [18]
Most modern computers use binary encoding for instructions and data. CDs, DVDs, 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, and on voice over IP networks.
The weight of a binary code, as defined in the table of constant-weight codes, [20] is the Hamming weight of the binary words coding for the represented words or sequences.
In computing and electronic systems, binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each digit is represented by a fixed number of bits, usually four or eight. Sometimes, special bit patterns are used for a sign or other indications.
In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a signed sequence of a fixed number of digits in some base, called a significand, scaled by an integer exponent of that base. Numbers of this form are called floating-point numbers.
Hexadecimal is a positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbols, hexadecimal uses sixteen distinct symbols, most often the symbols "0"–"9" to represent values 0 to 9 and "A"–"F" to represent values from ten to fifteen.
In computer science, an integer is a datum of integral data type, a data type that represents some range of mathematical integers. Integral data types may be of different sizes and may or may not be allowed to contain negative values. Integers are commonly represented in a computer as a group of binary digits (bits). The size of the grouping varies so the set of integer sizes available varies between different types of computers. Computer hardware nearly always provides a way to represent a processor register or memory address as an integer.
Octal is a numeral system with eight as the base.
A computer number format is the internal representation of numeric values in digital device hardware and software, such as in programmable computers and calculators. Numerical values are stored as groupings of bits, such as bytes and words. The encoding between numerical values and bit patterns is chosen for convenience of the operation of the computer; the encoding used by the computer's instruction set generally requires conversion for external use, such as for printing and display. Different types of processors may have different internal representations of numerical values and different conventions are used for integer and real numbers. Most calculations are carried out with number formats that fit into a processor register, but some software systems allow representation of arbitrarily large numbers using multiple words of memory.
A ternary numeral system has three as its base. Analogous to a bit, a ternary digit is a trit. One trit is equivalent to log2 3 bits of information.
A binary number is a number expressed in the 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 also refer to a rational number that has a finite representation in the binary numeral system, that is, the quotient of an integer by a power of two.
A numerical digit or numeral is a single symbol used alone, or in combinations, to represent numbers in positional notation, such as the common base 10. The name "digit" originates from the Latin digiti meaning fingers.
The IEEE Standard for Floating-Point Arithmetic is a technical standard for floating-point arithmetic originally established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found in the diverse floating-point implementations that made them difficult to use reliably and portably. Many hardware floating-point units use the IEEE 754 standard.
Excess-3, 3-excess or 10-excess-3 binary code, shifted binary or Stibitz code is a self-complementary binary-coded decimal (BCD) code and numeral system. It is a biased representation. Excess-3 code was used on some older computers as well as in cash registers and hand-held portable electronic calculators of the 1970s, among other uses.
The Intel BCD opcodes are a set of six x86 instructions that operate with binary-coded decimal numbers. The radix used for the representation of numbers in the x86 processors is 2. This is called a binary numeral system. However, the x86 processors do have limited support for the decimal numeral system.
Chen–Ho encoding is a memory-efficient alternate system of binary encoding for decimal digits.
Densely packed decimal (DPD) is an efficient method for binary encoding decimal digits.
Decimal floating-point (DFP) arithmetic refers to both a representation and operations on decimal floating-point numbers. Working directly with decimal (base-10) fractions can avoid the rounding errors that otherwise typically occur when converting between decimal fractions and binary (base-2) fractions.
A decimal computer is a computer that can represent numbers and addresses in decimal and that provides instructions to operate on those numbers and addresses directly in decimal, without conversion to a pure binary representation. Some also had a variable wordlength, which enabled operations on numbers with a large number of digits.
In computing, decimal32 is a decimal floating-point computer numbering format that occupies 4 bytes (32 bits) in computer memory. Like the binary16 and binary32 formats, it is intended for memory saving storage.
In computing, decimal64 is a decimal floating-point computer numbering format that occupies 8 bytes in computer memory. It is intended for applications where it is requested to come near to schoolhouse math. In contrast to the binaryxxx datatypes the decimalxxx datatypes provide exact calculations also with decimal fractions and 'nearest, ties away from zero' rounding, in some range, to some precision, to some degree.
In computing, decimal128 is a decimal floating-point number format that occupies 128 bits in memory. Formally introduced in IEEE 754-2008.It is intended for applications where it is requested to come near to schoolhouse math. In contrast to the binaryxxx datatypes the decimalxxx datatypes provide exact calculations also with decimal fractions and 'nearest, ties away from zero' rounding, in some range, to some precision, to some degree.
BCD, also called alphanumeric BCD, alphameric BCD, BCD Interchange Code, or BCDIC, is a family of representations of numerals, uppercase Latin letters, and some special and control characters as six-bit character codes.