Flip Flop Challenge!

  • cip
    6th Feb 2012 Member 0 Permalink
    The challenge is to make the smallest possible JK flip-flop (well it's not a traditional flip-flop, see below). Here are my own designs for inspiration. The smallest I could make was 4x6:


    The specifications are:
    - When input A is sparked, the internal state should change to "A".
    - When input B is sparked, the internal state should change to "B".
    - When input A and B are sparked simultaneously, the internal state should toggle (if A it becomes B, if B it becomes A).
    - When (and only when) the state changes from A to B, a single spark should come out output 2.
    - When (and only when) the state changes from B to A, a single spark should come out output 1.

    This is not a "traditional" JK flip-flop because it only sends a single spark out on state change, rather than a continuous stream of sparks representing the internal state.

    The rules are:
    - It is OK to swap outputs 1 and 2 - that's arbitrary.
    - Your circuit must take sparks as input and produce sparks as output (as opposed to BRAYs).
    - No WIFI.

    Also, ideally, it should work regardless of heat sim settings.

    I'm really curious to see other people's designs for these.

    The goal is to make the smallest flip-flop possible, with good performance. 

    In the above save I have some specs for the flip-flop designs:
    - Size: The size.
    - Area: Width * height.
    - Parts: Number of non-empty cells in the area.
    - Delay: Number of frames after input it takes for the output to spark. Separate numbers for A/B.
    - Reset: Minimum number of frames after input that another input may arrive and get a response. Separate numbers for A/B.

    You can use the scope at the bottom to check your delay/reset performance.

    The prize is: A warm fuzzy feeling!

    -C
  • lillepallt
    6th Feb 2012 Member 0 Permalink
    aka truthtable?:

    A B A>B B>A | A B 1 2 A>B B>A
    1 0 0 0 1 0 0 0 0 0
    0 1 0 0 0 1 0 0 0 0
    1 1 0 0 0 0 0 0 IF B IF A
    0 1 1 0 0 0 0 1 0 0
    0 0 0 1 0 0 1 0 0 0

    EDIT: btw html mess with my spaces, try to clear that up if u can..
  • cip
    6th Feb 2012 Member 0 Permalink
    A    B    A>B    B>A        A    B    1    2    A>B    B>A
    1 0 0 0 1 0 0 0 0 0
    0 1 0 0 0 1 0 0 0 0
    1 1 0 0 0 0 0 0 IF B IF A
    0 1 1 0 0 0 0 1 0 0
    0 0 0 1 0 0 1 0 0 0


    Press the "show source" button in the post editor and enclose in <pre> tags. I didn't double-check your values; I just formatted it.

    You can also find a transition table on Wikipedia, it is more appropriate than a basic truth table for circuits that maintain an internal state.

    Looking back, I guess this was kind of a boring challenge, huh. I think I just wanted an excuse to show off my 4x6 version (and also to draw some buttons with the decoration editor), lol.

    -C
  • massey101
    6th Feb 2012 Member 0 Permalink
    To be honest I doubt that anyone is going to be able to improve on that :D. That's an excellent solution. 
  • OmegaSupreme
    6th Feb 2012 Member 0 Permalink

    HEY!

    I made a 5x4 Version that works fine, but it always triggers the BOTH bottom nodes, no matter if you press A, B, or AB.

    If you can get it to work, You take the Credit, I take the design. Deal?

    Just look in the "Try Your Own" Box. sorry that I couldn't make its stats.