Physics Wallah

Binary Formula: Types of Numbers, Examples, Calculation

Explore binary formulas, their basics, and practical uses in mathematics and computer science. Adding binary numbers follows a slightly different process compared to standard addition.
authorImageRanvijay Singh27 Sept, 2023
Share

Share

Binary Formula

The binary number system is a numerical system with a base of 2, utilizing only two digits, "0" and "1." It belongs to a group of four different number systems and is predominantly employed in programming languages like Java and C++. The term "binary" derives from the prefix "bi," which signifies "two." Examples of binary numbers include (11)₂, (1110)₂, (10101)₂, and so forth. In this context, the subscript "2" denotes the radix of the binary number, and each individual digit is referred to as a "bit." Binary numbers can be converted into three other number systems: the decimal number system, the octal number system, and the hexadecimal number system. In this article, we explore arithmetic operations involving binary numbers and provide formulas for converting binary numbers into these three alternate number systems.

Binary Formula

To grasp the workings of the binary number system, it's essential to delve into its operations. Binary numbers find widespread application in electronic circuits, especially in the implementation of logic gates, and are crucial in the realm of microcontrollers for logical computations. In the binary number system, only two digits, "0" and "1," are employed, with each individual digit referred to as a "bit." When data is input into a computer, it is initially converted into binary language using assigned ASCII codes. Subsequently, this binary language is transformed back into a user-friendly language for output presentation.

Arithmetic Operation on Binary Numbers

Binary Addition

Adding binary numbers follows a slightly different process compared to standard addition, but it's straightforward. When adding two binary numbers, the addition must be carried out digit by digit. The result of adding two binary numbers is also a binary number. Refer to the table below for a clear illustration of binary number addition.

Binary number 1 Binary number 2 Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

Binary Subtraction

Subtracting binary numbers involves a digit-by-digit subtraction process. Unlike binary addition, there's no carry involved in binary subtraction. Instead, when subtracting a larger digit from a smaller digit, we require a borrow. To gain a clear understanding of binary number subtraction, please refer to the table provided below.

Binary number 1 Binary number 2 Difference Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0

Binary Multiplication

Binary multiplication closely resembles the multiplication of standard numbers. To grasp binary number multiplication, refer to the table below for a clear illustration.

Binary number 1 Binary number 2 Multiplication
0 0 0
0 1 0
1 0 0
1 1 1

Also Check – Arithmetic Progressions Formula

Binary to Decimal Formula

Decimal Number System

The decimal number system is the most commonly used numerical system in our daily lives. It has a base of 10, and it utilizes digits from 0 to 9 to represent numbers. Examples of decimal numbers include (14)₁₀, (245)₁₀, (1456)₁₀, and so forth. To convert a binary number "an-1...a₃a₂a₁a₀" into a decimal number, you can multiply each digit of the binary number by the corresponding powers of 2.

If you have a binary number with n-digits represented as B = an-1...a₃a₂a₁a₀, you can convert it into a decimal number D using the following formula:

D = (an-1 × 2^(n-1)) + ... + (a₃ × 2^3) + (a₂ × 2^2) + (a₁ × 2^1) + (a₀ × 2^0).

This formula calculates the decimal equivalent of the binary number by considering each digit's position and its contribution to the overall value in base 10.

Decimal Number Binary number Decimal Number Binary number
1 001 11 1011
2 010 12 1100
3 011 13 1101
4 100 14 1110
5 101 15 1111
6 110 16 10000
7 111 17 10001
8 1000 18 10010
9 1001 19 10011
10 1010 20 10100

Example: Convert the binary number (1101011)₂ to its decimal equivalent.

Solution:

Given binary number: (1101011)₂.

To convert it to decimal:

(1101011)₂ = (1 × 2^6) + (1 × 2^5) + (0 × 2^4) + (1 × 2^3) + (0 × 2^2) + (1 × 2^1) + (1 × 2^0)

