Adder and substrate with signed number

Papabravo

Joined Feb 24, 2006
21,158
The basic circuits are called a Half Adder and a Full Adder.
The Half-Adder takes two input bits and produces a sum and a carry. So it is a Boolean function with two inputs and two outputs.
The Full-Adder takes three inputs, a carry in and two input bits. It produces a sum and a carry. So it is a Boolean function with three inputs and two outputs.
Once you have those two function blocks, the rest is done with input multiplexers.
 

Thread Starter

Ahahah

Joined Dec 9, 2021
3
The basic circuits are called a Half-Adder and a FullAdder.
The Half-Adder takes two input bits and produces a sum and a carry. So it is a Boolean function with two inputs and two outputs.
The Full-Adder takes three inputs, a carry in and two input bits. It produces a sum and a carry. So it is a Boolean function with three inputs and two outputs.
Once you have those the rest is don with input multiplexers.
I tried but it give wrong answer in -3 minus -1 and -1 minus -3
 

Papabravo

Joined Feb 24, 2006
21,158
I don't have logisim so I can't help you with that.
So, with 3 bits you can represent 8 different numbers in the range [-4,...3]
So subtraction is the same as adding the two's complement
-3 minus -1 is the same operation as -3 + 1 = -2, and
-1 minus -3 is the same operation as -1 + 3 = +2
Do you agree with that or is there some other result you can share?
I shouls also point out that adding the twos complement is the same as adding the 1's complement and adding 1.
Does that give you any clues about what you should do?
 
Top