novice said:
even i have tried but to no avail. interesting problem???
This is a pretty simple assignment, and seeing as it's the season of
goodwill, I'll help you out.
Reading the datasheet
"The LS155 and LS156 can be used to generate all four minterms of two
variables. These four minterms are useful in some applications
replacing multiple gate functions..."
Generating a result for each minterm means each possible input
combination is detected. (That's what a decoder does, after all).
As each one is detected, it's pretty simple to get the equivalent of an
XOR, but the decoder will have two outputs valid for the XOR function.
(The XOR two-input truth table has two high outputs for the 4 possible
input combinations. Note I am using 'positive logic' to say 'when the
output is a logical 1, the input term is satisfied').
One solution (There are more than one)
Inputs A and C go to the A0 and A1 pins (which way around is irrelevant
in this case)
Enable decoder 'A', disable decoder 'B' (See the datasheet on how to do
it)
Take the #O1 and #O2 outputs to the inputs of a two input NAND. The
output of the NAND will be high when the A0 and A1 inputs are different
(one definition of an XOR). Now figure out why that is so. (#O1 means
'Output 1, which is active when low').
Cheers
PeteS