Comments on 2 bit subtractor using full subtractor
Parent
2 bit subtractor using full subtractor
Can we make a n-bit subtractor using full subtractors or if we want do subtract one binary from another we must use full adders and use the complement of the 2nd number to do the subtraction?
I have only found examples which we use the complement of the second number and using full adders if it is possible to create a n-bit substractor using only full subtractors and without any adders or complements i would really appreciate it if he/she posted the circuit because i am stuck.
Post
We don't just give direct answers to homework (or homework-like) questions here, but can help you work thru the problem on your own.
You might consider trying to synthesize a subtractor from scratch, just like you would an adder. The fundamental building block of an adder is the half-adder. It takes in two bits to add, and produces the sum and carry bits. Since there are only 4 possible combinations of inputs, a truth table nicely describes its operation exhaustively:
In1 In2 Sum Car --- --- --- --- 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1
That should be enough to create a circuit of basic logic gates to implement the half-adder. You then chain together two of these per bit to make the full adder. This process is well documented in many place out there, very likely in your textbook too.
Now consider doing the same thing for subtraction. You have two input bits, and two output bits. In this case the output bits are the difference and the borrow.
When you get done with this, it might be instructive to compare that result to constructing a subtractor by complementing one of the input numbers, adding it to the other input number, and adding 1 to the result. Note that adding 1 to the result is the same as if the carry input to the first bit were 1.
I know how to make a full subtractor i just dont know how to connect multiple of them in order to make subtraction of 2 binary numbers with more than 1 bit
That makes little sense. If you really had a full subtractor, then you'd know what the input and output signals were, and then it would be obvious how to chain them to subtract wide numbers.
A full subtractor has three inputs and two outputs. The inputs are the two data bits to subtract, and the borrow input. The outputs are the resulting difference bit and the borrow output. You really should be able to figure out how to chain such blocks to subtract multi-bit numbers.
I cant understand which pins to connect with which pins.
Pins of what exactly? What exactly do you think the pins of this thing are?
Again, we are not here to do your homework for you. You have to put in some effort and be trying to learn. Show a block diagram of this thing, its input and output signals, and explain what you think each of these signals do. You may realize how to hook it up in the process of trying to explain it. Or, if there is a misconception, we'll know better how to help you understand it.
This is getting away from the original question. Instead of adding this to your existing question (and thereby causing confusion), it is probably better to show the diagram, input and output signals, and ask about connecting up the block in a separate question.
1 comment thread