Computer Scientists? - Building logic addition circuit with MAX


    Apr 17 2006 | 8:37 pm
    Hello all,
    I am beginning to learn the Max environment for an introductory computer science course. My teacher doesn't use Max, so I am hoping someone here might be able to help (I am learning Max so I can use it with my artwork - teleo!!!)...
    I am trying to build an addition circuit using logic gates (&&, ||, and external notX(attached)). My problems is that I do not have a great handle on the whole right-to-left thing, and can't get the outputs correct with only one 'bang' - I have commented everything in the patch to explain the problem more clearly.
    Your help is GREATLY appreciated!!
    thanks much,
    tr
    ps: Thanks to opendragon.com for notX external
    max v2;

    • Apr 18 2006 | 5:46 am
      It's a right-to-left precedence problem. For instance the last && of
      (5) gets its left input from the rightmost notX, so it makes the
      calculation before getting its second operator (which is obviously
      not good).
      I suggest you to collect A B and C in a list (using [pack 0 0 0]),
      and recreate the boolean calculations for (1, 2, 3, etc.) in eight
      expr objects (see the help file) and give the A B C list to each expr
      object.
      For instance the expr for (8) would be [expr $i1 && $i2 && $i3], the
      expr for (7) woud be [expr $i1 && $i2 && ! $i3] (provided you have
      packed A B and C in alphabetic order, not C B and A).
      m
      HomePage: http://www.giri.it
      Computer Music Italian Forum http://www.virtual-sound.com
      --
    • Apr 19 2006 | 1:08 am
      Thanks for the advice! I will try this out.
      tr