Improve logic gate shapes (American OR/AND/XOR) to match standard symbols #383
Comments
|
Very nice research work, thanks. I think I can try a shoot at this when I have some time (really swamped now with the coronavirus emergency and the on-line shift of classes and everything). Obviously this must be done under a style flag because the change in proportions is quite big. I think that we can leave the position of terminals like now (more or less it matches) and the thickness is already configurable. I have a couple of doubts about implementation.
I will mention the co-authors and recent contributors here so that they can chime in --- @mredaelli @sistlind @asinghvi17 @der-stefan @jesseopdenbrouw BTW any help and contribution is clearly welcome! ;-) |
|
see https://gist.github.com/jason-s/ebea0a9d5fae9a7d7f5eae2f9620f98e I don't know how to properly make circuitikz shapes, there were a couple of fudged (empirical) numbers I put in to make it look ok. Otherwise I have something for my purposes and I am fine with circuitikz using it in whichever way you wish. |
yeah, I'm in no hurry; again, I have what I need to make my own diagrams. I'd suggest
Not sure what to recommend. (I didn't implement any of the dotted variants.) Let me see if I can find an example in corporate datasheets; the IEEE standards don't show the labels. The XOR input curve is a related issue; it's not clear whether to extend the input terminals so they protrude a consistent length from the gate, or whether the overall width should be the same for all three. (I favor the latter, so I used it in my implementation.)
Not sure what to do here; I don't know a lot of examples from industry of wide-input gates. IEEE 91-1984 suggests the following in Annex C: |
Is there an online channel (gitter or Teams or discord or Google Groups or whatever) for tikz or circuitikz development? I'd like to lurk there so that I can see what's going on, rather than watch all the github issues. I had no idea that #340 was in progress, and if I had been aware of it then, I would have spoken up. |
|
OK, for examples of wide-input gates in industry, see the following. The short answer is that the outline proportions don't change.
|
|
Wow! Nice information (and thanks for the code, it'll be useful). I'll look into it; the extension for several inputs is not a bad idea... Yes,
No, there isn't; basically everything goes through this GitHub page. I lurk often on TeX.sx chat room (depending on the available time). |
|
As far as the logic bubbles / shape widths go, here are some examples in the wild showing that in the majority of cases, the inversion bubbles do not change the geometry, and can be inserted/removed without changes: Motorola 74LS138 -- 1992 data book p. 5-130 NXP 2016 Logic Selection Guide Nexperia 74LVC1G99 -- the text/connections have geometry independent of the bubbles, but note the Schmitt trigger symbol which moves to be as close to the symbol outline as possible... and it looks weird to me. |
that wasn't from me, that was from John Kormylo's tex.stackexchange.com post which I thought had been incorporated into circuitikz already. I'd suggest doing a diff between my gist and the original (i'll add it to the gist) -- I didn't change much. |
Yes --- I have incorporated it (with minor changes) since 0.9.0 I think. I was referring to the vertical bar used for more than two o three inputs that you posted from the datasheets: |
|
I will assign this to me. Trying to tackle it during Easter (...nowhere to go...) |
|
@jason-s --- any special way you prefer for citing you in the code and documentation? |
Jason Sachs jmsachs@gmail.com |
|
Yes, I think that the standard is the same height. Also, my Sedra-Smith follows this norm. Thanks! When I have something test-able, I'll post here. |
|
@JoseDanielMunozFrias --- do you like them? |
|
¡They are prefect! ¡Great work! |
|
Current state of the manual: |
|
Perfect & marvelous! |
|
I think that the not-ports should be equilateral triangles... will check. Not too difficult to change ;-). |
Two suggested corrections:
The IEEE standards don't have requirements of how these basic symbols should look, only recommendations. The requirements of these standards have more to do with annotations on digital logic, like certain designators: The rectangular-shape symbols you will see in datasheets also, especially when there are more complex behaviors; here's from the TI 74LS138: So I would remove the word
Second issue: I appreciate the credit but please don't put my name/address there in the body of the document; in the release notes or in the contributors list is fine. |
Yeah, it looks that way to me, although the IEEE Std 91-1984 and 91-1973 don't include not gates in their Appendix/Annex A for some reason. (Amplifiers are included, and they are equilateral triangles somewhat larger than the logic gate symbols.) |
Done; I'll do this: In addition to the legacy ports, since release 1.0.3, logic ports following the recommended geometry
of distinctive-shape symbols in IEEE Std 91a-1991 Annex A (Recommended symbol proportions)
are also available\footnote{Thanks to Jason for proposing it and digging out the info, see this
\href{https://github.com/circuitikz/circuitikz/issues/383}{GitHub issue}.}.is it ok for you? |
|
I think it's more or less ready. Will start to prepare the PR... |
Original mulit-input code from John Kormylo at tex.stackexchange.com Help by TheTeXnician <38565529+TheTeXnician@users.noreply.github.com> Suggested idea and example code by Jason Sachs <jmsachs@gmail.com> Please see circuitikz#383 for a lot of details All errors and bug by Romano Giannetti <romano.giannetti@gmail.com>
Original multi-input code from John Kormylo at tex.stackexchange.com Help by TheTeXnician <38565529+TheTeXnician@users.noreply.github.com> Suggested idea and example code by Jason Sachs <jmsachs@gmail.com> Please see circuitikz#383 for a lot of details All errors and bug by Romano Giannetti <romano.giannetti@gmail.com>
|
Force-pushed to correct a typo in a commit (I hate them) and I will merge it --- It's easier to test that way. I hope there is no big bug left... |
Original multi-input code from John Kormylo at tex.stackexchange.com Help by TheTeXnician <38565529+TheTeXnician@users.noreply.github.com> Suggested idea and example code by Jason Sachs <jmsachs@gmail.com> Please see circuitikz#383 for a lot of details Most of the code, all errors and bugs by Romano Giannetti <romano.giannetti@gmail.com>
|
Ok --- Please test and reopen if needed |
|
@jason-s: I was looking for "official" information on gate symbols and your research here was very helpful. |





















Please improve the OR/AND/XOR symbols in circuitikz. Right now they are not consistent with the symbols used in international standards, semiconductor manufacturer datasheets for these gates, or the standard schematic capture symbols. The circuitikz versions look more stylized, like Star Trek insignia.
Suggestions for reputable sources:
International standards
IEEE Std 91-1973 -- see Appendix A

IEEE Std 91/91a-1984 and IEEE Std 91/91a-1991 (as mentioned in Wikipedia ) -- see Annex A

Semiconductor manufacturers of logic gates
Schematic capture programs
In particular:
AND gate
circuitikz (as of 1.0.2)

IEEE 91-1973:

IEEE 91-1984:

You will note:
OR gate
circuitikz:

IEEE 91-1973:

IEEE 91-1984:

TI SN74HC32

Nexperia 74HC32

You will note:
XOR gate
circuitikz:

IEEE 91-1973:

IEEE 91-1984:

TI SN74HC86

Nexperia 74HC86

You will note:
the XOR gate symbol is identical to the OR gate except for the extra curve which is identical to the input-side curve of the OR gate, but it is offset horizontally. (IEEE 91-1973 recommends a horizontal shift that is 3/20 = 15% of the height; IEEE 91-1984 recommends 5/26 = approx 19.2% of the height)
The TI and Nexperia datasheets show input lines stopping at the main OR gate core, and crossing over the extra curve of the XOR gate. This looks weird to me but it is consistent with IEEE 91-1973; here's the relevant section of Appendix C:
and IEEE 91-1984 Annex C:
Other issues
in 1= 1/10 - 1/6 of gate height.The text was updated successfully, but these errors were encountered: