Binary Arithmetic | Analog and Digital Electronics - Electrical Engineering (EE) PDF Download

Binary Arithmetic Basics

  • Binary arithmetic means doing math using only two numbers: 0 and 1. It's like regular math, but instead of using numbers like 1, 2, 3, and so on, we only use 0 and 1. 
  • We have rules, like truth tables, for adding, subtracting, multiplying, and dividing these binary numbers. We use these rules to perform basic calculations. 
  • Before we dive into how binary arithmetic works, let's quickly review how we represent regular numbers in binary form.

Binary Equivalent of Decimal Numbers

Below is a chart showing how decimal numbers are represented in binary.

Binary Equivalent of Decimal NumbersBinary Equivalent of Decimal Numbers

  • In this representation, we use four positions to represent decimal numbers in base two. With these four positions, we can represent numbers from 0 to 15. To find the binary equivalent, we use the powers of two. To find the decimal equivalent, we multiply each digit by the appropriate power of two. Let's look at an example.

Binary WeightageBinary Weightage

  • In the example above, we found the decimal equivalent of 1010. To do this, we multiplied each digit by the powers of two. In the binary number 1010, the rightmost digit is the least significant bit (LSB), and the leftmost digit is the most significant bit (MSB). We start from the right and multiply each digit by two to the power of zero, then two to the power of one, and so on.
  • Finally, we add all these values together to get the decimal equivalent. So, the decimal equivalent of 1010 is 10 (ten), as shown in the chart. Similarly, we can find the decimal equivalent of any binary number. As mentioned earlier, with four positions, we can represent numbers from 0 to 15, and with six positions, we can represent numbers from 0 to 65, and so on.

Question for Binary Arithmetic
Try yourself:
What is the binary equivalent of the decimal number 7?
View Solution

Binary Addition

Binary addition is about adding two binary numbers together. Here's how it works:

Binary Addition Truth TableBinary Addition Truth Table

  • When you add two low bits (0 + 0), the result is always low (0). This means adding two zeros doesn't change the overall value.
  • When you add a low bit to a high bit (0 + 1) or a high bit to a low bit (1 + 0), the result is always high (1). This means whenever you add 0 to 1 or 1 to 0, the sum is 1. And in these cases, there's no carry.
  • When you add two high bits (1 + 1), the result is high (1), but with a carry. This means when you add two ones together, the sum is 0 with a carry of 1.

Here are the rules for binary addition:

  • Start from the rightmost bit (also called the LSB).
  • When adding a low bit with a low bit, the result is low.
  • When adding a high bit with a low bit or vice versa, the result is high.
  • When adding two high bits, the result is high with a carry of 1.

Let's look at an example to understand this better. Take a look at the table below:

Binary Addition ExampleBinary 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.

Binary Subtraction

Here's the truth table for binary subtraction:

Binary Subtraction Truth TableBinary Subtraction Truth Table

When we subtract two binary numbers, we get two outputs: the difference and the borrow. 

Here's how it works:

  • If we subtract a low bit from another low bit, the output is low. There's no change in the overall value.
  • If we try to subtract a high bit from a low bit, it's not possible without borrowing. In this case, both the difference and borrow are high. This is similar to what we do in regular subtraction.
  • When a low bit is subtracted from a high bit, the difference is high, and there's no need for borrowing.
  • When we subtract two high bits, the difference is low. Except for the case where we need to borrow, the borrow is always zero.

Let's consider an example using the table below:

Binary Subtraction ExampleBinary 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.

Question for Binary Arithmetic
Try yourself:
What is the result when adding two low bits in binary addition?
View Solution

Binary Multiplication

The truth table for binary multiplication is shown below:

Binary Subtraction Truth TableBinary 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 ExampleBinary 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.


Binary Division


Here's the truth table for binary division:

Binary Division Truth TableBinary 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 ExampleBinary 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.

The document Binary Arithmetic | Analog and Digital Electronics - Electrical Engineering (EE) is a part of the Electrical Engineering (EE) Course Analog and Digital Electronics.
All you need of Electrical Engineering (EE) at this link: Electrical Engineering (EE)
137 videos|143 docs|71 tests

Top Courses for Electrical Engineering (EE)

FAQs on Binary Arithmetic - Analog and Digital Electronics - Electrical Engineering (EE)

1. What is binary arithmetic?
Binary arithmetic is a method of performing mathematical operations using only two digits, 0 and 1, representing the numbers in base-2 format. It involves addition, subtraction, multiplication, and division of binary numbers.
2. How do you convert decimal numbers to binary?
To convert a decimal number to binary, divide the number by 2 repeatedly, noting down the remainder at each step. The binary equivalent is obtained by arranging the remainders in reverse order. For example, to convert decimal 10 to binary: 10 ÷ 2 = 5 (remainder 0) 5 ÷ 2 = 2 (remainder 1) 2 ÷ 2 = 1 (remainder 0) 1 ÷ 2 = 0 (remainder 1) The binary equivalent is 1010.
3. What is binary addition?
Binary addition is the process of adding two binary numbers together. It follows the same rules as decimal addition, but with only two digits (0 and 1). If the sum of two binary digits is 0, the result is 0, and if the sum is 1, the result is 1. If the sum is 2, it is represented as 10 in binary (carry-over). For example, adding binary 1101 and 1011: 1101 + 1011 ------- 11000 The result is 11000 in binary.
4. How do you perform binary subtraction?
Binary subtraction is similar to decimal subtraction. If the minuend is greater than or equal to the subtrahend, the subtraction is straightforward. If not, borrowing is required. The borrowed value is represented as 2 in binary. For example, subtracting binary 1101 from 10111: 10111 - 1101 ------- 9010 The result is 9010 in binary.
5. How do you multiply binary numbers?
Binary multiplication is performed using a method similar to decimal multiplication. Each binary digit of the multiplier is multiplied by each binary digit of the multiplicand, and the results are added together. If the product is 2 or greater, a carry-over occurs. For example, multiplying binary 1011 by 110: 1011 x 110 --------- 10110 (Partial product: 1011) 10110 (Partial product: 0) 10110 (Partial product: 1011) --------- 1110110 The result is 1110110 in binary.
137 videos|143 docs|71 tests
Download as PDF
Explore Courses for Electrical Engineering (EE) exam

Top Courses for Electrical Engineering (EE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

practice quizzes

,

Extra Questions

,

video lectures

,

mock tests for examination

,

Important questions

,

Semester Notes

,

Binary Arithmetic | Analog and Digital Electronics - Electrical Engineering (EE)

,

Previous Year Questions with Solutions

,

Binary Arithmetic | Analog and Digital Electronics - Electrical Engineering (EE)

,

Sample Paper

,

Exam

,

Summary

,

study material

,

ppt

,

Free

,

MCQs

,

Binary Arithmetic | Analog and Digital Electronics - Electrical Engineering (EE)

,

shortcuts and tricks

,

Objective type Questions

,

past year papers

,

pdf

,

Viva Questions

;