4bit adder/subtract....

beenthere

Joined Apr 20, 2004
15,819
Hi,

My Signetics LSTTL manual says that the LS83 is a four bit adder. Just present the bits and the output is the sum. If you want to subtract and all you have is an adder, then you have to compliment one number to make it negative. That turns the addition into a subtraction. I believe computers still do this internally.

That chip is ancient, by the way. It has power like the old 7490, with Vcc to p5 and ground to p12. Hope you don't need to actually use one.
 

Thread Starter

stam

Joined Nov 21, 2004
2
Thanks for replying! :)

I asked my teacher today and he told me that i must do the hole thing with an LS83, X-OR gates and some NOT...

The problem is with subtract, when the second number is bigger than the first one, so the result will be negative...

I studied LS83 and made a schematic but the above problem is still there... :( :(



[attachmentid=243]
 

beenthere

Joined Apr 20, 2004
15,819
Hi,

When you're adding a complimented number, you get the right result when you pull the CARRY IN line high:

Carrry: 1
A: 0010
B: 1101 (compliment of 0010)
sum: 0000 (ignore the CARRY OUT)
 
Top