addition/subtraction negative number

Thread Starter

zaidsh

Joined Apr 20, 2015
12
Whats wrong with my circuit? its supposed to do addition if the c in is 0 and do subtraction if the c in is 1, the subtraction part doesnt function correctly if the result is negative??
 

Attachments

WBahn

Joined Mar 31, 2012
32,824
Whats wrong with my circuit? its supposed to do addition if the c in is 0 and do subtraction if the c in is 1, the subtraction part doesnt function correctly if the result is negative??
Why do you think the result is wrong?

What is (-1) - (3)?

What decimal value does a four-bit 2's complement bit pattern of (1100) represent?
 

Thread Starter

zaidsh

Joined Apr 20, 2015
12
First tell us what you think is wrong? What is it doing that it shouldn't? Or, more to the point, what do you believe it should be doing?
well the whole circuit is supposed to input two 4-bit numbers and :
1. output the larger number (no problem here).
2. either perform addition OR subtraction depending on the C in (if Cin = 0 its + , if Cin = 1 its -), the addition part works but the subtraction is just one big mess.
 

WBahn

Joined Mar 31, 2012
32,824
Again, WHY do you claim that the subtraction is one big mess? What are you basing that conclusion on?

In order to decide that it isn't working properly, presumably you know what you expect the output to be for a given set of inputs and you aren't seeing that.

Yet I can't get you to simply state what you expect to see and what you are actually seeing.

You have shown a circuit in which when you put in A=1111 and B=0011 and you set C to perform subtraction, namely (A-B), and you get an output of 1100.

What do you think the output SHOULD be?
 

Thread Starter

zaidsh

Joined Apr 20, 2015
12
Again, WHY do you claim that the subtraction is one big mess? What are you basing that conclusion on?

In order to decide that it isn't working properly, presumably you know what you expect the output to be for a given set of inputs and you aren't seeing that.

Yet I can't get you to simply state what you expect to see and what you are actually seeing.

You have shown a circuit in which when you put in A=1111 and B=0011 and you set C to perform subtraction, namely (A-B), and you get an output of 1100.

What do you think the output SHOULD be?
I remade the design and please notice the input this time if its 1-2 (0001 - 0010) then the output goes crazy HOW do I fix it to make it output the correct answer? thanks
 

Attachments

WBahn

Joined Mar 31, 2012
32,824
I remade the design and please notice the input this time if its 1-2 (0001 - 0010) then the output goes crazy HOW do I fix it to make it output the correct answer? thanks
I'm pretty sure you wouldn't know the correct answer if you saw it.

Again, yet one more time (and very possibly the last time), you keep saying things like "the output goes crazy". What does this mean? You obviously think that the result (1111) is wrong if you subtract 2 from 1. What do you believe the answer SHOULD be? If you don't know what the answer should be, then how can you possibly declare that the answer you are seeing is wrong?
 

Thread Starter

zaidsh

Joined Apr 20, 2015
12
I'm pretty sure you wouldn't know the correct answer if you saw it.

Again, yet one more time (and very possibly the last time), you keep saying things like "the output goes crazy". What does this mean? You obviously think that the result (1111) is wrong if you subtract 2 from 1. What do you believe the answer SHOULD be? If you don't know what the answer should be, then how can you possibly declare that the answer you are seeing is wrong?
I did admit that I'm guilty of being bad at this but I really REALLY need to finish this project or I will lose my scholarship so please tell me what does this output mean and is it correct ? thanks
 

MrChips

Joined Oct 2, 2009
34,809
What is the result of 1 - 2?
How would you represent this in binary notation?

Go back and study your lecture notes to find the answer.
 

WBahn

Joined Mar 31, 2012
32,824
I did admit that I'm guilty of being bad at this but I really REALLY need to finish this project or I will lose my scholarship so please tell me what does this output mean and is it correct ? thanks
Ask yourself why someone that is really bad at this deserves a scholarship for this?

Us just giving you answers is not going to help you. Most likely, the concepts you are missing (which are all basic concepts) were presented in your text or other reading material, were presented in class, and have been demonstrated via examples in both. Being spoon fed this stuff yet one more time isn't going to magically make it sink in. You need to fight and struggle with it so that you can learn it in a way that will let it make sense to the way that you think about things.

Frankly, the last thing I'm worried about is your scholarship -- the level of comprehension of the basic fundamentals that you are demonstrating are a pretty strong indicator that you do not deserve to keep your scholarship and that someone else would be much better served by that financial support. If you want to change that, then you are going to have to buckle down and put in the effort to learn those fundamentals instead of asking strangers to do the work for which you want to take the credit (and the scholarship).
 

Thread Starter

zaidsh

Joined Apr 20, 2015
12
Ask yourself why someone that is really bad at this deserves a scholarship for this?

Us just giving you answers is not going to help you. Most likely, the concepts you are missing (which are all basic concepts) were presented in your text or other reading material, were presented in class, and have been demonstrated via examples in both. Being spoon fed this stuff yet one more time isn't going to magically make it sink in. You need to fight and struggle with it so that you can learn it in a way that will let it make sense to the way that you think about things.

Frankly, the last thing I'm worried about is your scholarship -- the level of comprehension of the basic fundamentals that you are demonstrating are a pretty strong indicator that you do not deserve to keep your scholarship and that someone else would be much better served by that financial support. If you want to change that, then you are going to have to buckle down and put in the effort to learn those fundamentals instead of asking strangers to do the work for which you want to take the credit (and the scholarship).
id say you are correct if my major actually is about that material, im a buisness information technology student! I have no idea why do I have to take this because I'll never ever ever use it in my major, and just so you know I'm a straight A student its just this subject. so please stop talking like I stol someone's seat I earned this scholarship!
 

WBahn

Joined Mar 31, 2012
32,824
id say you are correct if my major actually is about that material, im a buisness information technology student! I have no idea why do I have to take this because I'll never ever ever use it in my major, and just so you know I'm a straight A student its just this subject. so please stop talking like I stol someone's seat I earned this scholarship!
Oh, I'm so sorry. I didn't realize that since you "earned" that scholarship, you are apparently entitled to have strangers do your work for you in a required course without any significant effort on your part to learn and demonstrate an understanding of the concepts as long as YOU decide that there is no reason for YOU to learn it. Now that we know that you are in a program that starts with the word "buisness", things make a lot more sense.
 

MrChips

Joined Oct 2, 2009
34,809
But you did say you are a student in "information technology".

This stuff is as basic as 1 + 1 = 2.

If you have no desire to master this stuff how can you call yourself a scholar?
 

WBahn

Joined Mar 31, 2012
32,824
But you did say you are a student in "information technology".

This stuff is as basic as 1 + 1 = 2.

If you have no desire to master this stuff how can you call yourself a scholar?
Isn't it amazing how some people don't have time to learn the basic concepts or answer basic questions about their assignment yet have plenty of time to go on at length about how they don't have time to learn the basic concepts and about how they will never need it?
 
Top