DECIMAL AND BINARY 

Binary numbers are composed of only 0 and 1, whereas, decimal numbers are composed of digits from 0 to 9.




What is a Binary Number System?

Binary Number System: According to digital electronics and mathematics, a binary number is defined as a number that is expressed in the binary system or base 2 numeral system. It describes numeric values by two separate symbols; 1 (one) and 0 (zero). The base-2 system is the positional notation with 2 as a radix.

The binary system is applied internally by almost all latest computers and computer-based devices because of its direct implementation in electronic circuits using logic gates. Every digit is referred to as a bit

Example: Convert 4 in binary.

Solution: 

4 in binary is (100)2.

Here, 4 is represented in the decimal number system, where we can represent the number using the digits from 0-9. However, in a binary number system, we use only two digits, such as 0 and 1.

Now, let’s discuss how to convert 4 in binary number system. The following steps help to convert 4 in binary.

Step 1: First, divide the number 4 by 2. Use the integer quotient obtained in this step as the dividend for the next step. Continue this step, until the quotient becomes 0.

Dividend

Remainder

4/2 = 2

0

2/2 = 1

0

1/2 = 0

1

Step 2: Now, write the remainder in reverse chronological order. (i.e from bottom to top).

Here, the Least Significant Bit (LSB) is 0 and the Most Significant Bit (MSB) is 1.

Hence, the decimal number 4 in binary is 1002

So, if we want to find how many bits does 4 in binary have? we have to count the number of zeros and ones. 

So, 4 in binary is 1002. Here, there are 2 zeroes and 1 one. Hence, we have 3 bits.

Therefore, the number of bits does 4 in binary have is 3. 


Binary Numbers Table

Some of the binary notations of lists of decimal numbers from 1 to 30,  are mentioned in the below list.

Number Binary Number Number Binary Number Number Binary Number
1 1 11 1011 21 10101
2 10 12 1100 22 10110
3 11 13 1101 23 10111
4 100 14 1110 24 11000
5 101 15 1111 25 11001
6 110 16 10000 26 11010
7 111 17 10001 27 11011
8 1000 18 10010 28 11100
9 1001 19 10011 29 11101
10 1010 20 10100 30 11110

How to Calculate Binary Numbers

For example, the number to be operated is 1235.

Thousands Hundreds Tens Ones
1 2 3 5

This indicates,

1235 = 1 × 1000 + 2 × 100 + 3 × 10 + 5 × 1

Given,

1000 = 103 = 10 × 10 × 10
100 = 102 = 10 × 10
10 = 101 = 10
1 = 100 (any value to the exponent zero is one)

The above table can be described as,

Thousands Hundreds Tens Ones
103 102 101 100
1 2 3 5

Hence,

1235 = 1 × 1000 + 2 × 100 + 3 × 10 + 5 × 1

= 1 × 103 + 2 × 102 + 3 × 101 + 5 × 100

The decimal number system operates in base 10, wherein the digits 0-9 represent numbers. In binary system operates in base 2 and the digits 0-1 represent numbers, and the base is known as radix. Put differently, and the above table can also be shown in the following manner.

Thousands Hundreds Tens Ones
Decimal 103 102 101 100
Binary 23 22 21 20

We place the digits in columns 100, 101 and so on in base 10. When there is a need to put a value higher than 9 in the form of 10(n+1) for instance, to add 10 to column 100, you need to add 1 to the column 101.

We place the digits in columns 20, 21 and so on in base 2. To place a value that is higher than 1 in 2n, you need to add 2(n+1). For instance, to add 3 to column 20, you need to add 1 to column 21.

Position in Binary Number System

In the Binary system, we have ones, twos, fours etc…

For example 1011.110

It is shown like this:

1 × 8 + 0 × 4 + 1 × 2 + 1 + 1 × ½ + 1 × ¼ + 0 × 1⁄8

= 11.75 in Decimal

To show the values greater than or less than one, the numbers can be placed to the left or right of the point.

For 10.1, 10 is a whole number on the left side of the decimal, and as we move more left, the number place gets bigger (Twice).

