Look closely, the &#x27;165 is a little different, both in functionality and pinout. You&#x27;ll not be able to swap in one for the other. -- But yes, both are parallel in, serial in&#x2F;out shift registers.<p><a href="http:&#x2F;&#x2F;www.nxp.com&#x2F;documents&#x2F;data_sheet&#x2F;HEF4021B.pdf" rel="nofollow">http:&#x2F;&#x2F;www.nxp.com&#x2F;documents&#x2F;data_sheet&#x2F;HEF4021B.pdf</a>
<a href="http:&#x2F;&#x2F;www.nxp.com&#x2F;documents&#x2F;data_sheet&#x2F;74HC_HCT165.pdf" rel="nofollow">http:&#x2F;&#x2F;www.nxp.com&#x2F;documents&#x2F;data_sheet&#x2F;74HC_HCT165.pdf</a> (pinout for LS is the same)