Home      Discussion      Topics      Dictionary      Almanac
Signup       Login
Binary code

Binary code

Discussion
Ask a question about 'Binary code'
Start a new discussion about 'Binary code'
Answer questions from other users
Full Discussion Forum
 
Encyclopedia
A binary code is a way of representing text
Plain text
In computing, plain text is the contents of an ordinary sequential file readable as textual material without much processing, usually opposed to formatted text....

 or computer processor instructions by the use of the binary number system's two-binary digits 0 and 1. This is accomplished by assigning a bit string to each particular symbol or instruction. For example, a binary string of eight binary digits (bit
Bit
A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states...

s) can represent any of 256 possible values and can therefore correspond to a variety of different symbols, letters or instructions.

In computing and telecommunication, binary codes are used for any of a variety of methods of encoding data, such as character strings, into bit strings. Those methods may be fixed-width or variable-width
Variable-length code
In coding theory a variable-length code is a code which maps source symbols to a variable number of bits.Variable-length codes can allow sources to be compressed and decompressed with zero error and still be read back symbol by symbol...

. 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
Octal
The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Numerals can be made from binary numerals by grouping consecutive binary digits into groups of three...

, decimal
Decimal
The decimal numeral system has ten as its base. It is the numerical base most widely used by modern civilizations....

 or hexadecimal
Hexadecimal
In mathematics and computer science, hexadecimal is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F to represent values ten to fifteen...

 notation. There are many character sets and many character encoding
Character encoding
A character encoding system consists of a code that pairs each character from a given repertoire with something else, such as a sequence of natural numbers, octets or electrical pulses, in order to facilitate the transmission of data through telecommunication networks or storage of text in...

s for them.

A bit string, interpreted as a binary number, can be translated into a decimal number. For example, the lowercase "a" as represented by the bit string 01100001, can also be represented as the decimal number 97.

History of Binary Code


Binary numbers were first described in Chandashutram written by Pingala
Pingala
Pingala is the traditional name of the author of the ' , the earliest known Sanskrit treatise on prosody.Nothing is known about Piṅgala himself...

 in 100 BC. Binary Code was first introduced by the German mathematician and philosopher Gottfried Wilhelm Leibniz
Gottfried Leibniz
Gottfried Wilhelm Leibniz was a German philosopher and mathematician. He wrote in different languages, primarily in Latin , French and German ....

 during the 17th century. Leibniz was trying to find a system that converts logic’s verbal statements into a pure mathematical one. After his ideas were ignored, he came across a classic Chinese text called ‘I Ching’
I Ching
The I Ching or "Yì Jīng" , also known as the Classic of Changes, Book of Changes and Zhouyi, is one of the oldest of the Chinese classic texts...

 or ‘Book of Changes’, which used a type of 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, Leibiniz had not yet found a use for this system.

Another mathematician and philosopher by the name of George Boole
George Boole
George Boole was an English mathematician and philosopher.As the inventor of Boolean logic—the basis of modern digital computer logic—Boole is regarded in hindsight as a founder of the field of computer science. Boole said,...

 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 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 by the name Claude Shannon noticed that the Boolean algebra he learned was similar to an electric circuit. Shannon wrote his thesis in 1937, 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. 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
The Braille system is a method that is widely used by blind people to read and write, and was the first digital form of writing.Braille was devised in 1825 by Louis Braille, a blind Frenchman. Each Braille character, or cell, is made up of six dot positions, arranged in a rectangle containing two...

 is a type of binary code that is widely used by blind people to read and write. This system consist of 6 dot positions, three in each column. Each dot has two states, raised or not raised.

Ba gua


The ba gua are diagrams used in feng shui
Feng shui
Feng shui ' is a Chinese system of geomancy believed to use the laws of both Heaven and Earth to help one improve life by receiving positive qi. The original designation for the discipline is Kan Yu ....

,
Taoist cosmology
Cosmology
Cosmology is the discipline that deals with the nature of the Universe as a whole. Cosmologists seek to understand the origin, evolution, structure, and ultimate fate of the Universe at large, as well as the natural laws that keep it in order...

 and I Ching
I Ching
The I Ching or "Yì Jīng" , also known as the Classic of Changes, Book of Changes and Zhouyi, is one of the oldest of the Chinese classic texts...

studies. The ba gua consists of 8 trigrams; 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
Yin and yang
In Asian philosophy, the concept of yin yang , which is often referred to in the West as "yin and yang", is used to describe how polar opposites or seemingly contrary forces are interconnected and interdependent in the natural world, and how they give rise to each other in turn. Opposites thus only...

) 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
King Wen sequence
The King Wen sequence is an arrangement of the sixty-four divination figures in 易經 Yì Jīng, the I Ching or Book of Changes. They are called hexagrams in English because each figure is composed of six 爻 yáo—broken or unbroken lines, that represent 陰 yin or 陽 yang respectively.The King Wen sequence...

 of the 64 hexagrams).

