ALU / Full Adder Homework Problem

Thread Starter

Gotmilk0112

Joined Mar 24, 2013
32
I'm guessing Y = 1, because we've got B, B' and 0, and because in the partially-completed table I've got, Cin=0 S=1 yields Y = 1.

So that gives me a completed Y column in my truth table:

Rich (BB code):
S Bi Cin   Y
0  0  0    0
0  0  1    0
0  1  0    1
0  1  1    0
1  0  0    1
1  0  1    1
1  1  0    1
1  1  1    0
And K-mapping that gives me a result of Y = S*Bi' + Bi*Cin'
 

WBahn

Joined Mar 31, 2012
29,979
A-B = Subtract = A + B' + 1, so Y = B'
A note on notation. The apostrophe as a boolean operator is generally limited to a single bit. When you mean a bit-by-bit (or bitwise) inversion of a multi-bit value, we typically use the tilde, so ~B.

Notice that the '+' in the above expression is not the boolean OR operator, it is the addition operator. Addition and OR are very different things. Similarly, B' and ~B are very different things. The first is the logical negation and the second is the bitwise negation.
 

WBahn

Joined Mar 31, 2012
29,979
I'm guessing Y = 1, because we've got B, B' and 0, and because in the partially-completed table I've got, Cin=0 S=1 yields Y = 1.

So that gives me a completed Y column in my truth table:

Rich (BB code):
S Bi Cin   Y
0  0  0    0
0  0  1    0
0  1  0    1
0  1  1    0
1  0  0    1
1  0  1    1
1  1  0    1
1  1  1    0
And K-mapping that gives me a result of Y = S*Bi' + Bi*Cin'
Don't guess.

Remember, Y is a multi-bit value. If your circuit is working with, say, 4-bit values, then Y=1 means that you are saying you want Y=0001 in binary. Is this really what you want?

What do you want it to be in decimal? Remember, taking Cin into account, you have as your output

F = X + Y + Cin

You want

F = A - 1

What do you need Y to be?
 

Thread Starter

Gotmilk0112

Joined Mar 24, 2013
32
Well, like I said, I didn't just completely guess; I have a partially-completed chart from class of this same problem, and S=1 Cin=0 yielded a Y of 1.
 

WBahn

Joined Mar 31, 2012
29,979
But do you understand WHY that partially completed chart has what it has?

Again, Y (like B) is a multi-bit value. So are you saying that, for a 4-bit system, you want Y=0001?

Let's see if that works:

F = X + Y + Cin

X = A, Y = 1, Cin = 0

Doesn't that give you

F = A + 1 + 0 = A+1

Or just another way to perform an increment?

The problem is that you are not distinguishing between single-bit and multi-bit values.

At the end of the day, your table is correct, but only by coincidence.

Somehow I doubt you would rush back to the same doctor that correctly diagnosed your illness were you to discover that it was only by coincidence because they happened to misspell the wrong symptom they had intended to look up in their Physician's Desk Reference and the misspelled word happen to be the correct sympton. The same applies in engineering.
 

Thread Starter

Gotmilk0112

Joined Mar 24, 2013
32
Uh...for the record, the question states that the two inputs, A and B, are n-bit, not 4-bit.

But anyways, now that I've got the k-map set up, where do I put that logic, on the diagram? Seeing as I'm supposed to have two stages, I'm guessing that for the first stage, I use the logic where Cin=0, and then connect that diagram to the next stage, using the logic where Cin=1?
 

WBahn

Joined Mar 31, 2012
29,979
Uh...for the record, the question states that the two inputs, A and B, are n-bit, not 4-bit.
I realize that, which is why I indicated that the 4-bit discussion was by way of example. The only value of n for which your solution is not a coincidence is for n=1.

But anyways, now that I've got the k-map set up, where do I put that logic, on the diagram? Seeing as I'm supposed to have two stages, I'm guessing that for the first stage, I use the logic where Cin=0, and then connect that diagram to the next stage, using the logic where Cin=1?
Here you go guessing again. And this time you are wrong. And it comes back to your refusal to do what I asked for at the very beginning, which was to draw the circuit for a multi-bit adder using full adders as your building blocks. But you want to keep just rushing past the stuff you don't understand and it just keeps biting you in the ass down the road.

In class, that approach costs you points and grades. Out in the real world, that approach is going to get people killed, so if that is going to continue to be the way you want to approach engineering, please get the hell out of it.

Now, if you want me to continue helping you, draw the circuit for a multi-bit adder using full adders as your building blocks. Draw it for n=3.
 

Thread Starter

Gotmilk0112

Joined Mar 24, 2013
32
But you want to keep just rushing past the stuff you don't understand and it just keeps biting you in the ass down the road.
I understand multi-bit adders, as I already pointed out. I know how Full Adders and Ripple Adders work and such.

Not understanding one thing is not "rushing past everything I don't understand".

In class, that approach costs you points and grades. Out in the real world, that approach is going to get people killed, so if that is going to continue to be the way you want to approach engineering, please get the hell out of it.
And for the record, I'm not an Engineer, my concentration is Software Development. And I'm kinda like, you know, a student, so of course I'm not going to know everything. No need to get all hostile, jeez.
 

WBahn

Joined Mar 31, 2012
29,979
I understand multi-bit adders, as I already pointed out. I know how Full Adders and Ripple Adders work and such.
Apparently you don't, not if you are talking about setting the values for the Cin inputs for anything other than the first stage.

Not understanding one thing is not "rushing past everything I don't understand".
You've done it at every opportunity thus far, so there is a definite pattern there. Prove me wrong by simply stopping it.

And for the record, I'm not an Engineer, my concentration is Software Development. And I'm kinda like, you know, a student, so of course I'm not going to know everything. No need to get all hostile, jeez.
You don't think that people have died when software developers have taken to "guessing" and failing to make the effort to understand what their code is supposed to be doing? As for being a student, part of being a student is learning how to be a professional. At what point are you supposed to start trying to understand what you are doing? Will it magically happen once you have your degree? Or will you start taking it seriously only after a few plane loads of people have died because of your software bugs?

Since it is obvious you have no intention of doing the very simple thing I requested, I am done with you.
 

Wendy

Joined Mar 24, 2008
23,415
Schematics are the true language of electronics. You need to show what you are talking about, otherwise folks are just guessing. As you can see, engineers are a very conservative bunch, they detest guessing.
 

Papabravo

Joined Feb 24, 2006
21,159
Apparently you don't, not if you are talking about setting the values for the Cin inputs for anything other than the first stage.



You've done it at every opportunity thus far, so there is a definite pattern there. Prove me wrong by simply stopping it.



You don't think that people have died when software developers have taken to "guessing" and failing to make the effort to understand what their code is supposed to be doing? As for being a student, part of being a student is learning how to be a professional. At what point are you supposed to start trying to understand what you are doing? Will it magically happen once you have your degree? Or will you start taking it seriously only after a few plane loads of people have died because of your software bugs?

Since it is obvious you have no intention of doing the very simple thing I requested, I am done with you.
This from a man with the patience of Job. Time for sackcloth and ashes. I greatly admire your fortitude.
 

Thread Starter

Gotmilk0112

Joined Mar 24, 2013
32
Some "homework help" forum this is. Ask for help and get elitists raging and flaming you for not knowing everything. Yeesh. Never coming back here.

inb4 "good riddance" and such
 
Top