3

In the manual , section 5.1.1 Logical ports

All logical ports, except not, have two inputs and one output.

It seems the inputs are limited to two. All solutions I've found are using or gate US rather than american nor port which the command in the new update. In my case, I need to add three inputs to my following case,

enter image description here

\documentclass[border={10pt}]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage[siunitx,european,american]{circuitikz}
\usetikzlibrary{circuits.logic.US,circuits.logic.IEC}
\begin{document}
\begin{tikzpicture}
    [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        block/.style={fill=blue!20,draw=red!70,thick,minimum width=3cm,minimum height=3.5cm}
    ]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw (0,0)
  node[block] (P1) {block} 
  ($(P1.north)$) coordinate (P1n)
  ($(P1.south)$) coordinate (P1s)
  ($(P1.east)$)  coordinate (P1e)
  (P1n) to[short,-o] ++(0, .2) coordinate (p1n) node[left] {$p1$}
  (P1s) to[short,-o] ++(0,-.2) coordinate (p1s) node[left] {$p2$}
  (P1e) to[short,-o] ++(0,0) coordinate (p1e) node[left]   {$p3$}
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  (P1) ++(4,0)  node[american nor port] (And1) {}
  (p1n) -|  (And1.in 1) (p1s) -| (And1.in 2); 

\end{tikzpicture}
\end{document}
CroCo
  • 5,902
  • See http://tex.stackexchange.com/questions/94607/3-input-logic-gate-on-circuitikz, maybe will be of help – Zarko Oct 11 '15 at 18:50
  • There is also (And1.west). See also http://tex.stackexchange.com/questions/155487/three-or-more-leg-xor-gate-for-tikz/156859#156859 – John Kormylo Oct 11 '15 at 18:55
  • As I said, the solutions are not working with american nor port. – CroCo Oct 12 '15 at 08:17

1 Answers1

1

You are right. Some of the anchor points for this component are in odd locations.

\documentclass[border={10pt}]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage[siunitx,european,american]{circuitikz}
\usetikzlibrary{circuits.logic.US,circuits.logic.IEC,calc}
\begin{document}
\begin{tikzpicture}
    [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        block/.style={fill=blue!20,draw=red!70,thick,minimum width=3cm,minimum height=3.5cm}
    ]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw (0,0)
  node[block] (P1) {block} 
  ($(P1.north)$) coordinate (P1n)
  ($(P1.south)$) coordinate (P1s)
  ($(P1.east)$)  coordinate (P1e)
  (P1n) to[short,-o] ++(0, .2) coordinate (p1n) node[left] {$p1$}
  (P1s) to[short,-o] ++(0,-.2) coordinate (p1s) node[left] {$p2$}
  (P1e) to[short,-o] ++(0,0) coordinate (p1e) node[left]   {$p3$}
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  (P1) ++(4,0)  node[american nor port] (And1) {}
  (p1n) -|  (And1.in 1) (p1s) -| (And1.in 2)
  (P1e) -- ($(And1.west)!0.33!(And1.east)$);

\end{tikzpicture}
\end{document}

demo

John Kormylo
  • 79,712
  • 3
  • 50
  • 120