The Binary System

The binary system is the most important aspect of computing. You want to know why? Keep reading the rest of the post. Number System in Computer 

What you will learn here: All about the concept and meaning of the binary system, numbering systems and much more!

Computers work with an incredible system, called  a binary system , which uses only two values ​​to manipulate any type of information. While it sounds simple, it can be a bit complex to understand it the first time.

These two values, “1” and “0” represent all the operations that the computer does, from allowing you to write simple text to playing 3D games.

We recommend you read What is the ASCII Code? Character Table

But how is that possible? How is it that the computer manages to operate with all its processes using only the digits?

How does it work in practice? Could it be that inside a processor or on a hard disk we will literally see a row of “0” and “1”?

All these answers you will have in the next post where it is precisely the magic of binary systems.

What are binary numbers? Number System in Computer 

Most know that  the most widely used system in the world to represent numbers is the decimal system . This is also known as base 10, and uses ten digits, from 0 to 9, for all operations carried out with the system.

For this system, each space within a number corresponds to a power of 10. A little more technically it can be said that  the decimal numbering system is a positional type numbering system .

In other words, the quantities are symbolized using the powers of the number ten as the arithmetic base.

However, the decimal numbering system is not the only numbering system out there that you can implement. In this sense you also have the so-called  binary system, also known as Base-2,  which uses only the digits 0 and 1.

In this type of numbering, each number corresponds to a power of 2.

If you want to know more about numbering systems, such as the hexadecimal system, in this link you will find excellent information.

This characteristic makes the binary system the best tool for use in all types of digital operations.

For this reason it is the basis of all technological devices that exist today, or at least use digital electronic circuits.

The binary system, by using only two digits, or binary digits as they are called in this case, offers only two possible states,  “0”  or  “1”.  In this case, the state  “0”  represents for example the state  “Off”  and the state  “1”  represents  “On”.

Of course, they do not always represent these states, they may be others.

In this sense, you know that binary operations can be carried out with a very simple set of rules. This allows you to do an infinite number of operations using just a few  logic gates.

For example, to multiply two digits together, the only thing we would need to know is the following rule:

  • 0 x 0 = 0
  • 0 x 1 = 0
  • 1 x 0 = 0
  • 1 x 1 = 1

It should be noted that  the two-value system to represent numbers in binary. It can also be seen that it corresponds to the two truth values ​​that are used in  symbolic logic.

Now, consider the following truth tables using the logical operator “AND:”

  • F AND F = F
  • F AND T = F
  • T AND F = F
  • T AND T = T

For example, if you replace  “F”  by  “0”  and  “T”  by  “1”, it  is clear that the logical operator “AND” is equivalent to  the multiplication sign in the binary arithmetic system.

Of course, all other mathematical operations can also be exchanged for logical operations.

Since the  logical operators  are really easy to represent in the development of computer circuits, it is possible to build a device that is capable of carrying out arithmetic operations.

This is the so-called  “Boolean algebra”, developed by the British George Boole, as we will see later.

What is the binary system? Number System in Computer 

In general, a definition of a binary system could be “ a system that uses only two values ​​to represent its amounts”.  It is a Base 2 system. This is the natural numbering system of computers and digital devices.

Those two values ​​are “0” and “1”. From that we can conclude that for  “0”  it has been disconnected, or there is no signal, and for  “1” it  is connected or has a signal.

The system you use daily is the Base 10 system , also called the decimal base.  That system uses the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.

In computers  these zeroes “0” and one “1” are called binary digits or just “bit” , which is a conjunction of two words in the English language: “binary digit”.

Bit could be considered to  be the smallest unit of information in computers . In this way, it is the same to say digit “0” and digit “1”, or, bit “0” and bit “1”.

How the binary system works Number System in Computer 

It is the bits that form any information, however, a single bit does nothing, it is just a signal. So that the bits can really form information, such as the representation of texts, they need to be grouped, put together. Those groups can be 8, 16, 32 or 64 bits.

8 bits

10100110

Despite seeming to be a limited system, by grouping bits it is possible to make an infinite number of representations. Let’s take as an example a group of 8 bits where it is possible to make the following representations for decimal numbers:

Alphanumeric characters and their binary equivalents Number System in Computer 

