[HELP] More/less than etc. checker

  • Aloysius1234
    1st Aug 2014 Member 0 Permalink

    For XNOR, I just need 2 XORs and a battery.

     

    Now all I do is looking a way to make my own digital comparator.

     

     

    Can somebody help me?

    Edited once by Aloysius1234. Last: 1st Aug 2014
  • iamdumb
    1st Aug 2014 Member 0 Permalink

    @Sandwichlizard (View Post)

     It's good, but probably isn't compact enough to make a computer.

     

    @Aloysius1234 (View Post)

     Where are you going to get an XOR then?

  • arK
    1st Aug 2014 Member 1 Permalink

    @Aloysius1234 (View Post)

    What are you doing?

     

    You need an ALU, zero flag (ZF) and carry flag (CF). ALU should set ZF when result == 0, CF is just carry output of the last (most significant) full adder.

    Now you can compare numbers A and B by subtracting B from A with ALU and checking ZF and CF.

    ZF == 0 and CF == 0 -> A-B < 0 -> A < B
    ZF == 0 and CF == 1 -> A-B > 0 -> A > B

    ZF == 1 or CF == 0 -> A-B <= 0 -> A <= B
    ZF == 1 or CF == 1 -> A-B >= 0 -> A >= B

    Use XOR instead of subtraction for [in]equality test.

    ZF == 1 -> A^B == 0 -> A == B
    ZF == 0 -> A^B != 0 -> A != B

     

    btw...

     

    > G-LinuxorU, and I have each made very reliable AND gates

    > And Aloysius needs an X-NOR gate.

    > here is my new X-NOR.

     

    Standalone "real-world" gates are pretty much useless in TPT.

    Edited once by arK. Last: 1st Aug 2014
  • Sandwichlizard
    1st Aug 2014 Member 0 Permalink

    @ark.  you do awesome work, however I disagree that they are useless.  maybe if you want to make a computer they are too big but for some saves they are perfect.  and its FUN to try and make them work well. :D

  • arK
    1st Aug 2014 Member 0 Permalink

    Fun is a relative concept. Gates will be completely useless when next version comes out because ARAY will interact with FILT just like PHOT.

  • Sandwichlizard
    3rd Aug 2014 Member 0 Permalink

    I updated my XNOR, its much smaller.  not tiny but still much smaller.  I improved the NOT gate and I got rid of one of them and one AND.  now its just 1 AND gate with each input in parrallel (diode protected) with the NOT gate.  

  • dom2mom
    3rd Aug 2014 Member 0 Permalink

    @arK (View Post)

     Wait...... Don't mean to sound dumb here, but are you saying they are going to remove basically the entire electronic component of ARAY?? That would break the majority of electronic saves.... I'm probably making a fool of myself, so could you explain what you mean by this change to ARAY?

  • iamdumb
    3rd Aug 2014 Member 0 Permalink

    @dom2mom (View Post)

     

    It means you'll be able to do something like

    With ARAY instead of PHOT.

  • arK
    3rd Aug 2014 Member 0 Permalink

    @dom2mom (View Post)

    No, ARAY will be even more powerful for electronics, so powerful that PHOT, gates and lots of other electronic stuff becomes obsolete.

     

    90.0 beta is here, go check it out :)

  • dom2mom
    3rd Aug 2014 Member 0 Permalink

    @arK (View Post)

     Oh, ok. I thought for a second you were saying that FILT would just color ARAY and not allow for electronic uses *phew*