Digital Logic Basics - Creating simply lock mechanism

Discussion in 'Homework Help' started by whisky2g, Apr 14, 2016.

  1. whisky2g

    Thread Starter New Member

    Apr 14, 2016
    3
    0
    I'm not sure where else I can ask a question like this, I've been searching around and can't seem to find a proper place to ask about basic digital logic.
    I'm doing a computer science course and have been practising basic circuit designs online.


    I've been given a problem where I have to make simple key and lock mechanism where I have three lock inputs and three key inputs and if the key input matches the lock an LED will light up. It says I can only use AND NOT and OR gates and to use a decoder.


    I've made a start but it's probably far from right:
    http://i.imgur.com/xrJLyx6.png

    Would I need to use a 3-8 decoder? I'm not sure how this can be done, would like any hint
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    Are the lock and key inputs to be treated as a three-bit value? That's the best guess I can make.

    In your diagram what are the lock inputs and what are the key inputs? The best guess I can make is that the top row is one and the bottom row is the other. Sure would be nice if you put labels on your diagram instead of assuming that we are mind readers.

    What is your reasoning for ANDing the three top inputs together? And for doing it three times?

    What is the logic that used the bottom inputs supposed to be accomplishing?

    Finally, it is highly recommended that you post your image here, instead of linking to a third-party server. One, lots of people won't follow links, and two, if the image is archived here then it will remain accessible. What if the third party server goes out of business of your account is closed?
     
  3. whisky2g

    Thread Starter New Member

    Apr 14, 2016
    3
    0
    Yes they are three-bit value.
    I did originally have them labelled - the locks are the bottom three whilst the key is the top three.
    Didn't really have a solid reasoning for ANDing the top three aparting from abiding the rules of only using AND, OR, NOT.

    I was thinking that the top part being the selector and bottom being a decoder I could use a multiplexor? But it doesn't say anything about that
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    So it sounds like you are doing design-by-happening. You are putting together a random circuit and hoping that it happens to work.

    Instead, think about how YOU would do it. How would you describe how to determine if the two inputs are the same to a five year old?
     
  5. whisky2g

    Thread Starter New Member

    Apr 14, 2016
    3
    0
    ***Edited image out.

    Got the answer, bottom decoder is same as first one.
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,757
    4,800
    Huh?
     
Loading...