Decimal Numbers> Binary Code

  • 0> 00000000
  • 1> 00000001
  • 2> 00000010
  • 3> 00000011
  • 4> 00000100
  • 5> 00000101
  • 6> 00000110
  • 7> 00000111
  • 8> 00001000
  • 9> 00001001
  • 10> 00001010
  • 11> 00001011
  • 12> 00001100
  • 13> 00001101
  • 14> 00001110

Decimal numbers are represented in groups of eight bits. But, as in the decimal system,  everything to the left of the binary digits is worth nothing.

For example: decimal 14 is 1110 in binary, or 00001110 or 000000001110 or also 0000000000001110.

What is the difference between Free Software and Semilibre Software

The computer gathers predefined groups of bits (8, 16, 32 or 64) to form a piece of information, that is, a character. A character is any letter, number, or symbol.

10100110 transformed to 8 bits = any character

What is 1 + 1?

Well, everyone should answer “2”.

But, it was not specified in what base (decimal or binary). If it is decimal the result is 2. And if it were in the binary system the result would be 10.

History of the binary system Number System in Computer 

There is no doubt that the  binary numbering system  is an indispensable tool for the development of technology. Contrary to what many people think, the binary system has been developing for centuries.

This system is used in countless applications, both hardware and software, and is present in many more scenarios than you might imagine.

As mentioned, few know that  the binary numbering system  is not a modern invention, and that it has a rich history that is very interesting to know. To know it, you can continue reading the next paragraphs.

One of the first known descriptions of a  binary numbering system  dates from the 3rd century AD, and is those mentioned by the Hindu mathematician Pingala. Also very old are the series of 8 trigrams and 64 hexagrams, analogous to 3-bit and 6-bit binary numbers.

The latter known in ancient China thanks to the classical texts contained in the I Ching.

Other systems of ancient binary combinations come from Africa, where they were used for divination in traditional rituals such as Ifá. Also in the West, hand in hand with geomancy in medieval times.

However, the first very detailed descriptions on the subject occur at the beginning of the seventeenth century, precisely in 1605. That year Francis Bacon made reference to a system by which the letters of our alphabet could be reduced to  sequences of binary digits .

These could then be encoded as practically invisible variations in the content of any text.

Despite all these investigations, the one who finally developed and explained the modern binary system was Gottfried Leibniz, a German philosopher and mathematician.

These concepts were developed in the seventeenth century in an article called  “Explication de l’Arithmétique Binaire”, where he mentions the binary symbols used by Chinese mathematicians. However, it uses the numbers “0” and “1”, in the same way that it is used today in the modern binary numbering system. A true pioneer!

George Boole, the father of Boolean algebra Number System in Computer 

But who would have the last word in this matter of the binary numbering system would be the aforementioned George Boole. Boole published an article in 1854 that would forever mark how this subject was dealt with.

In this article Boole detailed a system of logic that over time would be the basis for the development of all the technology that is available today,  Boolean Algebra,  also known as Boolean algebra.

Others who were also part of this story, and without whom perhaps modern computing would not be as you know it were:

  • Francis Bacon with his binary code to send secrets  “Omnia per omnia”
  • Joseph Marie Jacquard with his punch card based machine control system
  • Emile Baudot and his cyclic permutation code
  • Claude Shannon, remembered as the “Father of Information Theory.”

Practical application of the binary system

At the electronics level,  bits 0 and 1 are represented by voltage values. For example: bit 0 can be represented by values ​​between 0 and 0.3 volts.

And  bit 1 can be represented by values ​​between 2 and 5 volts.  Those numbers are just examples, we are not claiming that they are exactly those values.

In this way, any value can be used to represent the bits, depending on the application and the technology used.

With the advancement of computer technology, lower and lower voltages began to be used, this means that electronic devices began to work with lower voltages.

Very low values ​​are used in computers, such as those just mentioned.

For example, in optical devices such as CD, DVD and BluRay, information is stored in the form of small dots called “Pits” and a space between them called “Lands”. These are interpreted in the reading process as “0” and “1” (bits).

The binary system in the Digital Age

In your everyday environment it is common to hear phrases of the  type digital era  or digital systems or also digital TV. But  what is something digital?  Digital is everything that can be transmitted and / or stored by means of bits.

