Reverse engineering a National Semiconductor 54HC00 quad NAND gate (https://project5474.org/index.php?title=54HC00_NS_8632)