Page 301 - FUNDAMENTALS OF COMPUTER
P. 301
NPP
NPP Number System, Boolean Algebra and Logic Circuits 301
Truth Table: 2-input XOR gate
A A A B B B Y Y
Y=A B⊕=A B⊕=A B⊕
0 0 0 0 0 0 0 0 0
0 0 0 1 1 1 1 1 1
1 1 1 0 0 0 1 1 1
1 1 1 1 1 1 0 0 0
Symbol: 2-input XOR gate 2-BZnwQ> XOR H$m g§Ho$V
A
B Y = A + B
The Boolean expression for the output of XOR JoQ> Ho$ AmCQ>nwQ> H$m ì`§OH$ Bg àH$ma h¡ …
XOR gate is:
Y = A .B + A. B
Therefore we can write that Bgr{bE h_ H$h gH$Vo h¢ {H$
A⊕ A B = .B + A. B
Looking to the Truth Table of 2-input XOR Cnamoº$ gË`-Vm{bH$m H$mo XoIZo na `h ñnîQ> hmoVm
gate it is clear that XOR gate gives Zero at the h¡ {H$ `{X A = B h¡ Vmo AmCQ>nwQ> 0 hmoJm AÝ`Wm AmCQ>nwQ>
output when A=B and the output is one when A
is not equal to B. Therefore this property of 2- 1 hmoJm (A ≠ B ). Bgr{bE XOR JoQ> Xmo {~Q>m| H$s VwbZm
input XOR gate can be used to compare two bits. H$aZo H$m H$m`© H$aVm h¡Ÿ& Bgo H$ånoaoQ>a Zm_H$ n[anW _|
Thus, XOR gate is used in comparator circuits Cn`moJ H$aVo h¢, Omo Xmo ~mBZar g§»`mAm| H$s VwbZm H$a
which are used to compare two Binary numbers. gH$Vm h¡Ÿ&
Another property of XOR gate is clear from Bgr Vah gË`-Vm{bH$m go `h ^r ñnîQ> h¡ {H$ EH$
the truth table: The output of XOR gate is XOR JoQ> Xmo {~Q>m| H$m A§H$ J{UVr` `moJ àXmZ H$aVm h¡Ÿ&
arithmetic sum of all the input bits. Therefore Bgr{bE BgH$m Cn`moJ H$åß`yQ>a Ho$ Eogo n[anWm| _| {H$`m
XOR gate is used in Adder circuits which are OmVm h¡ Omo Xmo ~mBZar g§»`mAm| H$mo Omo‹S>Zo H$m H$m`© H$aVo
used to add two binary numbers. Interestingly h¢Ÿ& Eogo n[anWm| H$mo ~mBZar EoS>a H$hVo h¢Ÿ& gmW hr BgH$m
the XOR gate output gives difference of two bits. Cn`moJ Xmo {~Q>m| H$mo KQ>mZo Ho$ {bE ^r {H$`m OmVm h¡Ÿ& Eogo
Therefore it is also used in subtractor circuit. n[anW H$mo g~Q´>oŠQ>a H$hVo h¢Ÿ&
The XOR gate can also be used as a parity XOR JoQ> H$m Cn`moJ no[aQ>r H$mo Om±MZo Ho$ {bE ^r
checker. Give the binary number at the inputs {H$`m OmVm h¡Ÿ& Š`m|{H$ BZnwQ> na `{X 1 H$s g§»`m {df_
of the XOR gate. The output is one for odd
number of ones and is Zero for even number of h¡ Vmo AmCQ>nwQ> 1 hmoJm AÝ`Wm AmCQ>nwQ> eyÝ` hmoJmŸ&
ones. XOR gate can also be used in parity BgH$m Cn`moJ no[aQ>r MoH$a d no[aQ>r OZaoQ>a Zm_H$ n[anWm|
generators. _| hmoVm h¡Ÿ&