سوال ۷۶ کنکور ارشد مهندسی کامپیوتر ۱۴۰۴
اگر فقط دروازههای NAND دو ورودی در دسترس داشته باشیم، برای پیادهسازی تابع چند دروازه نیاز است؟
پاسخ صحیح: گزینهٔ B — ۹
We must realize the four-term SOP using only two-input NAND gates. Let .
Level 1 — the four products (4 gates). Form the complemented products: Each is one 2-input NAND, so this costs 4 gates.
Level 2 — combine into the OR (5 gates). By De Morgan, the standard NAND-NAND form is i.e. a 4-input NAND of . Since only 2-input NANDs exist, build it from 2-input gates:
- (gate 5) and (gate 6).
- Then , , so .
- The OR needs two NAND-inverters (gate 7), (gate 8) and a final NAND (gate 9).
That is 5 more gates.
Total: gates.
Equivalently, split as : each half is a NAND-NAND pair followed by one NAND gates, giving uncomplemented ( gates); the final OR costs more (two inverters + one NAND) gates.
So the answer is — option 2.
Exam trick: A two-level AND-OR maps to NAND-NAND for free only if a wide NAND is available. With just 2-input NANDs you must (a) realize each product as a 2-input NAND, and (b) build the wide output NAND from a tree of 2-input NANDs plus inverters — each extra OR-merge of two signals costs 3 NANDs (two inverters + one NAND).