Logic IC Manufacturer Skill
Overview
Logic ICs are standardized digital integrated circuits implementing basic logic functions. The two main families are:
- 74xx Series - TTL-based logic (originally Texas Instruments, now multi-source)
- CD4xxx Series - CMOS-based logic (originally RCA, now multi-source)
These parts are produced by multiple manufacturers (TI, ON Semi, Nexperia, Diodes Inc, STMicroelectronics) with identical pinouts and functions.
MPN Structure
74xx Series
[PREFIX][FAMILY][SERIES][FUNCTION][PACKAGE]
| | | | |
| | | | +-- Package code (N, D, PW, etc.)
| | | +-- Function number (00, 04, 74, 138, etc.)
| | +-- Fixed: "74" (commercial) or "54" (military temp)
| +-- Technology family (LS, HC, HCT, AC, AHC, etc.)
+-- Optional manufacturer prefix (SN for TI)
Example Decoding
SN74HC595N
| | | ||
| | | |+-- N = DIP package
| | | +-- 595 = 8-bit shift register function
| | +-- 74 = Commercial temperature range
| +-- HC = High-speed CMOS family
+-- SN = Texas Instruments prefix
74LS04D
| ||
| |+-- D = SOIC package
| +-- 04 = Hex inverter function
+-- LS = Low-power Schottky TTL family
CD4xxx Series
CD[FUNCTION][PACKAGE]
| | |
| | +-- Package suffix (BE, BM, UBE, etc.)
| +-- Function number (4001, 4017, 4051, etc.)
+-- CD = CMOS Digital prefix
Example Decoding
CD4017BE
| | ||
| | |+-- E = Economy grade
| | +-- B = Buffered output
| +-- 4017 = Decade counter/divider function
+-- CD = CMOS Digital prefix
CD4001UBE
| | |||
| | ||+-- E = Economy grade
| | |+-- B = Buffered
| | +-- U = Unbuffered variant
| +-- 4001 = Quad 2-input NOR gate
+-- CD = CMOS Digital prefix
Technology Families (74xx Series)
Original TTL Technologies
| Family |
Name |
Speed |
Power |
Supply |
Notes |
| (none) |
Standard TTL |
Slow |
High |
5V |
Original, obsolete |
| L |
Low-power TTL |
Slow |
Low |
5V |
Obsolete |
| S |
Schottky TTL |
Fast |
High |
5V |
Obsolete |
| LS |
Low-power Schottky |
Fast |
Low |
5V |
Still common |
| ALS |
Advanced LS |
Faster |
Lower |
5V |
Improved LS |
| F |
Fast TTL |
Very Fast |
Medium |
5V |
High-speed apps |
| AS |
Advanced Schottky |
Very Fast |
High |
5V |
Maximum speed |
CMOS Technologies (Modern)
| Family |
Name |
Speed |
Power |
Supply |
Notes |
| C |
CMOS |
Slow |
Very Low |
3-15V |
Wide voltage range |
| HC |
High-speed CMOS |
Fast |
Very Low |
2-6V |
Most common today |
| HCT |
HC TTL-compatible |
Fast |
Very Low |
4.5-5.5V |
5V TTL I/O levels |
| AC |
Advanced CMOS |
Very Fast |
Low |
2-6V |
High-speed CMOS |
| ACT |
AC TTL-compatible |
Very Fast |
Low |
4.5-5.5V |
Fast + TTL levels |
| AHC |
Advanced HC |
Faster |
Very Low |
2-5.5V |
Improved HC |
| AHCT |
AHC TTL-compatible |
Faster |
Very Low |
4.5-5.5V |
Improved HCT |
Low-Voltage Technologies
| Family |
Name |
Speed |
Supply |
Notes |
| LV |
Low Voltage |
Medium |
2-5.5V |
General low-voltage |
| LVC |
LV CMOS |
Fast |
1.65-5.5V |
Common in 3.3V systems |
| LVT |
LV TTL |
Fast |
2.7-3.6V |
3.3V optimized |
| ALVC |
Advanced LVC |
Very Fast |
1.65-3.6V |
High-speed 3.3V |
| AUC |
Advanced ULP |
Fast |
0.8-2.7V |
Ultra-low voltage |
| AUP |
Advanced ULP |
Medium |
0.8-3.6V |
Ultra-low power |
Technology Selection Guide
| Use Case |
Recommended Family |
| New 5V design |
HC or HCT |
| Replacing old TTL |
HCT (input compatible) |
| 3.3V systems |
LVC |
| Mixed 3.3V/5V |
LVC (5V tolerant) |
| Low power battery |
AUP, HC |
| High speed |
AC, AHC, ALVC |
| Wide voltage range |
CD4000 series |
Function Number Reference
Gates (2-digit)
| Number |
Function |
Gates/Package |
| 00 |
Quad 2-input NAND |
4 |
| 02 |
Quad 2-input NOR |
4 |
| 04 |
Hex inverter |
6 |
| 08 |
Quad 2-input AND |
4 |
| 10 |
Triple 3-input NAND |
3 |
| 11 |
Triple 3-input AND |
3 |
| 20 |
Dual 4-input NAND |
2 |
| 21 |
Dual 4-input AND |
2 |
| 27 |
Triple 3-input NOR |
3 |
| 30 |
8-input NAND |
1 |
| 32 |
Quad 2-input OR |
4 |
| 86 |
Quad 2-input XOR |
4 |
| 125 |
Quad bus buffer (tri-state) |
4 |
| 126 |
Quad bus buffer (tri-state) |
4 |
Flip-Flops
| Number |
Function |
Flip-Flops/Package |
| 73 |
Dual J-K flip-flop (clear) |
2 |
| 74 |
Dual D flip-flop (preset/clear) |
2 |
| 75 |
Quad bistable latch |
4 |
| 76 |
Dual J-K flip-flop (preset/clear) |
2 |
| 109 |
Dual J-K flip-flop (positive edge) |
2 |
| 112 |
Dual J-K flip-flop (negative edge) |
2 |
| 174 |
Hex D flip-flop (common clear) |
6 |
| 175 |
Quad D flip-flop (common clear) |
4 |
| 273 |
Octal D flip-flop (common clear) |
8 |
| 374 |
Octal D flip-flop (tri-state) |
8 |
| 574 |
Octal D flip-flop (tri-state, edge) |
8 |
Counters
| Number |
Function |
| 90 |
Decade counter |
| 93 |
4-bit binary counter |
| 160 |
Sync decade counter (async clear) |
| 161 |
Sync 4-bit counter (async clear) |
| 163 |
Sync 4-bit counter (sync clear) |
| 190 |
Sync decade up/down counter |
| 191 |
Sync binary up/down counter |
| 393 |
Dual 4-bit binary counter |
| 4017 |
CD4017 decade counter/divider |
| 4040 |
CD4040 12-bit binary counter |
Shift Registers
| Number |
Function |
Bits |
| 164 |
8-bit serial-in parallel-out |
8 |
| 165 |
8-bit parallel-in serial-out |
8 |
| 166 |
8-bit parallel-in serial-out |
8 |
| 595 |
8-bit serial-in parallel-out (latch) |
8 |
| 597 |
8-bit serial-in parallel-out (latch) |
8 |
| 4015 |
CD4015 dual 4-bit shift register |
2x4 |
| 4094 |
CD4094 8-bit shift register |
8 |
Decoders/Demultiplexers
| Number |
Function |
| 42 |
BCD to decimal decoder |
| 138 |
3-to-8 line decoder |
| 139 |
Dual 2-to-4 line decoder |
| 154 |
4-to-16 line decoder |
| 155 |
Dual 2-to-4 decoder/demux |
| 238 |
3-to-8 line decoder (active high) |
| 4028 |
CD4028 BCD to decimal decoder |
| 4514 |
CD4514 4-to-16 line decoder (latch) |
Multiplexers
| Number |
Function |
| 151 |
8-to-1 multiplexer |
| 153 |
Dual 4-to-1 multiplexer |
| 157 |
Quad 2-to-1 multiplexer |
| 158 |
Quad 2-to-1 multiplexer (inverted) |
| 251 |
8-to-1 multiplexer (tri-state) |
| 253 |
Dual 4-to-1 multiplexer (tri-state) |
| 257 |
Quad 2-to-1 multiplexer (tri-state) |
| 4051 |
CD4051 8-channel analog mux |
| 4052 |
CD4052 Dual 4-channel analog mux |
| 4053 |
CD4053 Triple 2-channel analog mux |
Buffers/Drivers
| Number |
Function |
| 07 |
Hex buffer (open-collector) |
| 17 |
Hex buffer (open-collector) |
| 125 |
Quad buffer (tri-state) |
| 126 |
Quad buffer (tri-state) |
| 240 |
Octal buffer (inverting, tri-state) |
| 241 |
Octal buffer (non-inverting, tri-state) |
| 244 |
Octal buffer (non-inverting, tri-state) |
| 245 |
Octal bus transceiver (tri-state) |
| 4049 |
CD4049 Hex inverting buffer |
| 4050 |
CD4050 Hex non-inverting buffer |
Package Codes
74xx Series Package Codes
| Code |
Package |
Pins |
Notes |
| N |
PDIP |
14-20 |
Through-hole, prototyping |
| D |
SOIC |
14-20 |
Surface mount, 1.27mm pitch |
| DW |
SOIC-Wide |
16-28 |
Wide body SOIC |
| PW |
TSSOP |
14-24 |
Thin profile, 0.65mm pitch |
| DB |
SSOP |
14-28 |
Shrink SOIC |
| DBV |
SOT-23 |
5-6 |
Very small, single gate |
| DGV |
VSSOP |
8 |
Mini SOIC |
| RGY |
QFN |
16-24 |
No-lead package |
| NS |
SO |
14-20 |
Small outline |
| M |
SOIC |
14-20 |
Alternative SOIC code |
| T |
TSSOP |
14-24 |
Alternative TSSOP code |
| P |
DIP |
14-20 |
Plastic DIP (alternate) |
CD4xxx Series Package Codes
| Code |
Package |
Notes |
| BE |
PDIP |
Standard plastic DIP, buffered |
| B |
PDIP |
Standard buffered output |
| E |
PDIP |
Economy grade |
| UBE |
PDIP |
Unbuffered output |
| BC |
CERDIP |
Ceramic DIP (high reliability) |
| BM |
SOIC |
Surface mount, buffered |
| BT |
TSSOP |
Thin package, buffered |
| BD |
SOIC |
Alternative SOIC code |
| PWR |
TSSOP |
Tape and reel |
| N |
DIP |
Generic DIP |
| P |
DIP |
Plastic DIP |
| NSR |
SOIC |
SOIC tape and reel |
Handler Implementation
Supported Component Types
ComponentType.IC // Base type
ComponentType.LOGIC_IC // Specific logic IC type
Pattern Recognition
// 74xx series pattern (includes 54xx military)
"^(?:74|54)[LSAHCTTF]{0,4}[0-9]{2,4}.*"
// CD4xxx series pattern
"^CD4[0-9]{3}.*"
Series Extraction Rules
The handler extracts the base series by:
74xx: Extracts digits after technology code until non-digit
SN74HC595N -> 595
74LS04D -> 04
CD4xxx: Extracts CD4 + 3-digit function
CD4017BE -> CD4017
CD4001UBE -> CD4001
Package Code Extraction Rules
CD4xxx:
- Check longest suffixes first:
UBE, BE, BC
- Then shorter:
B, E
74xx:
- Single letter suffix:
N, D, P, M, T
- Pattern:
.*?([NDPMT])$
Similarity Calculation
The LogicICSimilarityCalculator uses these rules:
Same Function, Compatible Technology = HIGH (0.9)
// These are highly similar (same function)
"74LS00" vs "74HC00" // 0.9 - Same NAND function
"74LS04" vs "74ALS04" // 0.9 - Same inverter function
"CD4001BE" vs "CD4001BM" // 0.9 - Same NOR gate, different package
Different Functions = LOW (0.3)
// These have low similarity (different functions)
"74LS00" vs "74LS04" // 0.3 - NAND vs Inverter
"74HC595" vs "74HC138" // 0.3 - Shift register vs Decoder
"CD4017" vs "CD4001" // 0.3 - Counter vs NOR gate
Compatible Technology Groups
These 74xx families are considered compatible:
Parts with the same function and compatible families score HIGH similarity.
Function Groups
Parts in the same function group may have increased similarity:
| Group |
Function Numbers |
| NAND |
00, 10, 20, 30, 40 |
| NOR |
02, 12, 22, 32, 42 |
| NOT |
04, 14, 24, 34, 44 |
| AND |
08, 18, 28, 38, 48 |
| OR |
32, 42 |
| Flip-Flops |
73, 74, 75, 76, 77, 78 |
| Multiplexers |
151, 153, 157, 158 |
| Decoders |
138, 139, 154, 155 |
Example MPNs
Texas Instruments (SN prefix)
| MPN |
Description |
| SN74HC595N |
8-bit shift register, HC CMOS, DIP |
| SN74LS04D |
Hex inverter, LS TTL, SOIC |
| SN74AHC1G04DCKR |
Single inverter, AHC, SC70, tape/reel |
| SN74LVC245APW |
Octal bus transceiver, LVC, TSSOP |
| SN74HC138D |
3-to-8 decoder, HC CMOS, SOIC |
Nexperia (74 prefix without SN)
| MPN |
Description |
| 74HC595D |
8-bit shift register, HC, SOIC |
| 74LVC1G04GW |
Single inverter, LVC, SC70 |
| 74AHCT125D |
Quad buffer, AHCT, SOIC |
| 74HCT245D |
Octal bus transceiver, HCT, SOIC |
ON Semiconductor (MC74 prefix)
| MPN |
Description |
| MC74HC595ADG |
8-bit shift register, HC, SOIC |
| MC74AC04DG |
Hex inverter, AC, SOIC |
| MC74VHC1GT04DTT1G |
Single inverter, VHC, SC70 |
CD4000 Series (Multi-source)
| MPN |
Description |
| CD4001BE |
Quad 2-input NOR, buffered, DIP |
| CD4017BM |
Decade counter, buffered, SOIC |
| CD4051BE |
8-channel mux, buffered, DIP |
| CD4066BM |
Quad bilateral switch, buffered, SOIC |
| CD4093BE |
Quad Schmitt NAND, buffered, DIP |
Multi-Sourcing Guide
Logic ICs are second-sourced by many manufacturers. These are direct replacements:
| Function |
TI |
Nexperia |
ON Semi |
STMicro |
| 74HC595 |
SN74HC595 |
74HC595 |
MC74HC595A |
M74HC595 |
| 74LS04 |
SN74LS04 |
74LS04 |
MC74LS04A |
- |
| 74HC138 |
SN74HC138 |
74HC138 |
MC74HC138A |
M74HC138 |
| CD4001 |
CD4001B |
HEF4001B |
MC14001B |
HCF4001 |
| CD4017 |
CD4017B |
HEF4017B |
MC14017B |
HCF4017 |
Note: Nexperia uses HEF prefix for CD4000 series (e.g., HEF4001BT).
STMicro uses HCF prefix (e.g., HCF4017BE).
ON Semiconductor uses MC14 prefix (e.g., MC14001BCP).
Related Files
- Handler:
manufacturers/LogicICHandler.java
- Similarity Calculator:
componentsimilaritycalculators/LogicICSimilarityCalculator.java
- Component Types:
ComponentType.LOGIC_IC, ComponentType.LOGIC_IC_NEXPERIA, ComponentType.LOGIC_IC_DIODES
- Similarity Skill:
.claude/skills/similarity-logic/SKILL.md
Learnings & Quirks
Handler Patterns
- Pattern uses character class:
[LSAHCTTF]{0,4} captures technology but has duplicates (TT). Works but could be cleaner.
- 54xx military parts: Pattern includes 54xx prefix for military temperature range variants. Same function as 74xx.
- No manufacturer prefix required: Pattern matches both
SN74HC595 (TI) and 74HC595 (generic).
Series Extraction Gotcha
- The
extractSeries() method uses regex replaceAll("([0-9]{2,4}).*$", "$1") which captures the function number.
- For
74LS04D, this extracts 04 (correct).
- For
74HC595N, this extracts 595 (correct).
- Note: Technology prefix (LS, HC) is NOT included in extracted series.
Package Code Order Matters
// CORRECT - Check longer suffixes first
if (mpn.endsWith("UBE")) return "UBE"; // 3 chars first
if (mpn.endsWith("BE")) return "BE"; // 2 chars second
if (mpn.endsWith("B")) return "B"; // 1 char last
// WRONG - Would never match UBE or BE
if (mpn.endsWith("E")) return "E"; // Matches first!
CD4000 Buffered vs Unbuffered
- B suffix: Buffered output (higher drive, lower speed)
- UB suffix: Unbuffered output (faster, lower drive)
- Most modern designs use buffered versions.
74xx vs CD4000 Comparison
| Aspect |
74xx (CMOS) |
CD4000 |
| Supply Voltage |
2-6V (HC) |
3-15V |
| Speed |
Faster |
Slower |
| Power |
Low |
Very Low |
| Output Drive |
Higher |
Lower |
| ESD Tolerance |
Lower |
Higher |
| Noise Immunity |
Good |
Excellent |
Technology Selection for Mixed Voltage
| Source Logic |
Target Logic |
Use Family |
| 5V TTL |
3.3V CMOS |
LVC (5V tolerant inputs) |
| 3.3V CMOS |
5V TTL |
HCT (TTL output levels) |
| 3.3V to 5V bidirectional |
- |
74LVC245 (transceiver) |
Debug Statements in Calculator
The LogicICSimilarityCalculator contains System.out.println debug statements (lines 43, 47, 51, 59, 67, 78, 92, 113-123). These should be removed or replaced with SLF4J logging in production.
Cross-Handler Considerations
- LogicICHandler handles generic logic ICs (74xx, CD4xxx).
- Manufacturer-specific handlers (TI, Nexperia, etc.) may also match these parts.
- Handler ordering in
ManufacturerHandlerFactory affects which handler processes the part first.
1---2name: logicic3description: Use when working with 74xx and CD4xxx series logic ICs - standard TTL/CMOS logic gates, flip-flops, counters, decoders, multiplexers. Includes technology families (LS, HC, HCT, AC, AHC) and LogicICHandler guidance.4---5
6# Logic IC Manufacturer Skill
7
8## Overview
9
10Logic ICs are standardized digital integrated circuits implementing basic logic functions. The two main families are:
11
121. **74xx Series** - TTL-based logic (originally Texas Instruments, now multi-source)
132. **CD4xxx Series** - CMOS-based logic (originally RCA, now multi-source)
14
15These parts are produced by multiple manufacturers (TI, ON Semi, Nexperia, Diodes Inc, STMicroelectronics) with identical pinouts and functions.
16
17---
18
19## MPN Structure
20
21### 74xx Series
22
23```
24[PREFIX][FAMILY][SERIES][FUNCTION][PACKAGE]
25 | | | | |
26 | | | | +-- Package code (N, D, PW, etc.)
27 | | | +-- Function number (00, 04, 74, 138, etc.)
28 | | +-- Fixed: "74" (commercial) or "54" (military temp)
29 | +-- Technology family (LS, HC, HCT, AC, AHC, etc.)
30 +-- Optional manufacturer prefix (SN for TI)
31```
32
33#### Example Decoding
34
35```
36SN74HC595N
37| | | ||
38| | | |+-- N = DIP package
39| | | +-- 595 = 8-bit shift register function
40| | +-- 74 = Commercial temperature range
41| +-- HC = High-speed CMOS family
42+-- SN = Texas Instruments prefix
43
4474LS04D
45 | ||
46 | |+-- D = SOIC package
47 | +-- 04 = Hex inverter function
48 +-- LS = Low-power Schottky TTL family
49```
50
51### CD4xxx Series
52
53```
54CD[FUNCTION][PACKAGE]
55| | |
56| | +-- Package suffix (BE, BM, UBE, etc.)
57| +-- Function number (4001, 4017, 4051, etc.)
58+-- CD = CMOS Digital prefix
59```
60
61#### Example Decoding
62
63```
64CD4017BE
65| | ||
66| | |+-- E = Economy grade
67| | +-- B = Buffered output
68| +-- 4017 = Decade counter/divider function
69+-- CD = CMOS Digital prefix
70
71CD4001UBE
72| | |||
73| | ||+-- E = Economy grade
74| | |+-- B = Buffered
75| | +-- U = Unbuffered variant
76| +-- 4001 = Quad 2-input NOR gate
77+-- CD = CMOS Digital prefix
78```
79
80---
81
82## Technology Families (74xx Series)
83
84### Original TTL Technologies
85
86| Family | Name | Speed | Power | Supply | Notes |
87|--------|------|-------|-------|--------|-------|
88| (none) | Standard TTL | Slow | High | 5V | Original, obsolete |
89| L | Low-power TTL | Slow | Low | 5V | Obsolete |
90| S | Schottky TTL | Fast | High | 5V | Obsolete |
91| LS | Low-power Schottky | Fast | Low | 5V | Still common |
92| ALS | Advanced LS | Faster | Lower | 5V | Improved LS |
93| F | Fast TTL | Very Fast | Medium | 5V | High-speed apps |
94| AS | Advanced Schottky | Very Fast | High | 5V | Maximum speed |
95
96### CMOS Technologies (Modern)
97
98| Family | Name | Speed | Power | Supply | Notes |
99|--------|------|-------|-------|--------|-------|
100| C | CMOS | Slow | Very Low | 3-15V | Wide voltage range |
101| HC | High-speed CMOS | Fast | Very Low | 2-6V | Most common today |
102| HCT | HC TTL-compatible | Fast | Very Low | 4.5-5.5V | 5V TTL I/O levels |
103| AC | Advanced CMOS | Very Fast | Low | 2-6V | High-speed CMOS |
104| ACT | AC TTL-compatible | Very Fast | Low | 4.5-5.5V | Fast + TTL levels |
105| AHC | Advanced HC | Faster | Very Low | 2-5.5V | Improved HC |
106| AHCT | AHC TTL-compatible | Faster | Very Low | 4.5-5.5V | Improved HCT |
107
108### Low-Voltage Technologies
109
110| Family | Name | Speed | Supply | Notes |
111|--------|------|-------|--------|-------|
112| LV | Low Voltage | Medium | 2-5.5V | General low-voltage |
113| LVC | LV CMOS | Fast | 1.65-5.5V | Common in 3.3V systems |
114| LVT | LV TTL | Fast | 2.7-3.6V | 3.3V optimized |
115| ALVC | Advanced LVC | Very Fast | 1.65-3.6V | High-speed 3.3V |
116| AUC | Advanced ULP | Fast | 0.8-2.7V | Ultra-low voltage |
117| AUP | Advanced ULP | Medium | 0.8-3.6V | Ultra-low power |
118
119### Technology Selection Guide
120
121| Use Case | Recommended Family |
122|----------|-------------------|
123| New 5V design | HC or HCT |
124| Replacing old TTL | HCT (input compatible) |
125| 3.3V systems | LVC |
126| Mixed 3.3V/5V | LVC (5V tolerant) |
127| Low power battery | AUP, HC |
128| High speed | AC, AHC, ALVC |
129| Wide voltage range | CD4000 series |
130
131---
132
133## Function Number Reference
134
135### Gates (2-digit)
136
137| Number | Function | Gates/Package |
138|--------|----------|---------------|
139| 00 | Quad 2-input NAND | 4 |
140| 02 | Quad 2-input NOR | 4 |
141| 04 | Hex inverter | 6 |
142| 08 | Quad 2-input AND | 4 |
143| 10 | Triple 3-input NAND | 3 |
144| 11 | Triple 3-input AND | 3 |
145| 20 | Dual 4-input NAND | 2 |
146| 21 | Dual 4-input AND | 2 |
147| 27 | Triple 3-input NOR | 3 |
148| 30 | 8-input NAND | 1 |
149| 32 | Quad 2-input OR | 4 |
150| 86 | Quad 2-input XOR | 4 |
151| 125 | Quad bus buffer (tri-state) | 4 |
152| 126 | Quad bus buffer (tri-state) | 4 |
153
154### Flip-Flops
155
156| Number | Function | Flip-Flops/Package |
157|--------|----------|-------------------|
158| 73 | Dual J-K flip-flop (clear) | 2 |
159| 74 | Dual D flip-flop (preset/clear) | 2 |
160| 75 | Quad bistable latch | 4 |
161| 76 | Dual J-K flip-flop (preset/clear) | 2 |
162| 109 | Dual J-K flip-flop (positive edge) | 2 |
163| 112 | Dual J-K flip-flop (negative edge) | 2 |
164| 174 | Hex D flip-flop (common clear) | 6 |
165| 175 | Quad D flip-flop (common clear) | 4 |
166| 273 | Octal D flip-flop (common clear) | 8 |
167| 374 | Octal D flip-flop (tri-state) | 8 |
168| 574 | Octal D flip-flop (tri-state, edge) | 8 |
169
170### Counters
171
172| Number | Function |
173|--------|----------|
174| 90 | Decade counter |
175| 93 | 4-bit binary counter |
176| 160 | Sync decade counter (async clear) |
177| 161 | Sync 4-bit counter (async clear) |
178| 163 | Sync 4-bit counter (sync clear) |
179| 190 | Sync decade up/down counter |
180| 191 | Sync binary up/down counter |
181| 393 | Dual 4-bit binary counter |
182| 4017 | CD4017 decade counter/divider |
183| 4040 | CD4040 12-bit binary counter |
184
185### Shift Registers
186
187| Number | Function | Bits |
188|--------|----------|------|
189| 164 | 8-bit serial-in parallel-out | 8 |
190| 165 | 8-bit parallel-in serial-out | 8 |
191| 166 | 8-bit parallel-in serial-out | 8 |
192| 595 | 8-bit serial-in parallel-out (latch) | 8 |
193| 597 | 8-bit serial-in parallel-out (latch) | 8 |
194| 4015 | CD4015 dual 4-bit shift register | 2x4 |
195| 4094 | CD4094 8-bit shift register | 8 |
196
197### Decoders/Demultiplexers
198
199| Number | Function |
200|--------|----------|
201| 42 | BCD to decimal decoder |
202| 138 | 3-to-8 line decoder |
203| 139 | Dual 2-to-4 line decoder |
204| 154 | 4-to-16 line decoder |
205| 155 | Dual 2-to-4 decoder/demux |
206| 238 | 3-to-8 line decoder (active high) |
207| 4028 | CD4028 BCD to decimal decoder |
208| 4514 | CD4514 4-to-16 line decoder (latch) |
209
210### Multiplexers
211
212| Number | Function |
213|--------|----------|
214| 151 | 8-to-1 multiplexer |
215| 153 | Dual 4-to-1 multiplexer |
216| 157 | Quad 2-to-1 multiplexer |
217| 158 | Quad 2-to-1 multiplexer (inverted) |
218| 251 | 8-to-1 multiplexer (tri-state) |
219| 253 | Dual 4-to-1 multiplexer (tri-state) |
220| 257 | Quad 2-to-1 multiplexer (tri-state) |
221| 4051 | CD4051 8-channel analog mux |
222| 4052 | CD4052 Dual 4-channel analog mux |
223| 4053 | CD4053 Triple 2-channel analog mux |
224
225### Buffers/Drivers
226
227| Number | Function |
228|--------|----------|
229| 07 | Hex buffer (open-collector) |
230| 17 | Hex buffer (open-collector) |
231| 125 | Quad buffer (tri-state) |
232| 126 | Quad buffer (tri-state) |
233| 240 | Octal buffer (inverting, tri-state) |
234| 241 | Octal buffer (non-inverting, tri-state) |
235| 244 | Octal buffer (non-inverting, tri-state) |
236| 245 | Octal bus transceiver (tri-state) |
237| 4049 | CD4049 Hex inverting buffer |
238| 4050 | CD4050 Hex non-inverting buffer |
239
240---
241
242## Package Codes
243
244### 74xx Series Package Codes
245
246| Code | Package | Pins | Notes |
247|------|---------|------|-------|
248| N | PDIP | 14-20 | Through-hole, prototyping |
249| D | SOIC | 14-20 | Surface mount, 1.27mm pitch |
250| DW | SOIC-Wide | 16-28 | Wide body SOIC |
251| PW | TSSOP | 14-24 | Thin profile, 0.65mm pitch |
252| DB | SSOP | 14-28 | Shrink SOIC |
253| DBV | SOT-23 | 5-6 | Very small, single gate |
254| DGV | VSSOP | 8 | Mini SOIC |
255| RGY | QFN | 16-24 | No-lead package |
256| NS | SO | 14-20 | Small outline |
257| M | SOIC | 14-20 | Alternative SOIC code |
258| T | TSSOP | 14-24 | Alternative TSSOP code |
259| P | DIP | 14-20 | Plastic DIP (alternate) |
260
261### CD4xxx Series Package Codes
262
263| Code | Package | Notes |
264|------|---------|-------|
265| BE | PDIP | Standard plastic DIP, buffered |
266| B | PDIP | Standard buffered output |
267| E | PDIP | Economy grade |
268| UBE | PDIP | Unbuffered output |
269| BC | CERDIP | Ceramic DIP (high reliability) |
270| BM | SOIC | Surface mount, buffered |
271| BT | TSSOP | Thin package, buffered |
272| BD | SOIC | Alternative SOIC code |
273| PWR | TSSOP | Tape and reel |
274| N | DIP | Generic DIP |
275| P | DIP | Plastic DIP |
276| NSR | SOIC | SOIC tape and reel |
277
278---
279
280## Handler Implementation
281
282### Supported Component Types
283
284```java
285ComponentType.IC // Base type
286ComponentType.LOGIC_IC // Specific logic IC type
287```
288
289### Pattern Recognition
290
291```java
292// 74xx series pattern (includes 54xx military)
293"^(?:74|54)[LSAHCTTF]{0,4}[0-9]{2,4}.*"
294
295// CD4xxx series pattern
296"^CD4[0-9]{3}.*"
297```
298
299### Series Extraction Rules
300
301The handler extracts the base series by:
302
3031. **74xx**: Extracts digits after technology code until non-digit
304 - `SN74HC595N` -> `595`
305 - `74LS04D` -> `04`
306
3072. **CD4xxx**: Extracts `CD4` + 3-digit function
308 - `CD4017BE` -> `CD4017`
309 - `CD4001UBE` -> `CD4001`
310
311### Package Code Extraction Rules
312
313**CD4xxx:**
314- Check longest suffixes first: `UBE`, `BE`, `BC`
315- Then shorter: `B`, `E`
316
317**74xx:**
318- Single letter suffix: `N`, `D`, `P`, `M`, `T`
319- Pattern: `.*?([NDPMT])$`
320
321---
322
323## Similarity Calculation
324
325The `LogicICSimilarityCalculator` uses these rules:
326
327### Same Function, Compatible Technology = HIGH (0.9)
328
329```java
330// These are highly similar (same function)
331"74LS00" vs "74HC00" // 0.9 - Same NAND function
332"74LS04" vs "74ALS04" // 0.9 - Same inverter function
333"CD4001BE" vs "CD4001BM" // 0.9 - Same NOR gate, different package
334```
335
336### Different Functions = LOW (0.3)
337
338```java
339// These have low similarity (different functions)
340"74LS00" vs "74LS04" // 0.3 - NAND vs Inverter
341"74HC595" vs "74HC138" // 0.3 - Shift register vs Decoder
342"CD4017" vs "CD4001" // 0.3 - Counter vs NOR gate
343```
344
345### Compatible Technology Groups
346
347These 74xx families are considered compatible:
348- `LS`, `ALS`, `F`, `HC`, `HCT`
349
350Parts with the same function and compatible families score HIGH similarity.
351
352### Function Groups
353
354Parts in the same function group may have increased similarity:
355
356| Group | Function Numbers |
357|-------|-----------------|
358| NAND | 00, 10, 20, 30, 40 |
359| NOR | 02, 12, 22, 32, 42 |
360| NOT | 04, 14, 24, 34, 44 |
361| AND | 08, 18, 28, 38, 48 |
362| OR | 32, 42 |
363| Flip-Flops | 73, 74, 75, 76, 77, 78 |
364| Multiplexers | 151, 153, 157, 158 |
365| Decoders | 138, 139, 154, 155 |
366
367---
368
369## Example MPNs
370
371### Texas Instruments (SN prefix)
372
373| MPN | Description |
374|-----|-------------|
375| SN74HC595N | 8-bit shift register, HC CMOS, DIP |
376| SN74LS04D | Hex inverter, LS TTL, SOIC |
377| SN74AHC1G04DCKR | Single inverter, AHC, SC70, tape/reel |
378| SN74LVC245APW | Octal bus transceiver, LVC, TSSOP |
379| SN74HC138D | 3-to-8 decoder, HC CMOS, SOIC |
380
381### Nexperia (74 prefix without SN)
382
383| MPN | Description |
384|-----|-------------|
385| 74HC595D | 8-bit shift register, HC, SOIC |
386| 74LVC1G04GW | Single inverter, LVC, SC70 |
387| 74AHCT125D | Quad buffer, AHCT, SOIC |
388| 74HCT245D | Octal bus transceiver, HCT, SOIC |
389
390### ON Semiconductor (MC74 prefix)
391
392| MPN | Description |
393|-----|-------------|
394| MC74HC595ADG | 8-bit shift register, HC, SOIC |
395| MC74AC04DG | Hex inverter, AC, SOIC |
396| MC74VHC1GT04DTT1G | Single inverter, VHC, SC70 |
397
398### CD4000 Series (Multi-source)
399
400| MPN | Description |
401|-----|-------------|
402| CD4001BE | Quad 2-input NOR, buffered, DIP |
403| CD4017BM | Decade counter, buffered, SOIC |
404| CD4051BE | 8-channel mux, buffered, DIP |
405| CD4066BM | Quad bilateral switch, buffered, SOIC |
406| CD4093BE | Quad Schmitt NAND, buffered, DIP |
407
408---
409
410## Multi-Sourcing Guide
411
412Logic ICs are second-sourced by many manufacturers. These are direct replacements:
413
414| Function | TI | Nexperia | ON Semi | STMicro |
415|----------|----|---------:|---------|---------|
416| 74HC595 | SN74HC595 | 74HC595 | MC74HC595A | M74HC595 |
417| 74LS04 | SN74LS04 | 74LS04 | MC74LS04A | - |
418| 74HC138 | SN74HC138 | 74HC138 | MC74HC138A | M74HC138 |
419| CD4001 | CD4001B | HEF4001B | MC14001B | HCF4001 |
420| CD4017 | CD4017B | HEF4017B | MC14017B | HCF4017 |
421
422**Note:** Nexperia uses `HEF` prefix for CD4000 series (e.g., `HEF4001BT`).
423STMicro uses `HCF` prefix (e.g., `HCF4017BE`).
424ON Semiconductor uses `MC14` prefix (e.g., `MC14001BCP`).
425
426---
427
428## Related Files
429
430- **Handler**: `manufacturers/LogicICHandler.java`
431- **Similarity Calculator**: `componentsimilaritycalculators/LogicICSimilarityCalculator.java`
432- **Component Types**: `ComponentType.LOGIC_IC`, `ComponentType.LOGIC_IC_NEXPERIA`, `ComponentType.LOGIC_IC_DIODES`
433- **Similarity Skill**: `.claude/skills/similarity-logic/SKILL.md`
434
435---
436
437## Learnings & Quirks
438
439### Handler Patterns
440
441- **Pattern uses character class**: `[LSAHCTTF]{0,4}` captures technology but has duplicates (TT). Works but could be cleaner.
442- **54xx military parts**: Pattern includes 54xx prefix for military temperature range variants. Same function as 74xx.
443- **No manufacturer prefix required**: Pattern matches both `SN74HC595` (TI) and `74HC595` (generic).
444
445### Series Extraction Gotcha
446
447- The `extractSeries()` method uses regex `replaceAll("([0-9]{2,4}).*$", "$1")` which captures the function number.
448- For `74LS04D`, this extracts `04` (correct).
449- For `74HC595N`, this extracts `595` (correct).
450- **Note**: Technology prefix (LS, HC) is NOT included in extracted series.
451
452### Package Code Order Matters
453
454```java
455// CORRECT - Check longer suffixes first
456if (mpn.endsWith("UBE")) return "UBE"; // 3 chars first
457if (mpn.endsWith("BE")) return "BE"; // 2 chars second
458if (mpn.endsWith("B")) return "B"; // 1 char last
459
460// WRONG - Would never match UBE or BE
461if (mpn.endsWith("E")) return "E"; // Matches first!
462```
463
464### CD4000 Buffered vs Unbuffered
465
466- **B suffix**: Buffered output (higher drive, lower speed)
467- **UB suffix**: Unbuffered output (faster, lower drive)
468- Most modern designs use buffered versions.
469
470### 74xx vs CD4000 Comparison
471
472| Aspect | 74xx (CMOS) | CD4000 |
473|--------|-------------|--------|
474| Supply Voltage | 2-6V (HC) | 3-15V |
475| Speed | Faster | Slower |
476| Power | Low | Very Low |
477| Output Drive | Higher | Lower |
478| ESD Tolerance | Lower | Higher |
479| Noise Immunity | Good | Excellent |
480
481### Technology Selection for Mixed Voltage
482
483| Source Logic | Target Logic | Use Family |
484|--------------|--------------|------------|
485| 5V TTL | 3.3V CMOS | LVC (5V tolerant inputs) |
486| 3.3V CMOS | 5V TTL | HCT (TTL output levels) |
487| 3.3V to 5V bidirectional | - | 74LVC245 (transceiver) |
488
489### Debug Statements in Calculator
490
491The `LogicICSimilarityCalculator` contains `System.out.println` debug statements (lines 43, 47, 51, 59, 67, 78, 92, 113-123). These should be removed or replaced with SLF4J logging in production.
492
493### Cross-Handler Considerations
494
495- LogicICHandler handles generic logic ICs (74xx, CD4xxx).
496- Manufacturer-specific handlers (TI, Nexperia, etc.) may also match these parts.
497- Handler ordering in `ManufacturerHandlerFactory` affects which handler processes the part first.
498
499<!-- Add new learnings above this line -->