﻿ Drive XOR from NAND gate, NAND to XOR conversion with equations, circuit and minimization steps. Interview question.
Home Verilog Digital Design Digital Basics Python RF Basics
Chip Designing for ASIC/ FPGA Design engineers and Students
FULLCHIPDESIGN
Digital-logic Design...  Dream for many students… start learning front-end…
Topics @TYH :- 4G LTE Tutorial, GVIM editor,
Custom Search

Feedback ? Send it to admin@fullchipdesign.com or join me at fullchip@gmail.com

XOR from NAND XOR from NOR XOR from NOR/NAND

Drive XOR from NAND or NOR gates - Only.

Step 2 involves Invert of A and invert of B. check circuit for nand to inverter

So the digital logic circuit to drive XOR from NAND is below.

Some of the most important interview questions includes the conversion of gates. In this section we are going to discuss logic to drive XOR gate from using only NAND gates. Some other topics that we have already discussed listed below:

Lets start the discussion with truth tables of XOR and NAND.
A
B
Y
0
0
0
0
1
1
1
0
1
1
1
0
A
B
Y
0
0
1
0
1
1
1
0
1
1
1
0
First reformat the XOR equation.
Step 1 :- A'B + AB' = [(A+B')' + (A'+B)'] using theorems Step 2 :- [((A')'+B')' + (A' + (B')')'] using theorems T7, T8 and T9
Resources
Verilog RTL code examples for front-end chip design.
Digital Design Topics
Stack Organization - LIFO, RPN
RTL coding guidelines. ICG cell, Assertions, , levelsChandle
Pipeline vs. Parallel processing.

XOR Truth Table:-

NAND Truth Table

Interview Questions. Main, FPGA, Digital Fundamentals
LTE - Long Term Evolution topics from here
From Digital Basics section we know the equations for XOR and NAND gates. The equations are also shown below:-

XOR equation = A’B + AB’
NAND equation = A’ + B’

Following are the steps to drive logic for XOR using NAND gates

Give two ways to convert a two input NAND gate to an inverter

Lets first look at the NAND truth Table below

First Method is connect the 1 bit input to either 'a' or 'b' and connect other to always ‘1’. Detailed discussion below:-

So for the first method there can be two possible combinations.

First combination:-

For Row’s 3 and 4 Input A is always ‘1’

When Input B = 1 then the output is b= 0.

When Input B = 0 then the output is b=1.

Hence a functionality of an inverter.

Second combination:-

Row 2 and 4 in above table have Input A tied to 0. The polarity of B input is inverted at output.

Discussion on the second method on this link Convert NAND to Inverter logic.

Input a
Input b
Output
Row 1
0
0
1
Row 2
0
1
1
Row 3
1
0
1
Row 4
1
1
0

(valid for most EDA flows)

How to implement a(ICG) cell from vendor library.

Interview Questions. Main, FPGA, Digital basics.
Solved Examples for 3 variable Kmaps
2. F(x,y,z) =     (0,1,4,5,6,7) - Minimization from here.
3. F(x,y,z) =     (3,4,6,7) - Minimization from here.
4. F(x,y,z) =     (0,1,2,3,4,5,6,7) - Minimization from here.
XOR Truth Table:-

A B Y
0 0 0
0 1 1
1 0 1
1 1 0

XOR equation = A’B + AB’
NOR Truth Table

A B Y
0 0 1
0 1 0
1 0 0
1 1 0

NOR equation = A’ B’
Digital logic gate conversion related interview questions.Lets start our discussion with conversion for xor from nor gate only. The truth tables of XOR and NOR gates are below.
Check the circuit for NOR to inverter (equivalent of NAND to inverter). So the complete circuit for XOR using NOR gates. Diagram shown above.
Reformat XOR equation by following steps below:
XOR is also know as Exclusive OR.
Step 1 :- A'B + AB' +AA’ + BB’ = [(A’+B') (A+B)] using postulate P4 and theorems T7, T8 and T9
Step 2 :- [(AB)'(A’B’)’] using theorems T7, T8 and T9
In step 2, we do invert of A and invert of B.
Derive XOR by only using NOR gates. Steps
Interview Questions. Main, FPGA, Digital Fundamentals