Multiplexer 4-bit to hex-code und demultiplexer.

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    The multiplexer is easy.

    1: just have a button next to one of 16 display blocks containing "[ADD]0123456789abcdef"
    2: and activate that button when {"x,x,x,x" activation->not} equals 0-f
    0 == not 1, not 1, not 1, not 1
    3 == not 1, not 1, act 1, act 1

    The demultiplexer is a bit more difficult, becaues I forgot whre the complete tutorial is - assuming we ever had one.
    I wish I could print out a cheat-sheet.
    Like this one for regex: https://www.cheatography.com/davechild/cheat-sheets/regular-expressions/pdf/


    I am about to give up on the task to create a hard-drive reading into a cache.
    The cache has a flip-flop and an AND-block per bit, the hard-drive stores content in display blocks.
     
    Last edited:
    Joined
    Jul 30, 2013
    Messages
    398
    Reaction score
    282
    • Wired for Logic Gold
    • Legacy Citizen 8
    • Purchased!
    Yeah, multiplexer are easy, i think i have some designs anywhere, if you need a more deep explication or tutorial let me know
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    By using something like:
    Code:
    [REPLACEALL]\A([01-9a-f])(.*)[WITH]$1
    [REPLACEALL]\A([01-9a-f])(.*)[WITH]$2
    Until the character matches an empty ""

    The problem with this approach is that the last character gets detected twice.
    Once when copying the $1 to $2-display and once when replacing with $2
     
    Last edited:

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    How many hex-digits can a display block store? A lot!

    That's why I try to build a display-storage-memory which
    1. reads/writes: arbitary indexes in a display module.
    2. loads from/saves into: different display modules accessed by an index.
    3. does above as fast as possible with max 120% of fewest blocks possible.
    And when I have experience, I ofc build a database with key=value. But that can take a while or never.
     
    Joined
    Jul 30, 2013
    Messages
    398
    Reaction score
    282
    • Wired for Logic Gold
    • Legacy Citizen 8
    • Purchased!
    I have tried to do that same, build a memory using display blocks ... but the problem is, that each display block needs to have its own code to access it, using sensor blocks to compare the access code.

    The BIG PROBLEM is, the display blocks have an error since they were implemented, and that is that they lose the text that they have inside, if you copy & paste or add more "cells" of memory, you have to "force" the saved, if not the information is lost, and knowing that you can have "thousands" of memory cells ... imagine losing "thousands" of information cells, and having to build the "index" from scratch.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    New I have tried to do that same, build a memory using display blocks ... but the problem is, that each display block needs to have its own code to access it, using sensor blocks to compare the access code.
    What is the problem here?
    Needing a sensor and 1 or 2 AND blocks and buttons per display block when the display could store at least 128 hex digits?
    if you copy & paste or add more "cells" of memory, you have to "force" the saved
    Can you elaborate please?
    I never run into that bug. Does it lose text when getting unloaded if the text was entered by logic?
     

    Jaaskinal

    ¯\_(ツ)_/¯
    Joined
    Jan 19, 2014
    Messages
    1,377
    Reaction score
    646
    • Legacy Citizen 4
    • Wired for Logic Gold
    • Thinking Positive
    I did something like this with the Nasometer, but it was really space expensive so I wouldn't recomend doing it exactly the same way I did.

    To read, the easiest way I found was to just delete the last (or first, or any position) charachter, and replace it with all other 16 charachters. After that, you can use sensors to compare the original and all 16 variations, whichever is the same is the charachter in that position.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Perhaps you could convert activation-block bits into numbers usable by regex to filter a position in display blocks.
    You'll need a flexible replace position x with y and a get y at pos x.


    Code:
    read = copy & "[REPLACEALL]([01-9a-f]{" + "index" + "})([01-9a-f])([01-9a-f]*)[WITH](" + "x" + ")"
    write = "[REPLACEALL]([01-9a-f]{" + "index" + "})([01-9a-f])([01-9a-f]*)[WITH]($1)(" + "x" + ")($3)"
    
    // just insert a number instead of the underscore
    [replaceall](.*\{)[01-9]*(.*)[with]$1_$2
    GalactusX Jaaskinal
    Do you think it is sufficient to re-construct a regex with the third example to index data-sets inside a display block?
     

    Attachments

    Last edited: