Hitchhiker's Guide to the WaveDrom (Part 2)

Logic Circuit Diagram

Element "assign" is an array of logic circuit diagrams. Each diagram by itself is an array, where first element is the name of circuit output, and the second element is the tree of logical operators.
{ assign:[
  ["o0", [Tree0]],
  ["o1", [Tree1]],
  ...
]}
Tree of logical operators has operator string as first element and operands for the each next element. Operand by itself can be a tree. See some examples below.

XOR Gate

{ assign:[
  ["out",
    ["|",
      ["&", ["~", "a"], "b"],
      ["&", ["~", "b"], "a"]
    ]
  ]
]}

Binary to Gray

{ assign:[
  ["g0", ["^", "b0", "b1"]],
  ["g1", ["^", "b1", "b2"]],
  ["g2", ["^", "b2", "b3"]],
  ["g3", ["=", "b3"]]
]}

Gray to Binary

{ assign:[
  ["b3", "g3"],
  ["b2", ["^", "b3", "g2"]],
  ["b1", ["^", "b2", "g1"]],
  ["b0", ["^", "b1", "g0"]]
]}

74LS688

{ assign:[
  ["z", ["~&",
    ["~^", ["~", "p0"], ["~", "q0"]],
    ["~^", ["~", "p1"], ["~", "q1"]],
    ["~^", ["~", "p2"], ["~", "q2"]],
    "...",
    ["~^", ["~", "p7"], ["~", "q7"]],
    ["~","~en"]
  ]]
]}

IEC 60617 Symbols

{ assign:[
  ["out",
    ["XNOR",
      ["NAND",
       	["INV", "a"],
        ["NOR", "b", ["BUF","c"]]
      ],
      ["AND",
       	["XOR", "d", "e", ["OR","f","g"]],
        "h"
      ]
    ]
  ]
]}
Fork me on GitHub