= 64 + 32 + 0 + 8 + 0 + 2 + 1 = 107

Decimal to Binary Formula

Hence, the binary number (1101011)₂ is equivalent to the decimal number (107)₁₀.

To convert a decimal number into binary, you can use a method that involves dividing the given decimal number by 2 repeatedly until you reach a quotient of 1. Then, write down the remainders obtained from each division in reverse order, from bottom to top. This process yields the binary representation of the decimal number.

Also Check – Quadratic Equations Formula

Binary to Octal Formula

The octal number system is a numerical system with a base of 8, utilizing digits from 0 to 7 to represent numbers. It was initially used in the early stages of computer programming languages. In the octal system, after reaching the digit 7, the numbers continue with 10 through 17, then 20 through 27, and so on. Notably, octal numbers do not contain digits such as 8 and 9.

There are two primary methods for converting a binary number into an octal number:

Direct Conversion: This method involves directly converting the binary number into octal without an intermediate step through decimal.

Binary to Decimal to Octal Conversion: In this approach, you first convert the binary number into decimal and then convert the obtained decimal number into octal.

Both methods are used to obtain the octal representation of binary numbers, offering flexibility in different scenarios.

Binary number Octal Number Binary number Octal Number
000 0 1000 10
001 1 1001 11
010 2 1010 12
011 3 1011 13
100 4 1100 14
101 5 1101 15
110 6 1110 16
111 7 1111 17

For example, convert (10110110)2 to octal.

Solution:

Method 1:

Step 1: Begin by dividing the given binary number into groups of three digits, starting from the right end.

10-110-110

Step 2: If the first group does not have three digits, pad it with zeros on the left. Then, assign the corresponding octal values to each group.

010-110-110

(010)₂ = (2)₈

(110)₂ = (6)₈

(110)₂ = (6)₈

Step 3: Finally, combine all the obtained octal digits.

010-110-110 = 2-6-6 = 266

Hence, the binary number (10110110)₂ is equivalent to the octal number (266)₈.

Also Check – Rational Number Formula

Binary to Hexadecimal Formula

Hexadecimal Number System

The hexadecimal number system is a numerical system with a base of 16, utilizing digits from 0 to 9 and alphabets from A to F. In this system, the alphabets A to F represent the decimal numbers 10 to 15. Examples of hexadecimal numbers include AF₁₆, 7BF, B2A1, and so on.

There are two primary methods for converting a binary number into a hexadecimal number:

Direct Conversion: This method involves directly converting the binary number into hexadecimal without an intermediate step through decimal.

Binary to Decimal to Hexadecimal Conversion: In this approach, you first convert the binary number into decimal and then convert the obtained decimal number into hexadecimal.

Both methods are used to obtain the hexadecimal representation of binary numbers, offering flexibility in different scenarios.

Decimal number Binary number Hexadecimal Number Decimal number Binary number Hexadecimal number
0 0000 0 8 1000 8
1 0001 1 9 1001 9
2 0010 2 10 1010 A
3 0011 3 11 1011 B
4 0100 4 12 1100 C
5 0101 5 13 1101 D
6 0110 6 14 1110 E
7 0111 7 15 1111 F

For instance, let's convert the binary number (1101010)₂ to hexadecimal.

Solution:

Method 1:

Step 1: Commencing from the right end, group the given binary number into sets of four digits.

1101010 ⇒ 110-1010

Step 2: If the first group lacks four digits, add zeros to the left. Then, assign the corresponding hexadecimal values to each group.

110-1010 ⇒ 0110-1010

(0110)₂ = (6)₁₆

(1010)₂ = (A)₁₆

Step 3: Finally, combine all the digits.

0110-1010 = 6 – A = (6A)₁₆

Consequently, the binary number (1101010)₂, when expressed in the hexadecimal system, is equivalent to (6A)₁₆.

Example 2: Let's convert the binary number (110010101)₂ to octal.

Solution:

