Attached below is a pair of logic circuit diagrams that I've put together.

  1. The first is the original, pieced together from SVGs and PDF annotation tools.
  2. The second is my attempt to replicate the first, using LaTeX.

enter image description here

Pretty close, but the LaTeX version is lacking some of the original optimizations.

  1. Input rails on the lefthand side don't reach the bottom.
  2. Input labels (A,B) are staggered.
  3. I/O labels (A,B,A'B') are oblique.
  4. No splice indicators (little black balls).
  5. No bold lines.

Here is the source, for anyone who cares to read it.



(-0.00,-0.00)node[not port](not1){}
(-0.00,-1.25)node[not port](not2){}
(+2.75,-0.63)node[and port](and1){}

(not1.in)node[above left=1.50cm](a){$A$}
(not1.in)node[above left=0.50cm](b){$B$}
(not1.out)|-(and.in 1)
(not2.out)|-(and.in 2)



Here's one version which draws the inputs separately. But really: Adjusting the line width is up to you (just pass the parameter to the tikzpicture if you want to adjust it).

The following code also corrects the errors that make your MWE non-working: using shapes with names that do not exist.



        \draw (-2.5,-2) -- ++(0,3) node[above] (a) {\(A\)};
        \draw (-1.5,-2) -- ++(0,3) node[above] (b) {\(B\)};
        (0,0)node[not port](not1){}
        (0,-1.25)node[not port](not2){}
        (+2.75,-0.63)node[and port](and1){};

        \draw[fill] (not1.in) -- (a |- not1.in) circle (1pt);
        \draw[fill] (not2.in) -- (b |- not2.in) circle (1pt);
        \draw (not1.out)|-(and1.in 1)
            (not2.out)|-(and1.in 2);

        \draw (and1.out)node[right=0.63cm](a'b'){$A'B'$}

  • how much differ coordinate (-0.00,-0.00) from simply (0,0)? :-) (zero is only zero. can not be negative or positive ...) – Zarko Jul 1 '18 at 9:49
  • @Zarko There's no difference, that's still from the OP. – TeXnician Jul 1 '18 at 11:13
  • i was pretty sure that this is a case. however, you should remove this nonsense :-) – Zarko Jul 1 '18 at 14:40
  • It's not nonsense. – voices Jul 2 '18 at 18:34
  • @TeXnician Your diagram is definitely an improvement. Thanks. What's an MWE? Also, I don't see any reference to tikzpicture in the code. Is that an additional package to import? – voices Jul 2 '18 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.