Rock, Paper, Scissors Game

Discussion in 'Homework Help' started by Strongbow, Nov 20, 2014.

  1. Strongbow

    Thread Starter New Member

    Nov 20, 2014
    I am tasked to design a rock, paper, scissor game using ttl 2 input gates and a DIP switch on my bread board. I cannot seem to quite get the logic together. It's designed so that an input of [11] from either player results in the 'error' LED illuminating, a tie has no results, a rock is [00], paper is [01], scissor is [10]. There's one LED for each player, which illuminates when the respective player wins the round. So three LED's total.So there's 4 inputs which I'm calling A, B, C, D. Player 1 is A,B and Player 2 is C, D. I've minimized the logic (hopefully correctly) to: Player 1= BC'+B'C+AD, and Player 2=BC+C'D'+A'D. I've attached the circuit simulation I have so far and my truth table.

    This is probably really simple. I'm really struggling in this class... any help is greatly appreciated. Thanks.
  2. WBahn


    Mar 31, 2012
    Your Truth Table looks fine.

    Without doing the logic minimization, your logic equations look suspicious.

    First off, think of the symmetry of the game. If I exchange A for C and B for D in the equation for one player, shouldn't that give me the equation for the other player?

    Second, how many of the sixteen possible combinations should result in the Player 1 LED lighting? How many of the sixteen possible combinations does the AND of two variables (e.g., BC' for instance) cover?

    Third, think of what one of your terms means in terms of the game. For example, BC'. The B means that Player 1 chose either paper or made an illegal choice while C' means that Player 2 either choice rock or paper. So the first term in your Player 1 equation says that Player 1 wins if (Player one chooses either paper or makes an illegal move) AND (Player 2 chooses either rock or paper). Does that make sense?

    Now, this is assuming that your choice coding is [AB] and [CD]. You never defined this and I had to guess. That isn't good because engineering is not about guessing. Define your system fully.

    Always ask if the answer makes sense.
  3. ihatereg2

    New Member

    Nov 30, 2014
    I would do separate Karnaugh maps for each of the outputs, being sure to put Xs in for invalid input combinations. Then, handle the error situations like this (AB+CD) ---> [error LED]. Then, to make your outputs truly "don't care" for invalid inputs, AND each output with (AB+CD)'