Most voted "logical-operator" questions
10 questions
Sort by count of
-
8
votes2
answers772
viewsHow does XOR work for two binaries with more than one digit?
I learned that the XOR operator works as OR Exclusive, that is, the end result is only 1 when only one of the operators is equal to 1. The truth table illustrates this well: My question is: how the…
-
2
votes4
answers258
viewsHow is this operator not working in this code?
Code: var i = 0, finished = false; while( (i < acentos.length) && !finished){ Question: I have a variable bool receiving false, and in my while I am denying her. If I’m denying a false…
javascript operators logic boolean logical-operatorasked 7 years, 4 months ago Nicolas Guilherme Matheus 502 -
2
votes4
answers90
viewsIs there a difference in these two querys?
Is there any difference in these two querys? What is the difference of using parentheses in and? SELECT * FROM produto WHERE grupo = 'bebidas' AND preco < 10 OR estoque <= 100 ORDER BY estoque…
-
1
votes1
answer72
viewsOR returns unexpected result
I’m performing that function SELECT COUNT(id) FROM `system_stats` WHERE `name` = 1 OR 0 AND `us_id` = 0 It returns me a value equal to 1, but this 1 no, when I run separately this way, it returns me…
-
1
votes2
answers8005
viewsWhat is the difference between the logical operators NOT, AND and OR?
I’m studying Boolean algebra and about logic gates, and I know that these logic operators and logic gates are used in digital systems, programming and electronics. The 3 main operators of Boolean…
-
1
votes2
answers457
viewsWhy doesn’t my while work?
I’m studying repetition structure and in one of the exercises I had to check the sex typed, so I made the following code: sexo = input("digite m ou f: ") while sexo != 'f' or sexo != 'm': sexo =…
-
1
votes1
answer102
viewsHow does Python determine if a value is true?
I have the following doubt: >>> a = [200,100] >>> a[True] Exit >>> 100 >>> a = [200,100] >>> a[False] Exit >>> 200 Why does this happen? The…
-
1
votes1
answer35
viewsR and Postgresql - AND/OR and BEETWEN/NOT BEETWEN how to help logic?
I need to get some information from the postgresql database through R . However, the filters are not downloading what I want. I would like to download only the cnaes of companies with cadastral…
-
0
votes1
answer47
viewsUse of multiple conditionals in an SQL query
I’m wondering how to perform a query with different conditionals. The query is a login validation, I need to check if the data contained in the user input is equal to the username or email or Cpf…
-
-1
votes1
answer49
viewsWhat would be the name of this "technique"?
int valorNo = (p->left == NULL && p->right == NULL) ? p->key : 0; I saw it in an answer here in the stack and I have no idea how it works, much less how to "read" it.…