The first digit on the right is always Halves ½ and as we move more right, the number gets smaller (half as big).

In the example given above:

  • “10” shows ‘2’ in decimal.
  • “.1” shows ‘half’.
  • So, “10.1” in binary is 2.5 in decimal.


Binary Arithmetic Operations

Like we perform the arithmetic operations in numerals, in the same way, we can perform addition, subtraction, multiplication and division operations on Binary numbers. Let us learn them one by one.


Binary Addition

Adding two binary numbers will give us a binary number itself. It is the simplest method. Addition of two single-digit binary number is given in the table below.

Binary Numbers Addition
0 0 0
0 1 1
1 0 1
1 1 0; Carry →1

Let us take an example of two binary numbers and add them.

For example: Add 11012 and 10012.
Solution: Binary Addition

Binary Subtraction

Subtracting two binary numbers will give us a binary number itself. It is also a straightforward method. Subtraction of two single-digit binary number is given in the table below.

Binary Numbers Subtraction
0 0 0
0 1 1; Borrow 1
1 0 1
1 1 0

Let us take an example of two binary numbers and subtract them.

Example: Subtract 11012, and 10102.

Solution: 1101– 10102 = 00112

Binary Multiplication

The multiplication process is the same for the binary numbers as it is for numerals. Let us understand it with example.

Example: Multiply 11012 and 10102.

Solution: Binary Multiplication

Binary Division

The binary division is similar to the decimal number division method. We will learn with an example here.

Example: Divide 10102 by 102

Solution: Binary Division

Uses of Binary Number System

Binary numbers are commonly used in computer applications. All the coding and languages in computers such as C, C++, Java, etc. use binary digits 0 and 1 to write a program or encode any digital data. The computer understands only the coded language. Therefore these 2-digit number system is used to represent a set of data or information in discrete bits of information.

Problems and Solutions

Let us practice some of the problems for better understanding:

Question 1: What is binary number 1.1 in decimal?

Solution:

Step 1: 1 on the left-hand side is on the one’s position, so it’s 1.

Step 2: The one on the right-hand side is in halves, so it’s

× ½

Step 3: so, 1.1 = 1.5 in decimal.

Question 2:  Write 10.112 in Decimal?

Solution: 

10.11 =  1 x (2)1 + 0 (2)0 + 1 (½)1  + 1(½)2  

= 2 + 0 + ½ + ½

= 2.75

So, 10.11 is 2.75  in Decimal.

Keep visiting BYJU’S to explore and learn more such Math-related topics in a fun and engaging way.


DECIMAL , BINARY, HEXADECIMAL   TABLE

DecimalBinaryHexadecimal
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010A
111011B
121100C
131101D
141110E
151111F

(1)    Start with the decimal number you want to convert.

(2)    Divide the number by 2 and write down the remainder (either 0 or 1).

(3)    Divide the quotient from step 2 by 2 again and write down the remainder.

(4)     Repeat step 3 until the quotient is 0.

(5)    Write down the remainders from step 2 onwards in reverse order. This will give you the binary representation of the decimal number.

Let's take an example to illustrate this:

Suppose we want to convert the decimal number 25 to binary.

Step 1: Divide 25 by 2, the remainder is 1. Write down 1.

Step 2: Divide the quotient (12) by 2, the remainder is 0. Write down 0.

 Step 3: Divide the quotient (6) by 2, the remainder is 0. Write down 0.

Step 4: Divide the quotient (3) by 2, the remainder is 1. Write down 1.

Step 5: Divide the quotient (1) by 2, the remainder is 1. Write down 1.

Now, if we write down the remainders in reverse order, we get 11001. So, the binary representation of the decimal number 25 is 11001.

Using this trick, you can convert any decimal number to binary easily.



what is the use of desimal and binary in real life?

Beginning of Modern Binary Number System:

Gottfried Leibniz, a German logician and mathematician, is said to be the founder of the modern binary number system. Leibniz got inspiration for binary numbers through an ancient Chinese book or transcript named ?I Ching?. ?I Ching? means ?the book of changes? and it literally changed the approach of Leibniz towards the binary numbers, and he refined the binary number system in such a way that it is still used in modern computer systems.??

