# Thread: Use the 3-to-8 decoder to implement a 1 bit full adder.

1. What exactly is the question asking?

2.

3. (I assume this is some sort of home/course work, so I'm just going to give some hints...)

First, think about what a full adder is, and how it relates to the three inputs.

Then, look at the outputs required from the full adder (hint: write out the truth table; always a good starting point).

Finally, work out how to create those outputs by using the appropriate output bits of the decoder.

4. haha nevermind, i just searched google and i got my question done =)

but now, im having another problem with another question,

Create a C++ function that returns an increment of the input by 1. You may use loops or recursion for this question.
what is it asking?

my teacher says i cant use variable++; or variable=variable+1; or variable+=1;
how else can i do it?

so, im guessing

Code:
```float increment1 (float increasedby1 ) {
do something that increases the input value by 1 thats not 'variable++;' or 'variable=variable+1;' or 'variable+=1;'
return increasedby1;
}```
and loops... am i supposed to use them? i don think i even need to use them to increment a value by 1................

5. Originally Posted by RamenNoodles
haha nevermind, i just searched google and i got my question done =)
Well, I suppose that is one way of not learning anything. It would be more efficient to just drop out of school.

but now, im having another problem with another question,
Hah! That's a good one. I'm not going to give you any clues (because I can't think how to, without giving too much away ... <cough>loop<cough>).

6. Originally Posted by Strange
Originally Posted by RamenNoodles
haha nevermind, i just searched google and i got my question done =)
Well, I suppose that is one way of not learning anything. It would be more efficient to just drop out of school.
actually i read up google to understand it. i learn things hahaha...

7. Originally Posted by Strange
Hah! That's a good one. I'm not going to give you any clues (because I can't think how to, without giving too much away ... <cough>loop<cough>).
u trying to tell me to loop?

Code:
```float increment1 (float increasedby1 ) {
for(int plus1=0;plus1==1;plus1++){increasedby1++;}
return increasedby1;
}```
i used a for loop, but i still don't know of any other way to increment the input by 1 without using input++, input+=1, or input=input+1
help? thanks

8. yeah.. tested it and it works,
Code:
```	#include <iostream>
using namespace std;
float increment1 (float increasedby1 ) {for(int plus1=0;plus1==0;plus1++){increasedby1++;} return increasedby1;}
void main(void) {float asd; cin>>asd; cout << increment1 (asd);}```
but i cannot use ++ or += or input+1
i cant find in google any other way to add 1 to the input!!

9. subtact -1 ??

Ah I guess if you are learning about binary mathematics, then do it in binary

Start at the right hand bit,
if its 0, change it to 1 , end

if its 1, set it to 0, and carry

10. im referring to this: c++ : binary additionbut the person's code uses i++ and other operators i cant use. and why does his array an integer value type? not bool?

and also, is it possible to modify integers by editing its bitset? how do i go about doing it?

 Bookmarks
##### Bookmarks
 Posting Permissions
 You may not post new threads You may not post replies You may not post attachments You may not edit your posts   BB code is On Smilies are On [IMG] code is On [VIDEO] code is On HTML code is Off Trackbacks are Off Pingbacks are Off Refbacks are On Terms of Use Agreement