Ifá divination


Ifá
Ifá
Ifá refers to the system of divination and the verses of the literary corpus known as the Odú Ifá. Yoruba religion identifies Orunmila as the Grand Priest; as that which revealed Oracle divinity to the world...

is the ancient system of divination and literary corpus of the Yoruba people
Yoruba people
The Yoruba people are one of the largest ethnic groups in West Africa. The majority of the Yoruba speak the Yoruba language...

 of Nigeria
Nigeria
Nigeria , officially the Federal Republic of Nigeria, is a federal constitutional republic comprising 36 states and its Federal Capital Territory, Abuja. The country is located in West Africa and shares land borders with the Republic of Benin in the west, Chad and Cameroon in the east, and Niger in...

. In Yoruba religion, the rite provides a means of communication with spiritual divinity. The Orisa Ifá or Orunmila
Orunmila
In the Yoruba religion, Orunmila is the Yoruba Grand Priest and custodian of Ifá. This source of knowledge is believed to have a keen understanding of the human form and of purity, praised as being often more effective than remedies; his followers and priests are known as Babalawo.- Mythical...

 ("Grand Priest") permits access to an initiated priest, a Babalawo
Babalawo
Babalawo is a Yorùbá chieftaincy title that denotes a Priest of Ifá. Ifa is a divination system that represents the teachings of the Orisha Orunmila, the Spirit of Wisdom, who in turn serves as the oracular representative of God...

 ("father of the secrets") who generates binary values using sacred palm nuts. In wood powder, these are recorded as single and double lines. There are 16 principal Odú that are said to compose the 256 Odú. From memory alone, a Babalawo must be able to recite four to ten verses for each of the 256 Odú Ifá: generally, orisa lore, traditional medicine
Traditional African medicine
Traditional African medicine is a holistic discipline involving indigenous herbalism and African spirituality, typically involving diviners, midwives, and herbalists...

, and ritual advice. In 2005, UNESCO
UNESCO
The United Nations Educational, Scientific and Cultural Organization is a specialized agency of the United Nations...

 listed Ifá in the Masterpieces of the Oral and Intangible Heritage of Humanity
Masterpieces of the Oral and Intangible Heritage of Humanity
The Proclamation of Masterpieces of the Oral and Intangible Heritage of Humanity was made by the Director-General of UNESCO starting in 2001 to raise awareness on intangible cultural heritage and encourage local communities to protect them and the local people who sustain these forms of cultural...

.

ASCII code


The American Standard Code Information Interchange, or ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

, uses a 7 bit binary code to represent text within a computer, communications equipment, and other devices that use text. Each letter or symbol is assigned to a number from 0 to 127. For example, in the 8-bit ASCII code, a lowercase "a" is represented by the bit string 01100001.

Binary-coded Decimal


Binary-coded decimal
Binary-coded decimal
In computing and electronic systems, binary-coded decimal is a digital encoding method for numbers using decimal notation, with each decimal digit represented by its own binary sequence. In BCD, a numeral is usually represented by four bits which, in general, represent the decimal range 0 through 9...

, or 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 the first 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 "Addition of binary strings in his ciphering system," which, eventually, lead to the ASCII of today.
  • 1932: C. E. Wynn-Williams "Scale of Two" counter
  • 1936: Konrad Zuse
    Konrad Zuse
    Konrad Zuse was a German civil engineer and computer pioneer. His greatest achievement was the world's first functional program-controlled Turing-complete computer, the Z3, which became operational in May 1941....

     Z1
    Z1 (computer)
    The Z1 was a mechanical computer designed by Konrad Zuse from 1935 to 1936 and built by him from 1936 to 1938. It was a binary electrically driven mechanical calculator with limited programmability, reading instructions from punched tape....

  • 1937: Alan Turing
    Alan Turing
    Alan Mathison Turing, OBE, FRS , was an English mathematician, logician, cryptanalyst, and computer scientist. He was highly influential in the development of computer science, providing a formalisation of the concepts of "algorithm" and "computation" with the Turing machine, which played a...

     electro-mechanical binary multiplier
  • 1938: Atanasoff-Berry Computer
    Atanasoff-Berry Computer
    The Atanasoff–Berry Computer was the first electronic digital computing device. Conceived in 1937, the machine was not programmable, being designed only to solve systems of linear equations. It was successfully tested in 1942...

  • 1939: George Stibitz
    George Stibitz
    George Robert Stibitz is internationally recognized as one of the fathers of the modern digital computer...

     "excess three" code in the Complex Computer

Current uses of Binary


Besides computers, there are many things that use binary including:
  • CDs, which have a series of hills and valleys on the surface, which either reflect the light of the thin laser shone on them, representing a one, or do not, representing the zero.

Weight of binary codes


The weight of a binary code, as defined in http://www.research.att.com/~njas/codes/Andw/, is the Hamming weight
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 bits, this is the number of 1's in the string...

of the binary words coding for the represented words or sequences.

External links