+ 3

Somebody help me in Boolean logic under (not) seem hard to me please help

31st Dec 2017, 7:04 PM
@Rich_WMB
@Rich_WMB - avatar
6 Respostas
+ 18
!true = false !!false=true !!!false=true !!!false = false //when we use && , then all expression must be true for returning true as final answer //when or , then even if any one expression returns true , then final answer will return true else false //example ::: (true && false) =false , (true or false) =true //for even number of !'s , its the boolean value itself bcz all !'s get neutralised //for odd number of !'s , its the reverse of boolean value //hope it helps â˜ș
31st Dec 2017, 7:36 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 3
"Not" simply mean invert. True is false: false is true.
31st Dec 2017, 7:08 PM
josh mizzi
josh mizzi - avatar
+ 1
what do you need help with
31st Dec 2017, 7:08 PM
death
death - avatar
+ 1
He said he didn't understand what "not" means
31st Dec 2017, 7:09 PM
josh mizzi
josh mizzi - avatar
+ 1
so you would use not for when you need it to be swapped so if you use 1=2 it would be false but if you use not 1=2 then it would be true
31st Dec 2017, 7:27 PM
death
death - avatar
- 1
@Richard Wambogo Sometimes not is much simpler to write: For example if you want to execute a statement if a character is anything but ‘a’ or ‘z’. How would you write that? If (x==‘b’)or(x==‘c’)or...(x==‘y’) Or you can write If not ((x==‘a’)or(x==‘z’)) This is the same as: If (x!=‘a’) and(x!=‘z’) Or if for example you had 2 conditions x can be anything but ‘a’ and y can be anything but ‘z’. Isn’t the following simpler: If not ((x==‘a’)and(y==‘z’))
31st Dec 2017, 9:56 PM
H Chiang