Horace Eye Kc9EYE Algorithm for Binary Subtraction

logo


Formulas
Capacitance Equivalence and Codes
Programming Projects
Boolean Algebra (logic)
Binary Subtraction Algoithm
AC Components and Values
Code Practice Oscillator Project
Qrp Wattmeter
Voltmeter Impedance Measurement
Wall Wort Testing
QRP Dummy Load
Homebrew Key
Online Log


SOHO MDI
SOHO MDI
Credit:Solar and Heliospheric observatory
LASCO C3
LASCO C3
Credit: Solar and Heliosperic observatory

Note: Subtraction is simply the addition of a negative number and a positive number.
Definitions:

  5=Minuend
-3=Subtrahend
  2=Difference

Algorithm for Binary Subtraction

  1. Perform a logical NOT on the subtrahend to produce the ones compliment of the subtrahend.
  2. Add 1 to the ones compliment of the subtrahend to produce the twos compliment of the subtrahend.
  3. Add the twos compliment of the subtrahend to the minuend.
  4. The result is difference of the minuend - subtrahend.

In essence by taking the subtrahend of the equation and turning it into its twos compliment, you are effectively turning it into a negative binary number. And as I said at the beginning you can think of subtraction as the addition of a negative number and a positive number.