Adder-subtracter
In
digital circuit s, an adder-subtracter is a circuit that is capable of adding or subtracting numbers (in particular, binary).Below is a circuit that does adding "or" subtracting" depending on a control signal.However, it is possible to construct a circuit that performs both addition and subtraction at the same time.Construction
Construction of a binary adder-subtracter is quite easy.Assume you have an "n"-bit adder for and , then .Also assume the numbers are in
two's complement .Then to perform , two's complement theory says to invert each bit with aNOT gate then add one.This yields , which is easy to do with a slightly modified adder.By preceding each input bit on the adder with a 2-to-1
multiplexer where:
* Input 0 () is straight through ()
* Input 1 () is negated ()that has control input and the initial carry connect is also connected to then:
* when the modified adder performs addition
* when the modified adder performs subtractionThis works because when the input to the adder is really and the carry in is . Adding to and yields the desired subtraction of .
Role in the arithmetic logic unit
Adders are a part of the core of an
arithmetic logic unit (ALU).Thecontrol unit decides which operations an ALU should perform (based on theop code being executed) and sets the ALU operation.The input to the adder-subtracter above would be one such control line from the control unit.The adder-subtracter above could easily be extended to include more functions.For example, a 2-to-1 multiplexer could be introduced on each that would switch between zero and ; this could be used (in conjunction with ) to yield the
two's complement of since .A further step would be to change the 2-to-1 mux on to a 4-to-1 with the third input being zero, then replicating this on thus yielding the following output functions:
* (with the both and input set to zero and )
* (with the both and input set to zero and )
* (with the input set to zero)
* (with the input set to zero)
* (with the input set to zero and )
* (with the input set to zero and )
*
*
*
* (with set to invert; set to zero; and )
* (with set to invert; set to zero; and )
* (with set to invert; set to zero; and )
* (with set to invert; set to zero; and )By adding more logic in front of the adder, a single adder can be converted into much more than just an adder — an ALU.
ee also
*
Adder (electronics)
*Carry look-ahead adder
*Carry save adder
*Adding machine
*Subtractor
Wikimedia Foundation. 2010.
Look at other dictionaries:
adder-subtracter — sudėties ir atimties įtaisas statusas T sritis automatika atitikmenys: angl. adder subtracter; subtracter adder vok. Addier Subtrahiereinrichtung, f; Addier Subtrahier Werk, n; Subtrahier Addierwerk, n rus. сумматор вычитатель, m; суммирующе… … Automatikos terminų žodynas
Adder (electronics) — In electronics, an adder or summer is a digital circuit that performs addition of numbers.In modern computers adders reside in the arithmetic logic unit (ALU) where other operations are performed.Although adders can be constructed for many… … Wikipedia
subtracter-adder — sudėties ir atimties įtaisas statusas T sritis automatika atitikmenys: angl. adder subtracter; subtracter adder vok. Addier Subtrahiereinrichtung, f; Addier Subtrahier Werk, n; Subtrahier Addierwerk, n rus. сумматор вычитатель, m; суммирующе… … Automatikos terminų žodynas
Serial binary adder — The serial binary adder is a digital circuit that performs binary addition bit by bit. The serial full adder has three single bit inputs for the numbers to be added and the carry in. There are two single bit outputs for the sum and carry out. The … Wikipedia
Addier-Subtrahier-Werk — sudėties ir atimties įtaisas statusas T sritis automatika atitikmenys: angl. adder subtracter; subtracter adder vok. Addier Subtrahiereinrichtung, f; Addier Subtrahier Werk, n; Subtrahier Addierwerk, n rus. сумматор вычитатель, m; суммирующе… … Automatikos terminų žodynas
Addier-Subtrahiereinrichtung — sudėties ir atimties įtaisas statusas T sritis automatika atitikmenys: angl. adder subtracter; subtracter adder vok. Addier Subtrahiereinrichtung, f; Addier Subtrahier Werk, n; Subtrahier Addierwerk, n rus. сумматор вычитатель, m; суммирующе… … Automatikos terminų žodynas
Subtrahier-Addierwerk — sudėties ir atimties įtaisas statusas T sritis automatika atitikmenys: angl. adder subtracter; subtracter adder vok. Addier Subtrahiereinrichtung, f; Addier Subtrahier Werk, n; Subtrahier Addierwerk, n rus. сумматор вычитатель, m; суммирующе… … Automatikos terminų žodynas
additionneur-soustracteur — sudėties ir atimties įtaisas statusas T sritis automatika atitikmenys: angl. adder subtracter; subtracter adder vok. Addier Subtrahiereinrichtung, f; Addier Subtrahier Werk, n; Subtrahier Addierwerk, n rus. сумматор вычитатель, m; суммирующе… … Automatikos terminų žodynas
sudėties ir atimties įtaisas — statusas T sritis automatika atitikmenys: angl. adder subtracter; subtracter adder vok. Addier Subtrahiereinrichtung, f; Addier Subtrahier Werk, n; Subtrahier Addierwerk, n rus. сумматор вычитатель, m; суммирующе вычитающее устройство, n pranc.… … Automatikos terminų žodynas
сумматор-вычитатель — sudėties ir atimties įtaisas statusas T sritis automatika atitikmenys: angl. adder subtracter; subtracter adder vok. Addier Subtrahiereinrichtung, f; Addier Subtrahier Werk, n; Subtrahier Addierwerk, n rus. сумматор вычитатель, m; суммирующе… … Automatikos terminų žodynas