0
\$\begingroup\$

Design a sequential digital circuit that detects a 4-BCD digits password. Assume that you are using # as an enter key where the password will be decided, by your circuit, to be right (output =1) or wrong (output = 0). Assign an unused BCD code for #. Assume that the password is 3542

I tried to solve it by converting each one of them to BCD , then I made the state diagram . But the the problem is I don't know how to do this state diagram correctly . Does anyone have any idea ?

By the way I don't need a code , I want to know theoretically what happens

\$\endgroup\$
  • 3
    \$\begingroup\$ Add the state diagram you currently have so we can see your progress so far. What BCD value did you assign to the # key? \$\endgroup\$ – David Dec 18 '13 at 15:53
  • \$\begingroup\$ If you don't know shift registers yet, which kind of logic parts do you know? \$\endgroup\$ – Geert Goeteyn Dec 18 '13 at 16:14
  • 1
    \$\begingroup\$ Come up with a state diagram...even if it's super wrong, it will be a starting point. \$\endgroup\$ – dext0rb Dec 18 '13 at 16:17
1
\$\begingroup\$

Each time you enter a code, shift it (the 4-bits) into an 16-bit shift register. Use a 4-bit compare to detect the "#" code, and when you have a match there, latch the output of a 16-bit comparator which compares the last 4 digits with the correct code, that's the 4 digits in the 16-bit register.

\$\endgroup\$
  • \$\begingroup\$ what is shift register? I think we can do it in another way , since we didn't take it yet \$\endgroup\$ – user3096919 Dec 18 '13 at 16:02
  • \$\begingroup\$ A shift register is a string of flipflops which store the status of a number of bits, here 16. Upon a clock pulse, all bits are shifted to the right, and the new digit is shifted in. That way it will always hold the latest 4 digits entered. If you have to it's possible without shift registers, but then it becomes much more complicated. \$\endgroup\$ – amadeus Dec 18 '13 at 16:06
  • \$\begingroup\$ Make sure to clear the shift register when you hit the '#' key. Otherwise your system is significantly easier to break into. I believe some car door keypads had this vulnerability. \$\endgroup\$ – Samuel Dec 18 '13 at 17:32
  • \$\begingroup\$ @amadeus: I'm not sure that a lack of shift registers would make things harder, since a shift register is nothing other than a set of latches which feed each other. \$\endgroup\$ – supercat Jul 9 '14 at 15:14
  • \$\begingroup\$ @Samuel: If one uses four 5-bit shift registers (or 5 cascaded 4-bit latches) and has the # key get shifted in like any other, I don't think it's necessary to clear the latches since a circuit set for 1234# would only open when the last five entries were one, two, three, four, and pound, in that order. \$\endgroup\$ – supercat Jul 9 '14 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.