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. A

    Subtracting two vectors -- I'm not getting the right answer

    I added x and y-axis so it would be square, and then vector bx would be same as vector a, but a didn't get it right. I am out of ideas. Can you help me?
  2. chwala

    Adding and subtracting fractions

    now a bit confusing here, i always use Bodmas in that case, ##9\frac {1}{5}##-[##3\frac {3}{10}##+##2\frac {2}{3}]##...[1] is this correct and what if i re arrange to ##9\frac {1}{5}##+##2\frac {2}{3}##-##3\frac {3}{10}##...[2] input guys...cheers i have seen my mistake [1] is wrong...
  3. chriscarson

    Help subtracting these fractions please

    I really can t find my mistake here 17/20 is the proper answer Thanks
  4. K

    I Subtracting background from data

    Hello! I have some counts measured at fixed points, both for background only and signal+background. Say that for a given x I have 16 counts with background only and 100 for background+signal. So the background is ##16\pm 4## and for the signal+background ##100\pm 10## (assuming poisson...
  5. V

    Comp Sci Subtracting the mean from a column in an array

    import numpy as np a=np.array([[1,2,3], [4,5,6]]) print(s) print() print(a.mean()) I know how to take the mean of the entire array. However I am having trouble understanding what it means to subtract the mean from each column. Does this mean subtract it from each element in the column? Thank...
  6. R

    What is the Percentage Profit on a House Bought for $500 and Sold for $700?

    The house was bought for $500 and sold for $700(700-500=200) 200/500*100%=40%,is the solution right verify please. Thanks,help if incorrect.
  7. YoungPhysicist

    Big integer arithmetic functions

    NOTE:This is not a homework question! This is just a topic that I like very much,but don’t have the programming ability to do many of them.That’s why I post this thread. C++ is a language without built-in big integer calculation functions,so building ones that can do such job is a great way to...
  8. F

    Subtracting unsigned binary numbers using two methods

    Homework Statement Using 8 bit representation , subtract the unsigned binary numbers shown by each of the following methods ; 101012 - 10112 1) Binary subtraction 2) 2's complement Homework Equations - The Attempt at a Solution Using binary subtraction : 101012 - 10112 = 0000 10102 Using 2's...
  9. J

    Subtracting an Assembly's MOI -- Help please

    It's been ages since I have done Moments of Inertia of complex objects! :( Can anyone help?? Say you have an assembly like an airplane and you want to just get the moment of inertia(MOI) of the tail section and you are given the Mass of whole plane,mass of tail section, moment of inertia of...
  10. J

    Subtracting object MOI from assembly to get other parts MOI?

    Homework Statement It's been ages since I have done Moments of Inertia of complex objects! :( Can anyone help?? Say you have an assembly like an airplane and you want to just get the moment of inertia(MOI) of the tail section and you are given the Mass of whole plane,mass of tail section...
  11. B

    Reviewing Kinematics for AP Physics Exams: When to Subtract Gravity?

    Hello, I'm reviewing kinematics for an upcoming AP physics exam, but I seem to have forgotten a crucial fact. In typical rocket problems (when the rocket blasts off with an initial acceleration for example 5 m/s^2), why don't we subtract 9.8 from 5m/s^2 when using a value for acceleration? When...
  12. C

    Kinematics question -- Adding and subtracting vectors

    Homework Statement If vector a is added to vector b, the result is the vector c = (7.00, 3.00). If b is subtracted from a, the result is the vector d = (−4.50, 9.25). what is the magnitude of a? what is the magnitude of b? Homework EquationsThe Attempt at a Solution a + b = (7.00, 3.00)c...
  13. B

    MHB Subtracting mixed fractions help

    Hi, I'm new. Please bear with me because I'm not familiar with the code of this forum. I don't know how to enter a mixed fraction correctly, so I'm just going to write it out. Here is the problem: Four and five-ninths minus 2/3 Can someone explain to me why the answer is three and...
  14. C

    Adding and Subtracting Significant Figures

    Homework Statement Hi, To add or subtract sig figs, it is to my understanding that the answer is reported so that it reflects the least precise number. For the example 43.4 - 22 - 3, would I report my answer as 18 or 20? Thanks. Any help is very much appreciated! Homework EquationsThe...
  15. adjacent

    Unsigned Subtraction in Modern Computers: Exploring the Method of Complements

    Modern computers don't have circuits dedicated for subtraction. They do it by using the method of complements. All is well when the 2 operands are signed 2's complement numbers. The result of addition will be another 2's complement which, when interpreted as a 2's complement number, will give...
  16. N

    Significant figure round off when adding and subtracting

    So I know that you can't round off numbers in a longer calculation. (in physics) but how is this with adding and subtracting. For example 52,32*13=680,16 -> 680,16/123=5,529...=5,5(because of the 13) but what is correct when adding inbetween 530,014+0,01=530,02 ->...
  17. B

    Solving Subtracting Vectors Homework Problem

    Homework Statement 3 m/s [E] - 5 m/s [N] Homework Equations I don't know how to solve this- is this done algebraically or another way? The Attempt at a Solution I have no clue. Would this be different if the directions were not like this--- 3 m/s 50° east - 5m/s 67° North. I have no idea how...
  18. B

    Adding and Subtracting Vectors of Different Directions

    Homework Statement Given the initial velocity of 6m/s[North] and the final velocity of 3m/s[East], how would you find the change in velocity? Homework Equations Change in velocity= final velocity- inital velocity The Attempt at a Solution [/B] I don't know how to do this. I know that if the...
  19. S

    Adding and subtracting polynomials

    Homework Statement Write each polynomial in standard form. Then name each polynomial based on its degree and number of terms.[/B] 1.4y^3 -4y^2+3-y 2.x^2=x^4-6 3.x+2Homework EquationsThe Attempt at a Solution 4y+3-y Don't know where else to go from here. Would appreciate a nudge in the right...
  20. V

    Adding & Subtracting Vectors: How to Determine the Final Vector Result

    Hello All, I'm taking a university physics course and while dealing with the introduction to vectors I believe I'm having more trouble at drawing diagrams than with the calculations (trigonometry) and therefore not having a clear diagram is causing some confusion. The problem is as follows...
  21. J

    What is the easiest method for adding and subtracting rational numbers

    What is the easiest method for adding and subtracting rational numbers
  22. 2

    Subtracting functions on specified domains

    OK, so I posted this a few days ago: https://www.physicsforums.com/threads/subtracting-the-overlap-of-functions.784184/#post-4925108 What I've come to discover is that I want to understand how I can subtract f(x) on domain [b,c] from g(x) on domain [a,d]. I want to be able to disregard both...
  23. 2

    Subtracting the overlap of functions

    I have a fun project I'm trying to do and it's been a good number of years since I did any math higher than algebra. As such, I don't know how to approach this and would like some pointers. I am trying to understand how I can subtract one function from another ONLY where the two functions...
  24. Lolligirl

    MHB Writing a Mealy model for the 2's complement of subtracting 1101?

    This question is worded in a confusing way: Question: Write a Mealy finite state machine that produces the 2’s complement result of subtracting 1101 from a binary input stream (assuming at least 4 bits of input). So our input here is e.g. 10010101 or 001011 or something similar, and we want to...
  25. I

    MHB How Do You Correctly Subtract Using 1's and 2's Complement in Binary?

    (Wave) i have to subtract binary numbers using the method where you take the 1's complement and then the 2's complement. but I am doing something wrong. say for example 11-1. take 1's complement of 1 which is 0 and then take the 2's complement by adding 1 so 0+1=1 and now you go back and add...
  26. E

    MHB Simplify (Adding and Subtracting Rational Functions)

    5c) Simplify. \frac{2x}{3y} - \frac{x^2}{4y^3} + \frac{3}{5y^4} This is what I did, which is wrong according to the textbook. Could someone point out what I did wrong and how to correct it? Thanks. \frac{(2x)(4y^3)-(x^2)(3y)}{(3y)(4y^3)} + \frac{3}{5y^4} \frac{8xy^3-3x^2y}{(12y^3)} +...
  27. J

    Point groups and symmetry: Adding and subtracting operations

    Homework Statement I haven't been assigned these questions, but I'm trying to trudge through them to better understand symmetry. This is for my inorganic class. It's just a series of short questions like: C3 – S56 = ? S4 + i = ? C3 + i = ? Stuff like this. And just looking at the...
  28. N

    (Reflected wave) adding voltage / subtracting current

    why we add reflected voltage to the input voltage but subtract current from the input current? Also why the reflected current is shown on the other side of the load, traveling back to the input source but not on the same path where it travels from? Does voltage wave reflect the same way...
  29. F

    MHB Dividing vs Subtracting to Solve Equations w/1 Variable

    If you have the equation \frac{dx}{dt}=4(x^2+1) I sometimes get confused if i should should subtract 4(x^2+1) from both sides or multiply by it's reciprocal. If I subtract from both sides then I'd have 0 on the right side and that would give a different answer after integration but...
  30. B

    Analyzing Incorrect Results in Binary Subtraction

    I am asked to come up with two 4-bit binary numbers, that when subtracted, provide the wrong result for both the unsigned and signed cases, inspecting only the first 4 bits of the output. I have come up with numerous combination where the unsigned is correct, the signed is wrong, and vice...
  31. M

    Understanding the Convergence of Radical Functions

    This is something that comes up when I want to determine whether the sequence of functions {f_n} converge uniformly to f: Suppose f_n(x) = sqrt(x^2 + 1/n^2), so f(x) = x. Then, according to Spivak, f(x) - f_n(x) = sqrt(x^2) - sqrt(x^2 + 1/n^2) = 1/(2n^2*sqrt(ε)) for some ε such that x^2 < ε...
  32. P

    Finding mass of water by subtracting graduated cylinder mass

    Homework Statement Ok so I have to do this lab that I just started today, I have a link to the entire assignment so you guys can see everything here: http://www.bclearningnetwork.com/LOR/media/ch11/course_files/Unit_Labs/Unit_1_density_lab.pdf I asked my teacher how I'm supposed to do it...
  33. S

    Adding and Subtracting vectors; Finding change in velocity

    Homework Statement A batsman hits a cricket ball traveling towards him at 30m/s over square leg at 50m/s. If the cricketer is facing north and square leg is west of him, what is the change in velocity of the ball? Homework Equations Δv= Final velocity subtract initial velocity. The...
  34. A

    Subtracting numbers in two different txt files

    I have two .txt files with a bunch of numbers in them, below each other, like this: File 1: 3 4 5 File 2: 1 2 1 Now I want to subtract the numbers in file 2 from the numbers in file 1 and get the results in a new .txt file: File 3: 2 2 4 Very simple. I was going...
  35. N

    Subtracting cartesian products

    Homework Statement Let A = {1, 2}, B = {3, 4}, C = {3} What is (A x B) - (B x C)? Homework Equations The Attempt at a Solution (A x B) - (B x C) = {(1, 3), (1, 4), (2, 3), (2, 4)} - {(3, 3), (4, 3)} = {(1, 3), (1, 4), (2, 3), (2, 4)} Since there where no elements in (B x...
  36. A

    Adding & Subtracting vectors

    Homework Statement If two collinear vectors \vec{A} and \vec{B} are added, the resultant has a magnitude equal to 4.0. If \vec{B} is subtracted from \vec{A}, the resultant has a magnitude equal to 8.0. What is the magnitude of \vec{B} ? Homework Equations None. The Attempt at a...
  37. A

    Adding and subtracting vectors

    Homework Statement The diagram below shows 3 vectors which sum to zero, all of equal length. What is \vec{A} - \vec{B}...
  38. L

    Subtracting Equations: How to Solve for Unknown Variables

    Hello! I'm having trouble subtracting two equations, I'm not really sure how to go about it. \\ \frac{4\pi r^3}{3}(\rho_1 - \rho_2)g - 6\pi r\eta v_0 = 0\\ \frac{4\pi r^3}{3}(\rho_1 - \rho_2)g - 6\pi r\eta v_1 - qE = 0 For clarification, there are three different equations used. \\ F_g =...
  39. ArcanaNoir

    Subtracting LUB and GLB to approach function

    Homework Statement I am trying to understand the equation U-L<ε as part of a proof. I have attached the original problem, [102], as well as the hints page. Homework Equations \sum\limits_{v=1}^n M_v(x_v-x_{v-1})-\sum\limits_{v=1}^n m_v(x_v-x_{v-1})<\epsilon The Attempt at a Solution...
  40. Y

    Net Displacement: Subtracting E from W Direction Vectors

    Is it valid to subtract a position vector of direction E with one of direction W or do they both have to have the same dierction when using the net displacement formula?
  41. R

    Subtracting the proper motion resulting from movement of the Sun

    Hello, I have been trying to compute the velocity of the star with respect to its local medium from the proper motion measurements. Sure, you can calculate the corresponding velocities by v = 4.74*(proper motion)*distance (in suitable units), but this resulting velocity is now with respect to...
  42. O

    Multiplying and subtracting coordinates

    Hello, I am hoping someone can help me understand a problem in a textbook. It just assumes you know how to do a littel bit of maths, which I don't, and haven't been able to figure out. S11 = 0.894 \angle -60.6 S21 = 3.122 \angle 123.6 S12 = 0.020 \angle 62.4 S22 = 0.781 \angle -27.6...
  43. R

    Subtracting this vector - as opposed to adding it

    Homework Statement Sketch the vector difference D = A - B I have found F = A + B. Homework Equations A(x) = AcosTHETA A(y) = AsinTHETA B(x) = BcosTHETA A(y) = BsinTHETA R = sqrt(rx^2 + ry^2) The Attempt at a Solution As opposed to the F = A + B I have tried changing the...
  44. G

    Why do negative numbers behave the way they do in arithmetic?

    I am having an issue with why negative numbers work the way they work. For instance why does 5 - (-2) = 7 Why do two negatives make a positive when you subtract them? For me that equation reads 5 apples and you take away -2 apples which to me doesn't really make sense because in real...
  45. S

    Subtracting centrifugal acceleration from acceleration caused by movement

    I've been playing around with dead reckoning stuff on an rc plane by attaching a gps, 3 axis gyroscope, and 3 axis accelerometer to the plane. When the plane isn't turning, my algorithm works pretty well however when I enter a turn, the readings get way off. Specifically, the plane appears to...
  46. H

    Adding and Subtracting Vectors

    Homework Statement http://i.imgur.com/fiUPD.png Homework Equations Asin(Theta) Acos(Theta) Ax+Bx=Cx, Ay+By=Cy Cx^2+Cy^2=C^2The Attempt at a Solution My problem is with the answer I got for part a). I used 3cos120 and got 2.44. Then put in 3sin120 and got 1.74. I added these to the Bx and By...
  47. M

    Adding and subtracting different bases with common exponents in ring Z

    Homework Statement Calculate (5^7)-(7^7)+(9^7)-(11^7) in Mod24 Homework Equations The Attempt at a Solution I added all the bases and got -4 (which I changed to 4), then I took 4^7 and ended up with 16,384. I divided 16,384 by 24 as many times as I could, which gave me an end...
  48. C

    Adding and subtracting thermalchemcial equations help needed

    Homework Statement From the enthalpies of reaction for equations A) and B), calculate the heat of reaction for equation C). A) 2H2 (g) + O2 (g) ----> 2H2O2 (g) DH= -483.6 kJ B) 3O2 (g) ----> 2O3 (g) DH= +284.6 kJ...
  49. J

    Understanding Vector Subtraction: A Guide for Solving Vector Problems

    This is not a homework question, just a coursework reading. Homework Statement Please look at the figure on the right hand side Homework Equations R = A+B R = A - B The Attempt at a Solution So I tried to understand the concept of subtracting vectors. I want to do the...
Back
Top