What is Subtracting: Definition and 67 Discussions

In electronics, a subtractor can be designed using the same approach as that of an adder. The binary subtraction process is summarized below. As with an adder, in the general case of calculations on multi-bit numbers, three bits are involved in performing the subtraction for each bit of the difference: the minuend (




X

i




{\displaystyle X_{i}}
), subtrahend (




Y

i




{\displaystyle Y_{i}}
), and a borrow in from the previous (less significant) bit order position (




B

i




{\displaystyle B_{i}}
). The outputs are the difference bit (




D

i




{\displaystyle D_{i}}
) and borrow bit




B

i
+
1




{\displaystyle B_{i+1}}
. The subtractor is best understood by considering that the subtrahend and both borrow bits have negative weights, whereas the X and D bits are positive. The operation performed by the subtractor is to rewrite




X

i




Y

i




B

i




{\displaystyle X_{i}-Y_{i}-B_{i}}
(which can take the values -2, -1, 0, or 1) as the sum




2

B

i
+
1


+

D

i




{\displaystyle -2B_{i+1}+D_{i}}
.





D

i


=

X






Y

i




B

i




{\displaystyle D_{i}=X_{}\oplus Y_{i}\oplus B_{i}}






B

i
+
1


=

X

i


<
(

Y

i


+

B

i


)


{\displaystyle B_{i+1}=X_{i}<(Y_{i}+B_{i})}
Subtractors are usually implemented within a binary adder for only a small cost when using the standard two's complement notation, by providing an addition/subtraction selector to the carry-in and to invert the second operand.





B
=



B
¯



+
1


{\displaystyle -B={\bar {B}}+1}
(definition of two's complement notation)







A

B



=
A
+
(

B
)






=
A
+



B
¯



+
1






{\displaystyle {\begin{alignedat}{2}A-B&=A+(-B)\\&=A+{\bar {B}}+1\\\end{alignedat}}}

View More On Wikipedia.org
  1. M

    Vectors. Adding, subtracting, and velocity questions

    So I have a few problems that I need help with. Any help would be greatly appreciated as I am new here and stumped. 1. A woman walks 220 m in the direction 27 degrees east of north, then 205 m directly east. (a) find the magnitude (finished it). 362.5 m (b) Find the angle of her final...
  2. I

    Coulomb Gauge Fixing: Adding Gradient & Subtracting Partial Time Derivative

    Coulomb gauge fixes gauge by setting div(A)=0. What has it to do with adding a gradient to A and subtract a partial time derivative from V?
  3. K

    How Do You Calculate Vector Operations Such as C - A - B and 2A - 3B + 2C?

    If A= 60.0 and theda = 56.5 degrees of this graph http://www.flickr.com/photos/44447874@N08/4079278252/ can you help me find C - A - B? magnitude and direction (counterclockwise from the +x axis is positive) Also how do I find 2A - 3B + 2C? Thank you
  4. S

    Subtract Vectors A & B: Calculate Components & Magnitude

    I am completely lost. Here is a similar equation, I changed the lengths and angles. Vector A is 3.0 meters long, and is 45 degrees from the x axis. Vector B is 6.0 meters long, and is 130 degrees from the x axis. What are the x and y components of the vector C=B-A? What is the magnitude...
  5. N

    Subtracting Vectors: How to Find Magnitude of A-B

    This is the problem that I was given: Given two vectors A and B, with magnitudes |A| = 45.7 and |B|=38.2 and directions (from the x-axis) θA=64° and θB=145°, find the magnitude of (A-B) I know that this somehow involves triangles and trigonometry, but I am really confused as to how I do...
  6. T

    How Do You Calculate Vector Sums and Differences in Physics?

    Homework Statement Three vectors a , b , and c each have a magnitude of 42 m and lie in an xy plane. Their directions relative to the positive direction of the x-axis are 29°, 197°, and 314°, respectively. What are (a) the magnitude and (b) the angle of the vector a+ b + c, and (c) the...
  7. X

    Gradient of A*B: Adding and Subtracting Terms

    grad(A*B)=(A*grad)B + (B*grad)A + A curl B + B curl A i'm not sure how to read the RHS to begin to work out the index definition.i'm thinking if add and subtract terms this will work out. i think i can see the first two terms, but the last two maybe "A cross nabla" is what they mean acting on...
  8. M

    Subtracting out a random variable

    "Subtracting out" a random variable let X be a discrete R.V. and let Y = f(X) for some function f. I wish to find a function g, such that Y and Z = g(X) are independent, and also such that the uncertainty H(Z) is maximized. For example, suppose X is uniformly distributed over...
  9. P

    Subtracting integers with powers

    Homework Statement Hey, sorry about this. Its really obvious, i think there's just some really simple way to do it. Its annoying me, my teacher couldn't do it either! Evaluate 6667²-3333² (without a calculator) Homework Equations The Attempt at a Solution I know there is just...
  10. N

    Linear transformation - adding and subtracting?

    [SOLVED] Linear transformation - adding and subtracting? Homework Statement Suppose T : P2 -> P2 is a linear transformation satisfying T(3 − x + 4x^2) = 1 + x − x^2 and T(2 − 3x + 2x^2) = 7 + 3x + 2x^2. Find T(7x + 2x^2). The Attempt at a Solution First of all, it's linear. To find...
  11. H

    Solving Vector C: 3.00A - 4.00B

    http://img523.imageshack.us/img523/4889/yf0148vj7.jpg Homework Statement Use unit vectors to express the vector C, where C = 3.00A - 4.00B Keep in mind that C, A, and B are vectors, I could not get the Latex to work. Homework Equations There are no relevant equations, but I don't...
  12. Nick666

    Subtracting any finite quantity from an infinite quantity

    Between a finite amount of x and in infinite amount of x, is there an infinite amount of x ?
  13. C

    Adding and subtracting Rational Expressions

    I'm stuck on how to do this problem My attempt: the answer to the second one is 3x + 2/(x+2)(x-2) Can someone point out my mistake?
  14. fargoth

    Does Subtracting a Constant from a Hamiltonian's Diagonal Change Its System?

    correct me if I am wrong.. as i see it, i can subtract any constant from the diagonal of the hamiltonian without really changing the system it describes... am i right? if i got a two state system, the hamiltonian can look like this: \left( \begin{array}{cc} 0 & P_{2->1} \\ P_{1->2} & \Delta...
  15. B

    Subtracting Exponents with Same Base but Different Exponent

    How do you do this problem (without a calculator) that looks deceivingly simple, yet is utterly confusing. (2 ^ 30 - 2 ^ 29)/2 = ?. The answer is 2 ^ 28, but how was this done without using a calculator. The furthest I can take this without using a calculator is 2 ^ 29 - 2 ^ 28
  16. R

    Adding & Subtracting Vecots And Relative Velocity

    Adding & Subtracting Vectors And Relative Velocity Hey everyone, I am so confused with this it's not funny. This is my first time accessing a site like thisss, but I am desperate seeing as though it's school holidays atm where I am and I can't talk to my physics teacher for help. Anyhow, I hope...
  17. chroot

    Designing a Voltage Subtractor Circuit Without an Op-Amp

    Can anyone think of a circuit that takes two input voltages and produce an output voltage equal to the difference in input voltages? In other words, a "voltage subtractor?" And don't answer "op-amp!" I don't want to use an op-amp. The circuit also must function with only one positive...
Back
Top