0 Even 1 Even 2 Even

Discussion in 'Homework Help' started by chroncile, Apr 8, 2010.

  1. chroncile

    Thread Starter New Member

    Mar 27, 2010
    13
    0
    Our teacher put up an example of a good question on a test and I don't understand it, can anyone please explain it to me?

    Here it is:

    [​IMG]
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Depending on the number keys pressed on the two keyboards, there can be 0, 1 or 2 even numbers being output.

    You might find that some circuitry between the keyboards and the displays could make that determination.
     
    Last edited: Apr 8, 2010
  3. chroncile

    Thread Starter New Member

    Mar 27, 2010
    13
    0
    Huh? That didn't explain anything :(
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    It explains the conditions that the indicators are supposed to show. The test is to produce the circuitry that will light one of the three indicators depending on which of the keys are pressed.
     
  5. chroncile

    Thread Starter New Member

    Mar 27, 2010
    13
    0
    Ok so here is what my teacher did:

    [​IMG]

    I really don't understand what's going on, can you please explain it to me in the simplest way and can you use examples too, please?

    Thanks
     
  6. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,694
    904
    Apparently, low is on (asserted); high is off. For all even numbers, the zero (2^0) bit will be high. If both inputs to the AND gate are high, then there are two even numbers -- one on each keyboard -- pressed, and so forth.
    John
     
  7. chroncile

    Thread Starter New Member

    Mar 27, 2010
    13
    0
    I only understood half of what you said; can you please explain it again in simpler words?

    Thanks
     
  8. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,694
    904
    Which half?

    John

    Edit: I did not look at all the gates. Having now done so, I don't understand why the top gate is not a simple NOR. I don't understand the XNOR either.
     
    Last edited: Apr 8, 2010
  9. chroncile

    Thread Starter New Member

    Mar 27, 2010
    13
    0
    When you said for all even numbers, the zero bit will be high. So, does that mean that 2^2 is high?
     
  10. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Think about binary numbers. What distinguishes an odd number form one that's even?

    As far as gates go, try our Ebook material. Learning the functions is critical to digital electronics.
     
  11. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,694
    904
    Re: post#9: It doesn't matter. All that circuit is looking at, as I understand it, is 2^0. See my edit to post #8.

    John
     
    Last edited: Apr 8, 2010
  12. chroncile

    Thread Starter New Member

    Mar 27, 2010
    13
    0
    Well, an odd number always ends with a 1, i.e. 0001 or 1001 or 1011

    I understand the gates, but I just don't understand this. Please, someone explain it to me. :(
     
  13. Papabravo

    Expert

    Feb 24, 2006
    10,144
    1,791
    Taking a step back and looking at the problem in an overall sense.

    You have two keyboards and three indicators. The purpose of the exercise is to develop an answer to the question: "How many even numbered keys are being depressed"? This assumes that you can't have two or more keys depressed on a single keyboard.

    This means that there are three possible answers:

    1. Zero even numbered keys are being depressed
    2. One even numbered key is being depressed. It could be on either of the two keyboards.
    3. Two even numbered keys are being depressed. One key on each of the two keyboards.
    That takes care of the indicators. The remaining piece of information is the coding of the sixteen keys: The following table may help:
    Code ( (Unknown Language)):
    1.  
    2. Digit |    Bit
    3.       |  3 2 1 0
    4. -----------------
    5.   0   |  0 0 0 0
    6.   1   |  0 0 0 1
    7.   2   |  0 0 1 0
    8.   3   |  0 0 1 1
    9.   4   |  0 1 0 0
    10.   5   |  0 1 0 1
    11.   6   |  0 1 1 0
    12.   7   |  0 1 1 1
    13.   8   |  1 0 0 0
    14.   9   |  1 0 0 1
    15.   A   |  1 0 1 0
    16.   B   |  1 0 1 1
    17.   C   |  1 1 0 0
    18.   D   |  1 1 0 1
    19.   E   |  1 1 1 0
    20.   F   |  1 1 1 1
    21.  
    Does that add a bit of clarity to the situation?
     
  14. chroncile

    Thread Starter New Member

    Mar 27, 2010
    13
    0
    Yeah, I think I got it; I used an AND for the 0 even numbers indicator, a XOR gate for 1 even numbers and two NOTs and an AND gate for 2 even numbers.
     
Loading...