NotesBs Physicslecture 5 digital electronics (binary addition , subtraction )

lecture 5 digital electronics (binary addition , subtraction )

Rules of Binary Addition 

Adding in binary is significantly simpler than adding in decimal when you keep in mind the following tips or guidelines. Let’s take a look at the rules of binary addition.

Rule 1: 0+0=0; Carry =0

Rule 2:  0+1=1; Carry =0

Rule 3: 1+0=1; Carry =0

Rule 4: 1+1=0; Carry 

We can summarize this as:

Rules of Binary Addition

Binary Addition Table

The table of adding two binary numbers 0 and 1 is given below:

Binary addition table

In this table, x and y are the two binary numbers. So when we give the input for 𝑥=0 and 𝑦=0, 

then the output is equal to 0. When 𝑥=0 or 1 and 𝑦=1 or 0, then 𝑥+𝑦=1. But when both x and y are equal to 1, then their addition equals 0, but the carryover number will equal to 1, which means basically 1+1=10 in binary addition, where 1 is carried forward to the next digit.

Solved Examples

1. Solve: 111002+101012

Solution: 

Solving binary addition with regrouping

Therefore, 111002+101012=1100012

2. Find 1101102+11112.

Solution

Binary addition with regrouping

Therefore, 1101102+11112=10001012

3. Add  1102+1112+1012

Solution: 

To perform the addition of three binary numbers, add two binary numbers together and then add the resultant value with the third one.

Let’s add 110+111 first.

Binary addition example

Now, let’s add the third binary number to the resultant value of addition of the first two.

Adding binary numbers


Therefore, 1102+1112+1012=100102

Half Subtractor

The half subtractor is also a building block for subtracting two binary numbers. It has two inputs and two outputs. This circuit is used to subtract two single bit binary numbers A and B. The ‘diff‘ and ‘borrow’ are two output states of the half subtractor.

Block diagram

Half Subtractor

Truth Table

Half Subtractor

The SOP form of the Diff and Borrow is as follows:

Diff= A’B+AB’
Borrow = A’B

In the above table

Full Subtractor

The Half Subtractor is used to subtract only two numbers. To overcome this problem, a full subtractor was designed. The full subtractor is used to subtract three 1-bit numbers A, B, and C, which are minuend, subtrahend, and borrow, respectively. The full subtractor has three input states and two output states i.e., diff and borrow.

Block diagram

Full Subtractor

Truth Table

Full Subtractor
  • ‘A’ and’ B’ are the input variables. These variables represent the two significant bits that are going to be subtracted.
  • ‘Borrowin‘ is the third input which represents borrow.
  • The ‘Diff’ and ‘Borrow’ are the output variables that define the output values.
  • The eight rows under the input variable designate all possible combinations of 0 and 1 that can occur in these variables.

Note: We can simplify each of the Boolean output functions with the help of the unique map method.

The SOP form can be obtained with the help of K-map as:

Full Subtractor

Diff=xy’ z’+x’ y’ z+xyz+x’yz’

ADVERTISEMENT

Full Subtractor

Borrow=x’ z+x’ y+yz

Construction of Full Subtractor Circuit:

Full Subtractor

ADVERTISEMENT

The above block diagram describes the construction of the Full subtractor circuit. In the above circuit, there are two half adder circuits that are combined using the OR gate. The first half subtractor has two single-bit binary inputs A and B. As we know that, the half subtractor produces two outputs, i.e., ‘Diff’ and ‘Borrow’. The ‘Diff’ output of the first subtractor will be the first input of the second half subtractor, and the ‘Borrow’ output of the first subtractor will be the second input of the second half subtractor. The second half subtractor will again provide ‘Diff’ and ‘Borrow’. The final outcome of the Full subtractor circuit is the ‘Diff’ bit. In order to find the final output of the ‘Borrow’, we provide the ‘Borrow’ of the first and the second subtractor into the OR gate. The outcome of the OR gate will be the final carry ‘Borrow’ of full subtractor circuit.

The MSB is represented by the final ‘Borrow’ bit.

The full subtractor logic circuit can be constructed using the ‘AND’, ‘XOR’, and NOT gate with an OR gate.

Full Subtractor

The actual logic circuit of the full subtractor is shown in the above diagram. The full subtractor circuit construction can also be represented in a Boolean expression.

Diff:

  • Perform the XOR operation of input A and B.
  • Perform the XOR operation of the outcome with ‘Borrow’. So, the difference is (A XOR B) XOR ‘Borrowin‘ which is also represented as:
    (A ⊕ B) ⊕ ‘Borrowin’

Borrow:

  • Perform the ‘AND’ operation of the inverted input A and B.
  • Perform the ‘XOR’ operation of input A and B.
  • Perform the ‘OR’ operations of both the outputs that come from the previous two steps. So the ‘Borrow’ can be represented as:
    A’.B + (A ⊕ B)’
- Advertisement -spot_img

latest articles

Space related Events (Sep)

Here are the detailed trending topics related to space...

Number System Unit 1 Class 11 Maths

Chapter notes include all topic notes in detail ,...

Vision and Mission Unit 1.1 Class 12 English

Vision And Mission Unit 1.1 class 12...

Federal Board Past Papers Chemistry Class12

Federal Board Past Papers class 12 chemistry notesPrevious...

Analytical Chemistry Chapter 12 Class 12 Notes

Analytical chemistry chapter 12 class 12 chemistry...

Environmental Chemistry Chapter 11 Notes Class 12

Environmental chemistry chapter 11 class 12 chemistry...

Industrial Chemistry Chapter 10 Class 12 Notes

Industrial chemistry chapter 10 class 12 chemistry...

Introduction to Biology and the Sciences

Introduction to Biology and the SciencesBiology is the scientific...

OLDEST 5 DINOSAUR(dinosaur series part 1 )

The oldest known dinosaur species are believed to have...
- Advertisement -spot_img