Lorick wrote: > I'm trying to figure out of my 24 bit adder is simulating properly > but I can't seem to get my binary skills straight with carry and > all that so I don't really know if I'm doing it properly by hand. > > Here's what I'm putting through the simulation: > > Number 1: 00000000 11111111 11111111 > Number 2: 01100100 11111111 11111111 > > The simulator gives out the 24 bit result: > 01100110 00000010 11111101 > > I'm trying to decide if this is correct. So I guess first, is it > correct? No, it's not correct. > Then, how DOES it work by hand again? I think I have the basics, > 1+1=10, 1+0=1 0+0=0 etc....but....I can't make it work in my head. It's REAL simple: 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 10 (or, in other words, 1 + 1 = 0 with a carry) 1 + 1 + 1 = 11 (or, in other words, 1 + 1 + 1 = 1 with a carry) And by the way... You don't need to do BINARY addition to test your program's results; instead, just convert the two inputs to decimal, add them, then convert the result back to binary. In your case, it works out to: 65535 + 6619135 = 6684670 6684670 dec = 01100101 11111111 11111110 bin -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - San Diego, California === http://www.geocities.com/SiliconValley/2499