The binary number system is based on base 2 as compared to the decimal system which relies on base 10. It only consists of two types of symbols 1 and 0. All the binary numbers are further combinations of these symbols. Binary numbers also found their application in Boolean Algebra defined by a British mathematician George Boole in the middle of the 19th century in his publications.?

The Boolean algebra found its use in the early 20th century when a student from Massachusetts Institute of Technology realized that the Boolean Algebra defines the working of electric circuits through multiple logic states like And, Or, and Not. Since then, Boolean Algebra which is fundamentally based on binary numbers is used in the logical analysis of electrical switches and transistors which are mainly used in computers and smart electric appliances.

Applications of benefits of Binary Number System in Our Daily Life:

There is a variety of applications of binary number systems in our daily life. Some of them are discussed in details below:

The binary number system finds its most common and prominent use in computer systems. The reason for that is the digital encoding, which is the foundation of computer programming and language. The digital encoding used in computers is based on the binary number system or more precisely on two symbols used by the binary system to express various figures.?

The world, these days, relies on visual data instead of written data. Taking the example of imagery, binary numbers or bits are used to encode images. A dedicated binary line for every single pixel is used to encode an image. For example, if an image is being displayed on a screen using a 16-bit code, the pixel would be provided with instructions in terms of 1s and 0s regarding which color would be shown by the pixel. Based on this figure, we can expect the outcome of more than 65 thousand colors, according to the figure 2^16.?

Another application of binary numbers on the computer is when computers make calculations. Machines add numbers by flipping switches which are controlled by Boolean algebra. This means the switches could only be in the state of on and off and there is no intermediate state. This increases the reliability of computers and eliminates the chances of any exceptions as there could be no intermediate state.?

Binary numbers are also used in assigning Internet Protocols or IPs. Binary numbers are extensively used in IP addressing system. This system depends upon the binary number system for the generation of IP addresses. There are two types of IPs these days, one type is known as IPv4 while the other one is IPv6. These IPs are further divided into various categories or classes like A, B, and C. Each class holds a different number of hosts and network addresses.?

Another great use of the binary number system is the ASCII (American Standard Code for Information Interchange) code. It is regarded as a method to represent a number of characters used for encoding of text documents on computers. Multiple characters ad symbols used in text like lower-case and upper-case alphabets, numbers, punctuation symbols, and symbols from other languages are represented by 7 bits in the ASCII system. In extended ASCII code, these symbols are represented by 8 bits. For example, if we have to define ?Null? in ASCII code, it would hold a value of 0000000 in the computer.

People who want to learn the binary code may use a binary translator tool for this purpose. They can convert data from binary to English and Binary to ASCII easily with the use of this tool.?

The binary number system is also used to implement circuitry in various smart appliances and computers. The simplicity of this system enables the circuits to stay in definitive situations and give standard outputs on the basis of voltages passing through. For example, in a 5V circuit system, the value of voltage lower than 5 would call for an ?off? state while that of higher value would show ?on? state.?

This would have become a mess if we tried to implement a decimal system in circuitry. As a fact, Charles Babbage attempted to implement the decimal system in computers and had to face failure because of the complexity of this system.???

One of the main benefits of implementing the binary system is the simplicity that comes with it. In case, if we try to implement the decimal system for this purpose, we have to use a considerably higher number of circuits as compared to those being already applied for this purpose. It also eventually allows us to save space and energy. It also aids in efficiency in quicker turn over of computers. (buy modafinil sweden) ?

Conclusion:

The binary number system holds a significant position in our daily life. A number of technologies we go through our everyday life including communication, data transfer and storage, Web, and smart systems all are working with the help of Binary codes. The binary number system is like a lifeline to these systems. So, the Binary number system is really beneficial in our daily.

For those people who want to enhance their knowledge about binary code, the binary code translator could be a blessing in disguise. They can also use it to convert encoded data from binary to text quickly. We are sure that this article would be helpful for you in knowing about the Binary number system, its uses, and its benefits. ? ? ?