Help, please?

tshuck

Joined Oct 18, 2012
3,534
I think you'll learn from it. ;)

So, if you are to do the adder, start with your truth table. Write out all possible inputs and what your outputs will be (hint: what is the maximum output when adding two 2-bit numbers?).
 

tshuck

Joined Oct 18, 2012
3,534
I don't know where to start..
I've told you where to start: the truth table.

Okay, so you have a four bit input, right?

This means you need to make a table that has every possible combination for those for inputs. Then, you can go back and fill in the outputs
Is it 1111?
What is the maximum value for 2-bit binary?
binary 11 = ? in decimal? And if you add two 2-bit numbers, the maximum result is ...? How many bits does it take to represent that number? Those are your outputs...
 

Thread Starter

brahms

Joined May 9, 2014
32
Okay okay.. let's start with the 2-bit binary..

A 1 input 2 binary number is like this right? >> 00, 01, 10, 11? Am i Right? If i we're to name this input as A1, is this A1 alone? Or is this A1 and A0? And 11 in decimal is 1?

A1 A0 B1 B0
00 00 00 01

or is it this way?

A1 A0 B1 B0 F
0 0 0 1 1

Or i got it all wrong?
 

tshuck

Joined Oct 18, 2012
3,534
Okay okay.. let's start with the 2-bit binary..

A 1 input 2 binary number is like this right? >> 00, 01, 10, 11? Am i Right? If i we're to name this input as A1, is this A1 alone? Or is this A1 and A0? And 11 in decimal is 1?

A1 A0 B1 B0
00 00 00 01

or is it this way?

A1 A0 B1 B0 F
0 0 0 1 1

Or i got it all wrong?
Okay, so, your adder will add two numbers together: A & B, where A and B are two bit numbers and A is comprised of {A1,A0} (A1 concatenated with A0) and B is {B1,B0}.

So, your truth table should look something like
A1|A0|B1|B0|sum
0|0|0|0
0|0|0|1
0|0|1|0
0|0|1|1
0|1|0|0
0|1|0|1
0|1|1|0
0|1|1|1
1|0|0|0
1|0|0|1
1|0|1|0
1|0|1|1
1|1|0|0
1|1|0|1
1|1|1|0
1|1|1|1
 

Thread Starter

brahms

Joined May 9, 2014
32
Thank you, I was right on the second then =) So, if A1 A0 and B1 B0 are A & B, so these four inputs are only represented by 2 switches? A1 as ON and A0 as OFF? same on the B?

Also, how will I answer the truth table? Should I just simply add them?
 

tshuck

Joined Oct 18, 2012
3,534
Thank you, I was right on the second then =) So, if A1 A0 and B1 B0 are A & B, so these four inputs are only represented by 2 switches?
With two 2-bit numbers, you'd have a total of four inputs: A1, A0, B1, and B0.

A1 as ON and A0 as OFF? same on the B?
How would you add them? These are variables, each having the 4 possible combinations that you can have with a 2-bit number.

Also, how will I answer the truth table? Should I just simply add them?
Yes, add the two numbers A and B and put their result as a sum, but you need to figure out what the maximum value the sum can have so you know how many bits you need for it.
 

tshuck

Joined Oct 18, 2012
3,534
Can you please teach me how to add a 2-bit binary number sir?
It's the same as in decimal, with the only exception being that instead of a digit having possible values 0-9, you have bits having possible values of either 0 or 1.

So, 10 in binary is 2 and 01 is 1.

So, \(10_{2} + 01_{2} = 2_{10} + 1_{10} = 11_{2} = 3_{10}\)

It is the same method for all the other values.

Edit: see the eBook for more information, if necessary.
 

WBahn

Joined Mar 31, 2012
30,052
Then the answer in the above truth table that you gave would be
0
1
1
2
1
2
3
4
2
3
4
5
3
4
5
6

Right? hehe
Are these in binary? Remember, the point was to determine how many bits you need your output to have.

So, how many bits do you need your output to have?
 

Thread Starter

brahms

Joined May 9, 2014
32
It take 110, so 3 bits? Right? And how will i represent this into two bits? if two bits binary is only 11 which is = 3?
 

WBahn

Joined Mar 31, 2012
30,052
yup, i'm trying to learn how to add 2 bit binary numbers and we're starting at the truth table above. 2 bit binary adder
Okay, so what have you learned thus far? What are your inputs (and how many bits is each) and what are your outputs (and how many bits is each)?
 

Thread Starter

brahms

Joined May 9, 2014
32
Well, my inputs A and B have 2-bits, where in each bit is represented by 0 or 1, off or on. A0, A1, B0, B1.. Now the outputs is where we are now sir, i answered the truth table and gave the sums in decimal. I don't know how to represent 7 different values, from 0 through 6 with two bits..
 

WBahn

Joined Mar 31, 2012
30,052
I don't know how to represent 7 different values, from 0 through 6 with two bits..
But why are you TRYING to?

If you need more than 2 bits to represent your possible output values, then why not use more than 2 bits to represent your output?
 
Top