Summarize this article:
Last updated on August 20, 2025
126 in binary is written as 1111110 because the binary system uses only two digits, 0 and 1, to represent numbers. This number system is widely used in computer systems. In this topic, we are going to learn about the binary system with a focus on the number 126.
The process of converting 126 from decimal to binary involves dividing the number 126 by 2. Here, it is divided by 2 because the binary number system uses only two digits (0 and 1).
The quotient becomes the dividend in the next step, and the process continues until the quotient becomes 0. This is a commonly used method to convert 126 to binary. In the last step, the remainder is noted down bottom side up, and that becomes the converted value.
For example, the remainders noted down after dividing 126 by 2 until getting 0 as the quotient is 1111110. Remember, the remainders here have been written upside down.
In the table shown below, the first column shows the binary digits (1 and 0) as 126.
The second column represents the place values of each digit, and the third column is the value calculation, where the binary digits are multiplied by their corresponding place values.
The results of the third column can be added to cross-check if 1111110 in binary is indeed 126 in the decimal number system.
126 can be converted easily from decimal to binary. The methods mentioned below will help us convert the number. Let’s see how it is done.
Expansion Method: Let us see the step-by-step process of converting 126 using the expansion method.
Step 1 - Figure out the place values: In the binary system, each place value is a power of 2. Therefore, in the first step, we will ascertain the powers of 2. 2^0 = 1 2^1 = 2 2^2 = 4 2^3 = 8 2^4 = 16 2^5 = 32 2^6 = 64 2^7 = 128 Since 128 is greater than 126, we stop at 2^6 = 64.
Step 2 - Identify the largest power of 2: In the previous step, we stopped at 2^6 = 64. This is because, in this step, we have to identify the largest power of 2, which is less than or equal to the given number, 126. Since 2^6 is the number we are looking for, write 1 in the 2^6 place. Now the value of 2^6, which is 64, is subtracted from 126. 126 - 64 = 62.
Step 3 - Identify the next largest power of 2: In this step, we need to find the largest power of 2 that fits into the result of the previous step, 62. So, the next largest power of 2 is 2^5, which is 32. Now, we have to write 1 in the 2^5 place. And then subtract 32 from 62. 62 - 32 = 30.
Step 4 - Continue the process: Identify the next largest power of 2 that fits into the result of the previous step, 30. The next largest power of 2 is 2^4, which is 16. Write 1 in the 2^4 place. Subtract 16 from 30. 30 - 16 = 14.
Step 5 - Continue the process: Identify the next largest power of 2 that fits into the result of the previous step, 14. The next largest power of 2 is 2^3, which is 8. Write 1 in the 2^3 place. Subtract 8 from 14. 14 - 8 = 6.
Step 6 - Continue the process: Identify the next largest power of 2 that fits into the result of the previous step, 6. The next largest power of 2 is 2^2, which is 4. Write 1 in the 2^2 place. Subtract 4 from 6. 6 - 4 = 2.
Step 7 - Continue the process: Identify the next largest power of 2 that fits into the result of the previous step, 2. The next largest power of 2 is 2^1, which is 2. Write 1 in the 2^1 place. Subtract 2 from 2. 2 - 2 = 0. We need to stop the process here since the remainder is 0.
Step 8 - Identify the unused place values: In the previous steps, we wrote 1 in the 2^6, 2^5, 2^4, 2^3, 2^2, and 2^1 places. Now, we can just write 0 in the remaining place, which is 2^0. Now, by substituting the values, we get, 0 in the 2^0 place 1 in the 2^1 place 1 in the 2^2 place 1 in the 2^3 place 1 in the 2^4 place 1 in the 2^5 place 1 in the 2^6 place
Step 9 - Write the values in reverse order: We now write the numbers upside down to represent 126 in binary. Therefore, 1111110 is 126 in binary.
Grouping Method: In this method, we divide the number 126 by 2. Let us see the step-by-step conversion.
Step 1 - Divide the given number 126 by 2. 126 / 2 = 63. Here, 63 is the quotient and 0 is the remainder. Step 2 - Divide the previous quotient (63) by 2. 63 / 2 = 31. Here, the quotient is 31 and the remainder is 1.
Step 3 - Repeat the previous step. 31 / 2 = 15. Now, the quotient is 15, and 1 is the remainder.
Step 4 - Repeat the previous step. 15 / 2 = 7. Here, the quotient is 7, and 1 is the remainder.
Step 5 - Repeat the previous step. 7 / 2 = 3. Here, the quotient is 3, and 1 is the remainder.
Step 6 - Repeat the previous step. 3 / 2 = 1. Here, the quotient is 1, and 1 is the remainder.
Step 7 - Repeat the previous step. 1 / 2 = 0. Here, the remainder is 1. And we stop the division here because the quotient is 0.
Step 8 - Write down the remainders from bottom to top. Therefore, 126 (decimal) = 1111110 (binary).
There are certain rules to follow when converting any number to binary. Some of them are mentioned below:
This is one of the most commonly used rules to convert any number to binary. The place value method is the same as the expansion method, where we need to find the largest power of 2. Let’s see a brief step-by-step explanation to understand the first rule. Find the largest power of 2 less than or equal to 126. Since the answer is 2^6, write 1 next to this power of 2. Subtract the value (64) from 126. So, 126 - 64 = 62. Find the largest power of 2 less than or equal to 62. The answer is 2^5. So, write 1 next to this power. Now, 62 - 32 = 30. Find the largest power of 2 less than or equal to 30. The answer is 2^4. So, write 1 next to this power. Now, 30 - 16 = 14. Find the largest power of 2 less than or equal to 14. The answer is 2^3. So, write 1 next to this power. Now, 14 - 8 = 6. Find the largest power of 2 less than or equal to 6. The answer is 2^2. So, write 1 next to this power. Now, 6 - 4 = 2. Find the largest power of 2 less than or equal to 2. The answer is 2^1. So, write 1 next to this power. Now, 2 - 2 = 0. Since there is no remainder, we can write 0 next to the remaining powers (2^0). Final conversion will be 1111110.
The division by 2 method is the same as the grouping method. A brief step-by-step explanation is given below for better understanding. First, 126 is divided by 2 to get 63 as the quotient and 0 as the remainder. Now, 63 is divided by 2. Here, we will get 31 as the quotient and 1 as the remainder. Dividing 31 by 2, we get 15 as the quotient and 1 as the remainder. Dividing 15 by 2, we get 7 as the quotient and 1 as the remainder. Dividing 7 by 2, we get 3 as the quotient and 1 as the remainder. Dividing 3 by 2, we get 1 as the quotient and 1 as the remainder. Divide 1 by 2 to get 1 as the remainder and 0 as the quotient. We stop the division once the quotient becomes 0. Now, we write the remainders upside down to get the binary equivalent of 126, 1111110.
This rule also involves breaking the number into powers of 2. Identify the powers of 2 and write it down in decreasing order i.e., 2^6, 2^5, 2^4, 2^3, 2^2, 2^1, and 2^0. Find the largest power that fits into 126. Repeat the process and allocate 1s and 0s to the suitable powers of 2. Combine the digits (0 and 1) to get the binary result.
The limitation of the binary system is that only 0s and 1s can be used to represent numbers. The system doesn’t use any other digits other than 0 and 1. This is a base 2 number system, where the binary places represent powers of 2. So, every digit is either a 0 or a 1. To convert 126, we use 0s for 2^0 and 1s for 2^6, 2^5, 2^4, 2^3, 2^2, and 2^1.
Learning a few tips and tricks is a great way to solve any mathematical problems easily. Let us take a look at some tips and tricks for binary numbers up to 126.
Memorize to speed up conversions: We can memorize the binary forms for numbers 1 to 126.
Recognize the patterns: There is a peculiar pattern when converting numbers from decimal to binary. 1 → 1 1 + 1 = 2 → 10 2 + 2 = 4 → 100 4 + 4 = 8 → 1000 8 + 8 = 16 → 10000 16 + 16 = 32 → 100000 32 + 32 = 64 → 1000000 64 + 64 = 128 → 10000000…and so on. This is also called the double and add rule.
Even and odd rule: Whenever a number is even, its binary form will end in 0. For example, 126 is even, and its binary form is 1111110. Here, the binary of 126 ends in 0. If the number is odd, then its binary equivalent will end in 1. For example, the binary of 127 (an odd number) is 1111111. As you can see, the last digit here is 1.
Cross-verify the answers: Once the conversion is done, we can cross-verify the answers by converting the number back to the decimal form. This will eliminate any unforeseen errors in conversion.
Practice by using tables: Writing the decimal numbers and their binary equivalents on a table will help us remember the conversions.
Here, let us take a look at some of the most commonly made mistakes while converting numbers to binary.
Convert 126 from decimal to binary using the place value method.
1111110
2^6 is the largest power of 2, which is less than or equal to 126. So place 1 next to 2^6. Subtracting 64 from 126, we get 62. So the next largest power would be 2^5. So place another 1 next to 2^5. Now, subtracting 32 from 62, we get 30. Continue the process until the remainder is 0. By using this method, we can find the binary form of 126.
Convert 126 from decimal to binary using the division by 2 method.
1111110
Divide 126 by 2. In the next step, the quotient becomes the new dividend. Continue the process until the quotient becomes 0. Now, write the remainders upside down to get the final result.
Convert 126 to binary using the representation method.
1111110
Break the number 126 into powers of 2 and find the largest powers of 2. We get 2^6. So 1 is placed next to 2^6. Next, 126 - 64 = 62. Now, the largest power of 2 is 2^5. Once again, 1 is placed next to 2^5. Continue the process until the remainder is 0. After getting 0, fill in with zeros for unused powers of 2. By following this method, we get the binary value of 126 as 1111110.
How is 126 written in decimal, octal, and binary form?
Decimal form - 126 Octal - 176 Binary - 1111110
The decimal system is also called the base 10 system. In this system, 126 is written as 126 only. We have already seen how 126 is written as 1111110 in binary. So, let us focus on the octal system, which is base 8. To convert 126 to octal, we need to divide 126 by 8. So 126 / 8 = 15 with 6 as the remainder. In the next step, divide the quotient from the previous step (15) by 8. So 15 / 8 = 1 with 7 as the remainder. The division process stops here because the quotient is now 0. Here, 6 and 7 are the remainders, and they have to be written in reverse order. So, 176 is the octal equivalent of 126.
Express 126 - 5 in binary.
1111011
126 - 5 = 121 So, we need to write 121 in binary. Start by dividing 121 by 2. We get 60 as the quotient and 1 as the remainder. Next, divide 60 by 2. Now we get 30 as the quotient and 0 as the remainder. Continue the division process until the quotient becomes 0. Now, write the remainders from bottom to top to get 1111011 (binary of 121).
Hiralee Lalitkumar Makwana has almost two years of teaching experience. She is a number ninja as she loves numbers. Her interest in numbers can be seen in the way she cracks math puzzles and hidden patterns.
: She loves to read number jokes and games.