Adding and substracting binary numbers

Thread Starter

thexy

Joined Dec 13, 2015
130
Capture.JPG
A and B are two numbers and I need to fill this truth table connected with adding and substracting this numbers with using 1 when something is correct, 0 false and as many as possible don't care - X. How should I do it?
I'm also confuded how should I interpret a and b?
Do I need for example 4. row add like 11 + 00 = 11 - > no carry and write Q add, correct is 1 or what? Or I should add that like 1+1+0+0=0 and CARRY=1 and than Q add, corr is 0?

Can someone help me with understanding this example and what should be correct solution for this whole table?
 

Attachments

WBahn

Joined Mar 31, 2012
29,932
I can't make heads or tails of your example. For instance, I have NO idea what you mean by "no carry and write Q add, correct is 1"

Your two inputs are two 2-bit binry numbers, probably with the 0-subscript being the lsb.

But I have NO idea what your four outputs even are supposed to mean.
 

Thread Starter

thexy

Joined Dec 13, 2015
130
I can't make heads or tails of your example. For instance, I have NO idea what you mean by "no carry and write Q add, correct is 1"

Your two inputs are two 2-bit binry numbers, probably with the 0-subscript being the lsb.

But I have NO idea what your four outputs even are supposed to mean.
I mean carry is 0 and because of that I think I can say that my addition is correct.
 

WBahn

Joined Mar 31, 2012
29,932
I mean carry is 0 and because of that I think I can say that my addition is correct.
I'm still lost.

Your block has four outputs. Please explain, completely, exactly what each of those four outputs is supposed to convey. I have no idea, from the name, what "Qadd, correct" means. What is Q?

When you add two 2-bit numbers, you get a 3-bit result. Even if your carry result is correct, that does NOT mean that the addition result is correct. Using your example, if I had 11 + 00 = 10, then my carry would be 0, which is correct, but my result is not correct.
 

Thread Starter

thexy

Joined Dec 13, 2015
130
I'm still lost.

Your block has four outputs. Please explain, completely, exactly what each of those four outputs is supposed to convey. I have no idea, from the name, what "Qadd, correct" means. What is Q?

When you add two 2-bit numbers, you get a 3-bit result. Even if your carry result is correct, that does NOT mean that the addition result is correct. Using your example, if I had 11 + 00 = 10, then my carry would be 0, which is correct, but my result is not correct.
We have two numbers a and b. A is formed from a0 and a1 and same goes for the b. So sometimes when we add and sub that numbers result will be correct or false. Are you still lost?
 

WBahn

Joined Mar 31, 2012
29,932
Yes. Where does the "sometimes when we ass and sub" come into it at all.

You have a box that takes as inputs the two numbers.

So let's say that I apply a 1 too all four inputs.

What should the outputs be?

I haven't given it ANY information about what I think the sum or the difference should be! How can it possibly tell me whether my addition or subtraction is correct when it doesn't know what my addition or subtraction results even are?

Does this black box have a crystal ball in it to read my mind?
 

Thread Starter

thexy

Joined Dec 13, 2015
130
Yes. Where does the "sometimes when we ass and sub" come into it at all.

You have a box that takes as inputs the two numbers.

So let's say that I apply a 1 too all four inputs.

What should the outputs be?

I haven't given it ANY information about what I think the sum or the difference should be! How can it possibly tell me whether my addition or subtraction is correct when it doesn't know what my addition or subtraction results even are?

Does this black box have a crystal ball in it to read my mind?
Well output is something that I ask for.
Normal substraction and addition of binary numbers.
 

WBahn

Joined Mar 31, 2012
29,932
How do you ask for it? The box that you have in your first post has four inputs and four outputs. How, given the interface that you have defined, do you ask of anything more than the two t-bit inputs and how does the user get that information into your box?
 
Top