Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Multiply–accumulate operation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Operation common in numerical signal processing}} In [[computing]], especially [[digital signal processing]], the '''multiply–accumulate''' ('''MAC''') or '''multiply–add''' ('''MAD''') operation is a common step that computes the product of two numbers and adds that product to an [[accumulator (computing)|accumulator]]. The hardware unit that performs the operation is known as a '''multiplier–accumulator''' ('''MAC unit'''); the operation itself is also often called a MAC or a MAD operation. The MAC operation modifies an accumulator ''a'': <math display="block"> a \gets a + ( b \times c )</math> When done with [[Floating-point arithmetic|floating-point]] numbers, it might be performed with two [[rounding]]s (typical in many [[digital signal processors|DSP]]s), or with a single rounding. When performed with a single rounding, it is called a '''fused multiply–add''' ('''FMA''') or '''fused multiply–accumulate''' ('''FMAC'''). Modern computers may contain a dedicated MAC, consisting of a multiplier implemented in [[combinational logic]] followed by an [[adder (electronics)|adder]] and an accumulator register that stores the result. The output of the register is fed back to one input of the adder, so that on each clock cycle, the output of the multiplier is added to the register. Combinational multipliers require a large amount of logic, but can compute a product much more quickly than the [[peasant multiplication|method of shifting and adding]] typical of earlier computers. [[Percy Ludgate]] was the first to conceive a MAC in his Analytical Machine of 1909,<ref>{{cite web |url=http://www.fano.co.uk/ludgate/ |title=The Feasibility of Ludgate's Analytical Machine |url-status=live |archive-url=https://web.archive.org/web/20190807233229/http://www.fano.co.uk/ludgate/ |archive-date=2019-08-07 |access-date=2020-08-30}}</ref> and the first to exploit a MAC for division (using multiplication seeded by reciprocal, via the convergent series {{math|(1+''x'')<sup>−1</sup>}}). The first modern processors to be equipped with MAC units were [[digital signal processor]]s, but the technique is now also common in general-purpose processors.<ref>{{Cite journal|last1=Lyakhov|first1=Pavel|last2=Valueva|first2=Maria|last3=Valuev|first3=Georgii|last4=Nagornov|first4=Nikolai|date=January 2020|title=A Method of Increasing Digital Filter Performance Based on Truncated Multiply-Accumulate Units|journal=Applied Sciences|language=en|volume=10|issue=24|pages=9052|doi=10.3390/app10249052|doi-access=free}}</ref><ref>{{Cite book|last1=Tung Thanh Hoang|last2=Sjalander|first2=M.|last3=Larsson-Edefors|first3=P.|title=2009 IEEE International Symposium on Parallel & Distributed Processing |chapter=Double Throughput Multiply-Accumulate unit for FlexCore processor enhancements |date=May 2009|chapter-url=https://ieeexplore.ieee.org/document/5161212|pages=1–7|doi=10.1109/IPDPS.2009.5161212|isbn=978-1-4244-3751-1|s2cid=14535090}}</ref><ref>{{Cite journal|date=2020-03-01|title=PV-MAC: Multiply-and-accumulate unit structure exploiting precision variability in on-device convolutional neural networks|url=https://www.sciencedirect.com/science/article/abs/pii/S0167926019302809|journal=Integration|language=en|volume=71|pages=76–85|doi=10.1016/j.vlsi.2019.11.003|issn=0167-9260|last1=Kang|first1=Jongsung|last2=Kim|first2=Taewhan|s2cid=211264132 |url-access=subscription}}</ref><ref>{{cite web |url=https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/mad---ps|title=mad - ps|date=20 November 2019 |access-date=2021-08-14}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)