Re: Logic Operators with 3 arguments
- From: pamelafluente@xxxxxxxxx
- Date: 1 Oct 2006 01:54:11 -0700
Terry Olsen ha scritto:
Thanks Terry,
let's see tham for general numbers (bitwise operators, instead of
boolean).
If I understand correctly, you are suggesting:
1. Return Not (a and b and c)
2. Return Not (a or b or c)
I am not sure for the 3-rd. Would that be:
3. Return Not (a xor b xor c)
?????????????? or what ?
-P
Just look at the truth table for these and you'll see how to do it.
http://hyperphysics.phy-astr.gsu.edu/HBASE/electronic/nand.html
Private Function NAND(byval a as boolean, byval b as boolean, byval c as
boolean) as boolean
if a=True and b=True and c=True then Return False
Return True
End Function
http://hyperphysics.phy-astr.gsu.edu/HBASE/electronic/nor.html
Private Function NOR(byval a as boolean, byval b as boolean, byval c as
boolean) as boolean
if a=True or b=True or c=True then Return False
Return True
End Function
http://hyperphysics.phy-astr.gsu.edu/HBASE/electronic/xnor.html
Private Function XNOR(byval a as boolean, byval b as boolean, byval c as
boolean) as boolean
if a=b and a=c then Return True
Return False
End Function
.
- References:
- Logic Operators with 3 arguments
- From: pamelafluente
- Re: Logic Operators with 3 arguments
- From: Terry Olsen
- Logic Operators with 3 arguments
- Prev by Date: Re: (newbie - VB2005) writing to file
- Next by Date: Re: Think BEFORE you post.
- Previous by thread: Re: Logic Operators with 3 arguments
- Next by thread: Re: regex question
- Index(es):
Relevant Pages
|