If you can't see the simulation below, try the Half Adder on Falstad.com
Believe it or not, 4 NAND gates can add a pair of binary numbers and find the sum. The only trick is that the binary numbers must be very small... Only one digit each. This adder can add 0+0=0, 0+1=1, 1+0=1, and 1+1=2. If you try to add even 0+2, it will fail to give the right output. But as with many things in digital logic, we can set many of these little adders side by side and make one that can do just about any size number. That is next. For now, look at how this works:
Isn't that cool!
You might notice that the sum (the right most column of the output, or lowest order bit) is just the XOR of the two inputs. It is 0 when the inputs are the same, and 1 when they are different. You can see the XOR circuit... just exclude the bottom right "carry" NAND gate.
The carry (left column, higher order bit) is just the AND (or NOT NAND) of the two inputs. It is only 1 when input A AND input B are 1. We make this by using the NAND gate at the input, and then adding a NAND configured as an inverter, picking off the output of that first NAND.
Full adder can carry us into modules which will lead to a Big Binary Adder
See also:
file: /Techref/logic/add1.htm, 2KB, , updated: 2017/9/16 21:44, local time: 2018/9/22 12:45,

©2018 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/logic/add1.htm"> Digital Logic Tutorial: Binary Addition Circuit</A> 
Did you find what you needed? 
PICList 2018 contributors:
o List host: MIT, Site host massmind.org, Top posters @20180922 RussellMc, Van Horn, David, Sean Breheny, David C Brown, Bob Blick, Isaac M. Bavaresco, Neil, Denny Esterline, Harold Hallikainen, John Gardner, * Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. ongoing support is MOST appreciated! * Contributors: Richard Seriani, Sr. 
Welcome to www.piclist.com! 
.