Table of contents | |
Binary Arithmetic Basics | |
Binary Equivalent of Decimal Numbers | |
Binary Addition | |
Binary Subtraction | |
Binary Multiplication | |
Binary Division |
Below is a chart showing how decimal numbers are represented in binary.
Binary Equivalent of Decimal Numbers
Binary Weightage
Binary addition is about adding two binary numbers together. Here's how it works:
Binary Addition Truth Table
Here are the rules for binary addition:
Let's look at an example to understand this better. Take a look at the table below:
Binary Addition Example
In this example, we start from the rightmost bit (LSB). First, we add 0 to 0, which gives us 0 with no carry. Then, we move to the next bit. When we add 1 to 1, according to the truth table, the sum is 0, but there's a carry of 1 from the previous step. Next, we add 0 to 0 again, with the carry from the previous step.
So, the sum is 1, with no carry. Finally, we add 1 to 0, resulting in 1. We can double-check our answer. We're adding (1010) to (0010), whose decimal equivalents are 10 and 2, giving us the solution 12. And the decimal equivalent of 12 is 1100, as shown in the table. Therefore, our calculation is correct.
Here's the truth table for binary subtraction:
Binary Subtraction Truth Table
When we subtract two binary numbers, we get two outputs: the difference and the borrow.
Here's how it works:
Let's consider an example using the table below:
Binary Subtraction Example
In this example, we're subtracting 1110 from 0011. Just like in addition, we start from the least significant bit. So, we start with 0 minus 1. Since we can't subtract a low bit from a high bit without borrowing, we borrow and the difference becomes 1. Then, we have two ones, so we subtract 1 from 1, resulting in 0. Then, we subtract the difference from 1, which gives us 1 with a borrow. In the third step, we've borrowed 1, and the bits are 1 and 0. So, the difference is 0 with no borrow. Lastly, we have 1 subtracted from 0, resulting in 1 with no borrow.
We can double-check our answer. The decimal equivalent of 1110 is 14, and the decimal equivalent of 0011 is 2. So, the difference should be 12. Checking the result, we get 1011, which is indeed the binary equivalent of 12. This confirms that our subtraction is correct. Now, let's move on to the next binary operation.
The truth table for binary multiplication is shown below:
Binary Subtraction Truth Table
The rules for binary multiplication are straightforward. When both inputs are low, the output is low. When one input is low and the other is high, the output is low. The output is high only when both inputs are high. Here's an example of binary multiplication:
Binary Multiplication Example
In the example above, we multiply 100 (which is equivalent to 4 in decimal) by 011 (which is equivalent to 3 in decimal). This gives us the result 1100 (which is equivalent to 12 in decimal). Binary multiplication combines both binary addition and binary multiplication. It's essentially the same as how we do multiplication in regular decimal arithmetic.
Here's the truth table for binary division:
Binary Division Truth Table
Binary division only has two cases because you can't divide any number by 0, and dividing 0 by 0 is undefined. So, as shown, we only have two cases. When a low number is divided by a high number, the output is low, and when a high number is divided by another high number, the output is high. Here's an example illustrating binary division:
Binary Division Example
In this example, we divide 101010 (which is equivalent to 42 in decimal) by 110 (which is equivalent to 6 in decimal). The result is 111 (which is equivalent to 7 in decimal), with no remainder.
So, we've covered the four basic binary arithmetic operations, including truth tables and solved examples. All these operations can be implemented using logic gates. Gates like AND, OR, and Ex-OR are used to build circuits for these operations. For instance, a simple 4-bit adder circuit uses 4 bits to perform addition.
137 videos|143 docs|71 tests
|
1. What is binary arithmetic? |
2. How do you convert decimal numbers to binary? |
3. What is binary addition? |
4. How do you perform binary subtraction? |
5. How do you multiply binary numbers? |
|
Explore Courses for Electrical Engineering (EE) exam
|