To convert this binary number into octal, we begin by dividing the given binary number into sets of three digits, starting from the right end. Then, we assign the corresponding octal value to each group.

110010101 ⇒ 110 – 010 – 101

(110)₂ = (6)₈

(010)₂ = (2)₈

(101)₂ = (5)₈

Finally, we combine these octal digits:

6 – 2 – 5 = 625

As a result, the binary number (110010101)₂, when expressed in the octal system, is equivalent to (625)₈.

Binary Formula FAQs

Q1. Define a binary number system.

Ans. A binary number system is a system of numbers that has a base of 2 and uses only two digits, “0 and 1”. It is one of the four types of number systems and is most commonly employed by computer languages like Java and C++. “Bi” in the word “binary” stands for “two.” Some examples of binary numbers are (11)2, (1110)2, (10101)2, and so on.

Q2. What is a formula to convert a binary number into a decimal number?

Ans. To convert a binary number “an-1….a3a2a1a0“, multiply every digit of the given binary number with the powers of 2. If the binary number with n-digits is B = an-1….a3a2a1a0, Now the decimal number is D = (an-1 × 2n-1) +…+(a3 × 23) + (a2 × 22) + (a1 × 21) + (a0 × 20).

Q3. What is the formula to convert a binary number into a hexadecimal number?

Ans. We have two types of methods to convert a binary number into a hexadecimal number, i.e., by converting binary to hexadecimal directly, and the other one is converting binary to decimal, and then converting the obtained decimal into hexadecimal. To convert the binary number into hexadecimal, we first have to divide the given binary number into a pair of four digits, starting from the right end. Now, substitute the value of the hexadecimal number into it.

Q4. What is the formula to convert a binary number into an octal number?

Ans. We have two types of methods to convert a binary number into an octal number, i.e., by converting binary to octal directly, and the other one is converting binary to decimal, and then converting the obtained decimal into octal. To convert the binary number into octal, first, we have to divide the given binary number into a pair of three digits, starting from the right end. Now, substitute the value of the octal number into it.

Q5. What is the formula to convert a decimal number into a binary number?

Ans. A decimal number can be converted into a binary number by dividing the given number by 2 continuously till we get the quotient as 1 and write the numbers from downwards to upwards.
Join 15 Million students on the app today!
Point IconLive & recorded classes available at ease
Point IconDashboard for progress tracking
Point IconMillions of practice questions at your fingertips
Download ButtonDownload Button
Banner Image
Banner Image
Free Learning Resources
Know about Physics Wallah
Physics Wallah is an Indian edtech platform that provides accessible & comprehensive learning experiences to students from Class 6th to postgraduate level. We also provide extensive NCERT solutions, sample paper, NEET, JEE Mains, BITSAT previous year papers & more such resources to students. Physics Wallah also caters to over 3.5 million registered students and over 78 lakh+ Youtube subscribers with 4.8 rating on its app.
We Stand Out because
We provide students with intensive courses with India’s qualified & experienced faculties & mentors. PW strives to make the learning experience comprehensive and accessible for students of all sections of society. We believe in empowering every single student who couldn't dream of a good career in engineering and medical field earlier.
Our Key Focus Areas
Physics Wallah's main focus is to make the learning experience as economical as possible for all students. With our affordable courses like Lakshya, Udaan and Arjuna and many others, we have been able to provide a platform for lakhs of aspirants. From providing Chemistry, Maths, Physics formula to giving e-books of eminent authors like RD Sharma, RS Aggarwal and Lakhmir Singh, PW focuses on every single student's need for preparation.
What Makes Us Different
Physics Wallah strives to develop a comprehensive pedagogical structure for students, where they get a state-of-the-art learning experience with study material and resources. Apart from catering students preparing for JEE Mains and NEET, PW also provides study material for each state board like Uttar Pradesh, Bihar, and others

Copyright © 2025 Physicswallah Limited All rights reserved.