Here we’ll be designing circuits to compare different binary numbers. Suppose we have two numbers A & B at the input and 3 output as A>B, A=B, A<B and only one of the three outputs would be high accordingly if A is greater than or equal to or less than B. 1-bit comparator: Let’s begin with […]
Tag: digital electronics
Question: 4-bit ADDER and SUBTRACTOR in a SINGLE CIRCUIT
Q- Implement the 4-bit ADDER and SUBTRACTOR in a single circuit where we select one of the two using a select pin SEL. Ans: The following circuit would work as required: In this circuit we use property of XOR gate by which XOR gate acts as a inverter when we have one input as 1. When sel = […]
Question: Implement Subtractor using Adder
We can also do subtraction using adders. As we have already studied that we can do subtraction by 2’s compliment method in which we add 2’s compliment of subtrahend to minuend and 2’s compliment can be found by inverting all bits of subtrahend and then adding one. So we have to do as F= A […]
Serial and Parallel Subtractors
Similar to the adder case we can have serial and parallel subtractors as shown below: Serial subtractor: In this circuit, we have Input number coming bit by bit and output comes bit by bit and the final borrow at the end: Parallel Subtractor: All inputs are feed simultaneously. Borrow-propagate subtractor: Similar to the case of adder we […]
Full subtractor using Half subtractor
Q- Can be get the full Subtractor from 2 half Subtractor? Ans: Yes we can implement the Full Subtractor using 2 half Subtractors and one OR gate as follow: And the circuit diagram is
Full subtractor
This has 3 inputs- 2 are the numbers to be subtracted and c is the borrow which is taken for previous bit and we have 2 outputs Difference and the Borrow. The following table shows the results for all combinations of inputs: a b c B(borrow) D(difference)= D = a – b – c […]
Half Subtractors
Similar to the adder, we can also design subtractors and we also have half and full subtractors. Half subtractor (HS): This circuit subtracts two bits and gives Borrow and Difference as 2 outputs. The following table shows the result for different combinations of inputs: a b B(borrow) D(difference)= D = a – b 0 0 0 […]
Q-Implement BCD to Excess 3 converter using parallel adder
Ans: As we know to get Excess-3 from BCD we need to add 3 (0011) to the BCD number. So the circuit to implement the above is:
Carry look-ahead adder (CLA)
We know that Ci+1 is dependent on previous carry Ci as follow relation: Ci+1 =Ai Bi + Ai Ci +Bi Ci which can be written as Ci+1 = Gi + Pi Ci Gi is called carry generate function as it generates carry when Ai =1 & Bi =1 and Pi is called carry propagate function because it propagates the carry when we have Ai =1 or Bi =1. Using these […]
Binary Adder
In this adder we have 2 inputs of N-bit numbers and one output of N-bit number with a carry. We can achieve this either using Serial addition or Parallel addition Serial adder: This is the one which would accept bit by bit input of the n-bit numbers and there is a bit by bit output […]