List of tutorials

Find detailed help from the AAO community, or write your own tutorials.

Modérateur: EN - Forum Moderators

Re: List of tutorials 

Message par Singapore123 » Ven Jan 13, 2012 8:51 am

Saw the tips and tricks, but still wanted to know: Is it possible to use variables to check if and ONLY if 1 input is on. 2 inputs is easy, make those (NOT,AND,OR) gates into a XOR gate, but I want it to be like 3-5 inputs. So if one and ONLY one input is on, the output is on. If no easy way, I will have to go back to minecraft and make some logic gates...
Avatar de l’utilisateur
Singapore123
 
Message(s) : 2085
Inscription : Mer Mai 05, 2010 8:56 am
Genre: Masculin
Langues parlées: English, 1337, french, spanish,

Re: List of tutorials 

Message par Bad Player » Ven Jan 13, 2012 3:38 pm

You mean, you want it to check if one and only one variable is true? It's kinda long, but you could use

(var1 & !var2 & !var3 & !var4 & !var5) | (!var1 & var2 & !var3 & !var4 & !var5) | (!var1 & !var2 & var3 & !var4 & !var5) | (!var1 & !var2 & !var3 & var4 & !var5) | (!var1 & !var2 & !var3 & !var4 & var5)
Avatar de l’utilisateur
Bad Player
 
Message(s) : 7212
Inscription : Mer Mai 20, 2009 10:53 pm
Localisation : Under a bridge
Genre: Masculin
Langues parlées: American

Re: List of tutorials 

Message par Singapore123 » Ven Jan 13, 2012 3:52 pm

That's the simplest one, but I can try to make it smaller, but thanks!
Avatar de l’utilisateur
Singapore123
 
Message(s) : 2085
Inscription : Mer Mai 05, 2010 8:56 am
Genre: Masculin
Langues parlées: English, 1337, french, spanish,

Re: List of tutorials 

Message par Meph » Sam Jan 14, 2012 2:53 am

Post questions in their own topic in future, please, Singapore. :)
Avatar de l’utilisateur
Meph
 
Message(s) : 13439
Inscription : Lun Nov 10, 2008 10:07 pm
Localisation : Probably Disneyland Paris... or the UK
Genre: Masculin
Langues parlées: English

Re: List of tutorials 

Message par henke37 » Sam Jan 14, 2012 4:37 pm

Add them up and check if the result is exactly one.
Currently working on a redesign of Court-records.net.
Avatar de l’utilisateur
henke37
Security expert / tools programmer
 
Message(s) : 3031
Inscription : Mer Mars 04, 2009 9:42 pm
Localisation : Sweden
Genre: Masculin
Langues parlées: Swedish,English

Re: List of tutorials 

Message par Bad Player » Sam Jan 14, 2012 4:40 pm

henke37 a écrit :Add them up and check if the result is exactly one.

I almost wrote "although henke might have a more elegant solution" at the end of my previous post :P
Avatar de l’utilisateur
Bad Player
 
Message(s) : 7212
Inscription : Mer Mai 20, 2009 10:53 pm
Localisation : Under a bridge
Genre: Masculin
Langues parlées: American

Re: List of tutorials 

Message par Singapore123 » Dim Jan 15, 2012 6:13 am

Great Idea!
Avatar de l’utilisateur
Singapore123
 
Message(s) : 2085
Inscription : Mer Mai 05, 2010 8:56 am
Genre: Masculin
Langues parlées: English, 1337, french, spanish,

Précédent

Retour vers Tutorials

Qui est en ligne ?

Utilisateur(s) parcourant ce forum : Aucun utilisateur inscrit et 1 invité