Notices
Results 1 to 9 of 9

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

  1. #1 Use the 3-to-8 decoder to implement a 1 bit full adder. 
    Forum Ph.D.
    Join Date
    Jan 2013
    Posts
    926
    What exactly is the question asking?


    Quote Originally Posted by jocular View Post
    If thy right nipple offend thee, pluck it off! Goes for the other, too!
    Reply With Quote  
     

  2.  
     

  3. #2  
    Brassica oleracea Strange's Avatar
    Join Date
    Oct 2011
    Location
    喫茶店
    Posts
    16,825
    (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.


    ei incumbit probatio qui dicit, non qui negat
    Reply With Quote  
     

  4. #3  
    Forum Ph.D.
    Join Date
    Jan 2013
    Posts
    926
    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................
    Last edited by RamenNoodles; May 31st, 2013 at 12:10 PM.
    Quote Originally Posted by jocular View Post
    If thy right nipple offend thee, pluck it off! Goes for the other, too!
    Reply With Quote  
     

  5. #4  
    Brassica oleracea Strange's Avatar
    Join Date
    Oct 2011
    Location
    喫茶店
    Posts
    16,825
    Quote Originally Posted by RamenNoodles View Post
    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>).
    ei incumbit probatio qui dicit, non qui negat
    Reply With Quote  
     

  6. #5  
    Forum Ph.D.
    Join Date
    Jan 2013
    Posts
    926
    Quote Originally Posted by Strange View Post
    Quote Originally Posted by RamenNoodles View Post
    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...
    Quote Originally Posted by jocular View Post
    If thy right nipple offend thee, pluck it off! Goes for the other, too!
    Reply With Quote  
     

  7. #6  
    Forum Ph.D.
    Join Date
    Jan 2013
    Posts
    926
    Quote Originally Posted by Strange View Post
    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
    Quote Originally Posted by jocular View Post
    If thy right nipple offend thee, pluck it off! Goes for the other, too!
    Reply With Quote  
     

  8. #7  
    Forum Ph.D.
    Join Date
    Jan 2013
    Posts
    926
    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!!
    Quote Originally Posted by jocular View Post
    If thy right nipple offend thee, pluck it off! Goes for the other, too!
    Reply With Quote  
     

  9. #8  
    Forum Freshman
    Join Date
    May 2013
    Posts
    13
    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
    Last edited by Isilder; June 4th, 2013 at 04:58 AM.
    Reply With Quote  
     

  10. #9  
    Forum Ph.D.
    Join Date
    Jan 2013
    Posts
    926
    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?
    Quote Originally Posted by jocular View Post
    If thy right nipple offend thee, pluck it off! Goes for the other, too!
    Reply With Quote  
     

Similar Threads

  1. ! a bit stumped
    By jakos01 in forum Biology
    Replies: 2
    Last Post: January 10th, 2013, 11:01 AM
  2. Just a bit of fun
    By Ascended in forum General Discussion
    Replies: 0
    Last Post: October 4th, 2012, 06:19 PM
  3. 3-to-8-line decoder
    By jackthomas in forum Computer Science
    Replies: 0
    Last Post: February 8th, 2011, 01:18 AM
  4. JPEG Decoder
    By inamdarabhishek1 in forum Computer Science
    Replies: 0
    Last Post: April 6th, 2008, 11:29 AM
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
  •