Lab 2 NAND and XOR Presenter ChunHsien Ko
Lab 2. NAND and XOR Presenter: Chun-Hsien Ko Contributors: Chung-Ting Jiang and Lin-Kai Chiu Dept. of Electrical and Computer Eng. , NCTU 1
Logic Design l Lab 2. NAND and XOR Chun-Hsien Ko Outlines l Learning how to put theory into practice l l NAND and XOR l l l From equations to implementations Boolean algebra representation of NAND Truth table of NAND Boolean algebra representation of XOR Truth table of XOR The logic transformation of different gates LAB 2 l Implement XOR by NAND gate Dept. of Electrical and Computer Eng. , NCTU 2
Logic Design l Chun-Hsien Ko Boolean algebra representation of NAND l l l Lab 2. NAND and XOR A NAND B = NOT(A AND B) Y= (AB)’ Truth table of NAND Input A Input B Output Y 0 0 1 1 1 0 Dept. of Electrical and Computer Eng. , NCTU When S 1 and S 2 are ON, Q is equal to GND. Otherwise, Q is equal to VDD. 3
Logic Design l Chun-Hsien Ko Boolean algebra representation of XOR l l l Lab 2. NAND and XOR = exclusive OR Y = A⊕B = AB’+A’B (sum of product) Truth table of XOR Input A Input B Output Y 0 0 1 1 1 0 Dept. of Electrical and Computer Eng. , NCTU 4
Logic Design Lab 2. NAND and XOR l LAB 2: Implement XOR by NAND gate l Experiment Materials l l Chun-Hsien Ko Bread board Power supply IC: 7400 (4 NAND gates) Light-emitting diode (LED) Dept. of Electrical and Computer Eng. , NCTU 5
Logic Design l Chun-Hsien Ko Implement XOR by NAND gate l l Lab 2. NAND and XOR Y = A⊕B = AB’+A’B Most of all digital circuits can be implemented by NAND gates l l NOT gate: A’ = (AA)’ AND gate: AB = ((AB)’)’ OR gate: A+B = ((A’)(B’))’ with De Morgan's law Combinational logic: AB+CD = ((AB)’(CD)’)’ Dept. of Electrical and Computer Eng. , NCTU 6
Logic Design Lab 2. NAND and XOR Dept. of Electrical and Computer Eng. , NCTU Chun-Hsien Ko 7
Logic Design l Lab 2. NAND and XOR Chun-Hsien Ko A simple example l l A XOR B = A AND B’ OR A’ AND B = (A AND B’)’ NAND (A’ AND B)’ = (A’ NAND B) NAND (B’ NAND A) = ((A NAND A) NAND B) NAND ( (B NAND B) NAND A) Dept. of Electrical and Computer Eng. , NCTU 8
- Slides: 8