Computers have been programmed to use machine learning, which is designed with digital circuits. These circuits perform complex arithmetic equations involving basic operations like binary addition, subtraction, multiplication, and division. For every arithmetic operation, logic gates are designed based on truth tables. These truth tables perform simple algorithms and also complex operations. The binary division is one of the fundamental arithmetic operations to be performed by logic gates. The binary tradition which is similar to traditional divisional rules involves the decimal equivalent of binary numbers.
What is Binary Division?
The binary division is a set of rules which are designed to divide two numbers, which are represented in binary form. These rules are similar to those which are used to divide two numbers in their decimal equivalent form. The rules are framed based on a truth table, and logic gate circuits can be designed based on the truth table. These logic gates, perform the binary division when implemented and designed in a printed circuit board or FPGA board.
Before beginning the binary division, let’s see how the numbers are represented in binary form. Consider the following figure for binary number representation.
For the conversion of numbers into binary form, each digit is multiplied by its corresponding weight. In binary numbers, for this article, we have taken the base of two. So, the weights are calculated based on the power of two and multiplied with each digit beginning from the rightmost side. As shown below, the number 1010 has been converted to its binary form. First, the weights are taken as powers of two, beginning from 0,1,2,3, and so on.
So the rightmost digit is multiplied with two to the power 0 which is equal to 1, then the next number is multiplied with two to the power 2 which is equal to four, and the next number is multiplied with two to the power 3 which is equal to eight. In four-digit representation, we restrict ourselves up to two to power 3 which is eight. So we get the result, like ten, which is the decimal equivalent of 1010.
Similarly, the decimal equivalent of numbers up to 10 has been shown in the figure. It could be noted that here we have taken two as the base. That is the reason we are multiplying with the powers of two. In the octal system, we take the base as eight and in Hexa, we take the base as 16.
Binary Division Truth Table
Now let’s see how binary conversion is done. Before going for the binary division, let’s revise the traditional decimal equivalent division. Consider the following figure.
In the figure, 128 is divided with 8, which results in 16 as the answer, with 0 as the remainder. So case, 128 is called the dividend, 8 is called the divisor, 16 is called the quotient, and 0 is called the remainder. Now, let us take an example of binary division. Consider the following figure.
Binary Division Steps
Binary division designing steps include the following. For this problem, 101010 is the dividend, 110 is the divisor. We will get the result 111 as quotient and 0 as reminder.
As shown in the figure, the dividend for our problem is 101010, and the divisor is 110. Beginning with the division, the first digit to be taken is 1. But 110 is greater than the first digit one, so it is not divisible. Therefore, we multiply with 0 and place 0 below. The next digit 0 we bring.
Again, now the dividend is 10 which is less than 110, so again division is not possible. So for this case, again we will multiply with zero, and go for the next digit, which is 1 now.
Now, after bringing the next digit, we can see that the dividend is 101. Whose decimal equivalent is 5. And the decimal equivalent of divisor 110 is 6. Again for this step also, 5 is less than 6, which means that division is not possible. Therefore, again we have to take 0 in the quotient part and move to the next decimal, which is now 0. Now the number has become 1010.
Now the number is 1010, which is certainly greater than the divisor 110. Therefore, one is taken in the divisor part. Now we need to subtract 1010-110, and the result we get is 100, and when the next digit is brought down from the top, it becomes 1001. Now we need to take the next number as 1001.
Again, 1001 is greater than 110, so we can multiply with one. So now it becomes 1001-110, whose value is equal to 011, and when the next digit from the dividend is brought down, the number becomes 0110. Now we need to divide 0110 with 0110.
Now we can see that 0110 and 0110 both are the same. So, we need to multiply with one, and the result is now 0110-0110 = 0. Which implies that the remainder is zero now.
Since we have got the zero as a reminder, now if we check the dividend, it is equal to 000111. The first three numbers can be neglected since they are zeros. So the final quotient is 111.
We can check the division done is correct or not, by multiplying the divisor and the quotient. The divisor is 110 which is equal to 6, and the quotient is 111 which is equal to 7. So the dividend is 42. Now check the dividend which is 101010, whose decimal equivalent is 42. So our division is correct.
Please refer to this link for Binary Division MCQs
Binary Division using Two’s Complement
The one’s complement and two’s complement numbers are used to represent the signed magnitude of a binary number. Consider the following figure.
As shown in the figure, -7 is represented using the signed magnitude. First, the number 7 is converted to its binary equivalent as 0111. To convert the same into one’s complement, we need to replace 0 with one and one with zero. So it becomes 1000. Hence to obtain the one’s complement of any number, we need to replace the one with zero and zero with one. Let’s see an example of this. Let us say, we are dividing 19 by 6. So the dividend is 19, the divisor is 6, the quotient is 3 and the remainder is 1.
Step 1. Find the binary form representation. 19 is represented as 00010011. And two’s complement of -6 is 11111010.
Step 2. Adding these we get
Step 3. Check for equality. The binary equivalent of divisor 6, 00001101, is less than result 00001101. We need to go for one more addition. Repeat the same, until we get the remainder, less than the divisor.
Step 4. Now we can see that the remainder is 1. As the result is less than the divisor, we need to stop here. The same could be checked by traditional division.
To represent the sign of a given number, the first digit is used to represent the sign of a given. For example, if we want to represent -7 using sign-magnitude, we can represent it as 1111. Where the first bit is for the sign of the number and the decimal equivalent of the remaining three digits 111 is 7.
In un-signed magnitude, we don’t use the first bit for the representation of the magnitude. For example, in un-signed magnitude form, the decimal equivalent of 1111 would be 16. But whereas in signed magnitude form, the value of 1111 is -7.
Two complements are important in binary operations. To represent the two’s complement, after converting or obtaining the one’s complement, we add one to the end to obtain the two’s complement of the number. As shown in the previous figure, the two’s complement of 1000 would be 1001. We need to add 1 at the end.
The two’s complement is also used in the binary division and other operations such as addition and subtraction.
Two-Bit and n-bit Binary Division
Based on the truth table of binary division, a divider circuit can be easily built. Consider the following figure.
The circuit diagram represents a two-bit divider circuit. The two bits input are A0, A1, for one number, and B0, B1 for the other. The pins C0, C1, C2, and C3 represent the binary form representation of the quotient. The circuit is realized using AND gates and Ex-OR gates as shown in the figure. A common application of logic gate operation can be found in multiplexer and demultiplexer circuits.
How do you divide a binary number by 3?
By checking with the decimal equivalent of the number, it can be divided by 3
Which Division Method is used to Perform Binary Division?
The long division method is used to perform the binary division.
What is underflow?
Underflow is the result that is smaller than the smallest number.
Why Booth algorithm is used?
Booth algorithm is used to multiply two signed numbers in their two’s complementary form.
Hence, we have seen the truth tables and step-wise procedure for making the binary division. Such circuits are very popular due to the advent of FPGA boards & smaller size of ICs. These circuits can be designed and implemented using printed circuit boards, FPGA, and even breadboard circuits. Here is a question for you, what is binary division?