ArticleslgStudy

mathematics

Binary code

Binary code is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Binary code rather than just read about it. In short: A binary code is the value of a data-encoding convention represented in a binary notation that usually is a sequence of 0s and 1s, sometimes called a bit string. For example, ASCII is an 8-bit text encoding that in addition to the human readable form (letters) can be represented as binary.

Binary code — main illustration
Binary code — illustration

Key takeaways

  • Binary code belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Binary code to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Binary code from memory before moving on to harder problems.

Reference excerpt

A binary code is the value of a data-encoding convention represented in a binary notation that usually is a sequence of 0s and 1s, sometimes called a bit string. For example, ASCII is an 8-bit text encoding that in addition to the human readable form (letters) can be represented as binary. Binary code can also refer to the mass noun code that is not human readable in nature such as machine code and bytecode. Even though all modern computer data is binary in nature, and therefore can be represented as binary, other numerical bases may be used. Power of 2 bases (including hex and octal) 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 as image data is sometimes represented as hex, but rarely as decimal.

History

Invention 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. 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 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 he admired. Leibniz saw the hexagrams as an affirmation of the universality of his own religious belief. After Leibniz's 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. 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 people 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 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 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. 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.

Timeline 1875: Émile Baudot "Addition of binary strings in his ciphering system," which, eventually, led to the ASCII of today. 1884: The Linotype machine 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 1936: Alan Turing's paper "On Computable Numbers" describes a process for automatic computing machines that are able to scan and understand binary code 1937: Alan Turing electro-mechanical binary multiplier 1937: George Stibitz "excess three" code in the Complex Computer 1937: Atanasoff–Berry Computer 1938: Konrad Zuse Z1

Rendering

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.

… excerpt ends here. Continue reading the full article.

Illustrations

Binary code: George Boole
George Boole
Binary code: Daoist Bagua
Daoist Bagua
Binary code: An example of a recursive binary space partitioning quadtree for a 2D index
An example of a recursive binary space partitioning quadtree for a 2D index

Worked examples

Example 1 — a first encounter with Binary code

Start with the simplest possible case. Write down what Binary code claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Binary code before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Binary code ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Binary code

In research
Binary code appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Binary code in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Binary code is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2 (number), Computer data, Encodings, so understanding it makes those chapters shorter.
In everyday life
Look for Binary code outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Binary code” →

How to study Binary code in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Binary code means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Binary code out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Binary code in simple terms?

A binary code is the value of a data-encoding convention represented in a binary notation that usually is a sequence of 0s and 1s, sometimes called a bit string. For example, ASCII is an 8-bit text encoding that in addition to the human readable form (letters) can be represented as binary.

Why does Binary code matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Binary code?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Binary code.

Tags

  • 2 (number)
  • Computer data
  • Encodings
  • English inventions
  • Gottfried Wilhelm Leibniz

Keep exploring