Binary system
Overview
The binary system, also known as the base-2 number system, is a method of representing numbers that counts by using combinations of only two numerals: zero (0) and one (1). This system is fundamental to digital circuits, computer programming, and data structure.
History
The concept of binary numbers dates back to ancient times, but the modern binary number system was fully documented by Leibniz in the 17th century, who was influenced by the I Ching - a Chinese text which used a binary system for divination.
Binary Arithmetic
Binary arithmetic follows the same rules as the arithmetic in any other number system. The only difference is that the base 2 number system only uses two digits, compared to the decimal system (base 10) which uses 10 digits.
Addition
Binary addition works similarly to its decimal counterpart. When the sum of binary numbers exceeds 1, the result is adjusted by carrying the excess amount onto the next left column.
Subtraction
Binary subtraction can be viewed as an extension of the binary addition. The subtractive property is used, which requires the addition of the additive inverse.
Multiplication
Binary multiplication is similar to decimal multiplication. The only significant difference is that only the digits 0 and 1 need to be considered in binary multiplication.
Division
Binary division is again similar to its decimal equivalent. The division process is carried out and the remainder is expressed as a binary fraction.
Binary and Computers
Binary code is used in computer and digital systems. It can represent any number or letter that a computer can use. The binary system is used internally by almost all modern computers and computer-based devices because it is straightforward to implement with digital electronic circuitry using logic gates. The logic gates are the simplest building block of a digital circuit.
Binary Code
A binary code represents text, instructions, or other data using the binary system. The most common binary code, the ASCII code, includes definitions for 128 characters and is used in almost all modern computing systems.
Binary and Logic Gates
Logic gates are the building blocks of digital circuits. They work on the principle of binary inputs to give a binary output, and are the physical implementation of the boolean algebra system.
Binary and Mathematics
Binary numbers have many uses in mathematics. In particular, they are used in the creation and solving of binary puzzles, in certain parts of set theory, and in the development of binary trees.
Binary Puzzles
Binary puzzles are a type of puzzle where the solution is a binary number. These puzzles are a popular pastime in some cultures.
Binary and Set Theory
In set theory, binary numbers can be used to represent sets. This is done by assigning a binary digit to each member of the set, where the presence or absence of a member is indicated by a 1 or 0 respectively.
Binary Trees
In computer science, a binary tree is a tree data structure in which each node has at most two children, referred to as the left child and the right child. This concept is used in algorithms and data structures.