A digital device is one that uses bits to manipulate any type of information, that is, data.

Operations with binary numbers

As with any other number system,  with binary numbers you can also carry out the differences mathematical operations.  Of course, for this, at least you must know exactly what binary numbers are, how the binary system works and what the binary language is.

The binary system at this point is essential to be able to solve binary addition, subtraction, multiplication or division.

In this sense,  knowing basic binary calculations  is essential for the analysis and design of digital systems, especially if at some point you plan to study programming or some other profession related to computing.

It should be noted that the  binary operations that can be performed with binary numbers  are exactly the same as in the decimal system, that is, there are addition, subtraction, multiplication and division.

Sum of binary numbers

The possible combinations when adding two bits are the following:

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 10

An example with more figures would be the following:

100110101

+

11010101

———————————

1000001010

In these cases, it operates in the same way as in the  decimal system , that is, it begins to add from the right, in the case of our example,  “1 + 1 = 10”,  and then insert  “0”  in the row of the result and takes “1”. This operation is known as  “drag”.

After that, the carry is added to the next column to the next position:  “1 + 0 + 0 = 1”,  and it continues until all the columns are finished, in the same way that we would do it in the decimal system.

Subtraction of binary numbers

The algorithm used in  subtraction in the binary system  is the same as that used in the decimal system. However, in this case it is always convenient to observe the procedure of the decimal subtraction operation to understand the binary operation, which is simpler.

0 – 0 = 0

1 – 0 = 1

  1. – 1 = 0

0 – 1 = “*”

“*” In this case, the next one is borrowed.

The subtraction  “0 – 1”  can be solved in the same way as it is done in the decimal system, that is, by borrowing a unit from the following operation:  “10 – 1 = 1”  and taking 1, which is equivalent to the operation  “2 – 1 = 1”  in the decimal system.

It should be said that the borrowed number must be returned, adding it, to the position that follows.

Let’s see some examples:

We subtract 17 – 10 = 7 (2 = 345)

10001

-01010

——————

01111

We subtract 217 – 171 = 46 (3 = 690)

11011001

-10101011

—————————

00101110

Multiplication of Binary Numbers

The algorithm for the product in binary is the same as that used in multiplication with decimal numbers; although it is done more simply, since multiplying  “0” by any number gives the result  “0”,  where  “1”  is the neutral element of the product.

  • 0 x 0 = 0
  • 0 x 1 = 0
  • 1 x 0 = 0
  • 1 x 1 = 1

As a practical example, we are going to carry out the following multiplication in the binary system.

10110

x 1001

———————

10110

00000

00000

10110

—————————

11000110

If you are interested in the  development of electronic systems , then you should know that this is not the type of operations carried out in this area, but rather the so-called  “Booth’s Algorithm” is used.

Division of binary numbers

The  division in the binary system  divides the number as in the decimal system, except that there is a difference: when carrying out the subtractions within the division, they must be done in binary.

To give a practical example of this, we are going to divide 100010010 (274) by 1101 (13):

100010010 | 1101

——————

– 0000 010101

———————

10001

– 1101

———————

01000

– 0000

———————

10,000

– 1101

———————

00111

– 0000

———————

01110

– 1101

———————

00001

Converting binary numbers to decimal and decimal to binary

Many have significant doubts regarding the  translation of decimal numbers to binary,  or vice versa. IF this is the case, from this point on, you will find the different ways to carry out this task without problems and in the simplest way possible.

In this sense, you have two options available: find a  calculator from decimal to binary or from binary or decimal online,  or carry out the conversion of these numbers on your own, doing the necessary calculations.

If you go for the second option, from this point on you will have all the necessary operations available to  convert a decimal number to binary or from binary to decimal.

It should be noted that you also have the operations available in the reverse order, that is, convert hexadecimal to binary and from binary to hexadecimal.

Binary to Decimal Conversion

In decimal system, the figures that make up a number are the quantities that are multiplying to the different powers of ten, for example 10, 100, 1000 or 10000.

For instance:

  • “745 = 7 · 100 + 4 · 10 + 5 · 1”, or similarly “745 = 7 · 102 + 4 · 101 + 5 · 100”

