Wednesday, July 14, 2010

Logical Operations Using Mathematical Operands

How do you implement logical operations using mathematical operands? (Considering logic 0 and 1 to be numerical values)

2 Input AND:
This is one of the simplest ones; considering I1 and I2 as inputs and Y as output
Y = I1 x I2
Only when both I1 and I2 are equal to 1 shall the output be 1.

Now lets try to implement for other logic gates as well

2 Input OR:
Y = I1 + I2 - (I1 x I2)

NOT Gate:
Y = 1 - I

2 Input NOR:
Y = (1 - I1) x (1 - I2)

2 Input NAND:
Y = 2 - (I1 + I2) + {(1 - I1) x (1 - I2)}

2 Input XOR:
Y = (I1 x I2) + {(1 - I1) x (1 - I2)}

2 Input XNOR:
Y = {I1 x (1 - I2)} + {(1 - I1) x I2}

No comments:

Post a Comment