Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Adder–subtractor
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
==Role in the arithmetic logic unit== {{main|Arithmetic logic unit}} Adders are a part of the core of an [[arithmetic logic unit]] (ALU). The [[control unit]] decides which operations an ALU should perform (based on the [[op code]] being executed) and sets the ALU operation. The ''D'' input to the adder–subtractor above would be one such control line from the control unit. The adder–subtractor above could easily be extended to include more functions. For example, a 2-to-1 multiplexer could be introduced on each ''B<sub>i</sub>'' that would switch between zero and ''B<sub>i</sub>''; this could be used (in conjunction with {{nowrap|1=''D'' = 1}}) to yield the [[two's complement]] of ''A'' since {{nowrap|1=−''A'' = {{overline|''A''}} + 1}}. A further step would be to change the 2-to-1 multiplex on ''A'' to a 4-to-1 with the third input being zero, then replicating this on ''B<sub>i</sub>'' thus yielding the following output functions: * 0 (with both the ''A<sub>i</sub>'' and ''B<sub>i</sub>'' inputs set to zero and {{nowrap|1=''D'' = 0}}) * 1 (with both the ''A<sub>i</sub>'' and ''B<sub>i</sub>'' inputs set to zero and {{nowrap|1=''D'' = 1}}) * ''A'' (with the ''B<sub>i</sub>'' input set to zero) * ''B'' (with the ''A<sub>i</sub>'' input set to zero) * {{nowrap|''A'' + 1}} (with the ''B<sub>i</sub>'' input set to zero and {{nowrap|1=''D'' = 1}}) * {{nowrap|''B'' + 1}} (with the ''A<sub>i</sub>'' input set to zero and {{nowrap|1=''D'' = 1}}) * {{nowrap|''A'' + ''B''}} * {{nowrap|''A'' − ''B''}} * {{nowrap|''B'' − ''A''}} * {{overline|''A''}} (with ''A<sub>i</sub>'' set to invert; ''B<sub>i</sub>'' set to zero; and {{nowrap|1=''D'' = 0}}) * −''A'' (with ''A<sub>i</sub>'' set to invert; ''B<sub>i</sub>'' set to zero; and {{nowrap|1=''D'' = 1}}) * {{overline|''B''}} (with ''B<sub>i</sub>'' set to invert; ''A<sub>i</sub>'' set to zero; and {{nowrap|1=''D'' = 0}}) * −''B'' (with ''B<sub>i</sub>'' set to invert; ''A<sub>i</sub>'' set to zero; and {{nowrap|1=''D'' = 1}}) By adding more logic in front of the adder, a single adder can be converted into much more than just an adder—an [[arithmetic logic unit|ALU]].
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Adder–subtractor
(section)
Add topic