In the binary numbering system, the digits that make up the number multiply to the powers of two, that is, 1, 2, 4, 8, 16, etc.

  • “20 = 1”, “21 = 2”, “22 = 4”, “23 = 8”, “24 = 16”, “25 = 32”, “26 = 64”, etc.

For example, to convert a decimal number to the binary system, we must first start from the right and multiply each digit by the successive powers of 2, moving to the left, as in the following example:

  • 101 102 = 0 1 + 1 2 + 1 4 + 0 8 + 1 16 = 2 + 4 + 16 = 2210
  • 1102 = 0 1 + 1 2 + 1 4 = 2 + 4 = 6 10

Decimal to Binary Conversion Number System in Computer 

To carry out the  conversion of decimal numbers to binary numbers,  you have to divide the decimal number by two and write down the remainder in a column to the right,  “0”  in the case of if the result of the division is even and a 1 in the case that it is odd.

If you want to obtain any number in binary, we will take the last quotient, which will always be “1”, and all that is left of the divisions from bottom to top, in ascending order.

In the following example, the decimal number “7910” will be converted to the binary numbering system  :

  • 79 1 (odd). We divide by two:
  • 39 1 (odd). We divide by two:
  • 19 1 (odd). We divide by two:
  • 9 1 (odd). We divide by two:
  • 4 0 (even). We divide by two:
  • 2 0 (even). We divide by two:
  • 1 1 (odd).
  • Therefore, 7910 = 10011112

Binary to Hexadecimal Conversion

The  conversion between hexadecimal numbers and  binary  is performed basically expanding or contracting each hexadecimal digit to four binary digits.

For example, to express the binary number 1010011100112 in hexadecimal you will only need to take groups of four bits, starting from the right, and replace them with their hexadecimal equivalent:

  • 10102 = A16
  • 01112 = 716
  • 00112 = 316

This then allows us to say that the binary number 1010011100112 converted to hexadecimal results in “A7316”.

In the case that the  binary digits do not form complete groups of four digits,  you must add leading zeros until completing the last group, as in the following example:

  • 1011102 = 001011102 = 2E16

Hexadecimal to Binary Conversion Number System in Computer 

The  conversion of hexadecimal numbers to  binary  is carried out in the same way as the conversion of binary numbers to hexadecimal, that is, by replacing each hexadecimal digit with the four binary bits.

To convert to binary, for example, the hexadecimal number 1F616 you will find the following equivalences:

  • 116 = 00012
  • F16 = 11112
  • 616 = 01102

This then allows us to say that the binary number 1F616 converted to hexadecimal results in “0001111101102”.

Binary Language Number System in Computer 

As you know, the  decimal system  is the way humans have been laying down their knowledge of math, algebra, geometry, and so on for centuries.

However, at present it is not the only numbering system that exists, since it is also possible to  make use of the so-called binary system,  which is only used in the field of software and hardware development, but which has great relevance for our daily life.

This binary system, as its name suggests, makes use of only two digits, specifically  “0”  and  “1”,  which basically indicate the possibility of two states:  “on”  or  “off”.

The best thing about this system, however, is that it allows you to  represent all the numbers in the decimal system. Therefore, the different basic mathematical operations can be carried out, as you can see above in this article.

Just as you can  represent numbers with the binary system,  you can also represent the alphabet. For this you will need a coding scheme, that is, a code that allows you to implement a system of equivalences.

This will allow you to  express a letter of the alphabet using a binary number in a simple way. For this purpose there are multiple standard codes such as  ASCII  and Unicode, which allow you to convert text into binary. number system in computer

Despite its age, the ASCII code is still widely used, although it is being replaced by another standard, the aforementioned  “Unicode”,  which is similar in some respects to ASCII.

However, it offers other advantages such as the number of characters it is capable of representing, more than 110,000, which allows characters from practically all the languages ​​of the world to be included.

In computing, each of the keys on the keyboard, both the numbers and the letters and signs, are  equivalent to a binary number.  For each letter, symbol or control there is a corresponding binary number. An example of this would be the binary number “0100 0001”, which is the equivalent of the letter  “A”.

In this way, it is quite easy to  build a binary language  where each letter is represented by a binary number, thus forming the so-called machine code, used to communicate with the devices and program them.

One Comment

Leave a Reply

Your email address will not be published.

Check Also
Close
Back to top button