Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Truth table  RSS feed

 
Jesus Rod Valenzuela
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A B C !B !C B||C !(B||C) A&&!(B||C) A&&!B&&!C
0 0 0
0 0 0
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
what does the ! means??
 
Naziru Gelajo
Ranch Hand
Posts: 175
1
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jesus Valenzuela wrote:A B C !B !C B||C !(B||C) A&&!(B||C) A&&!B&&!C
0 0 0
0 0 0
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
what does the ! means??


The ! means not in other forms of Discrete Math, not can look like and an oddly positioned L.
 
Campbell Ritchie
Marshal
Posts: 55681
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Naziru Gelajo wrote:. . . The ! means not in other forms of Discrete Math, not can look like and an oddly positioned L.
Different platforms have different forms of logical operator. You can see ! ~ ¬ NOT in different places. You need the Java® meaning of the bang sign “!”, which is still “not”. You can read about it in the Java® Language Specification (=JLS), where it is called logical complement, or in the Java™ Tutorials. Beware: the JLS can be difficult to read, but I think that section is quite simple. The bang sign ! is a unary operator which has a precedence one below x++ and x-- and it associates to the right.

I am having difficulty reading that table. I shall quote your post and edit it; the text will look like this:-
[table]|| A || B || C || !B || !C || etc ||
| 0 | 0 | 0 | ... ||
| 0 | 0 | 1 | ... ||
| etc ||[/table]

I think you will find it looks a lot better
[edit]Change some | to ||. For the || which you want to appear as || rather than separating columns, use ||
 
Campbell Ritchie
Marshal
Posts: 55681
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ABC!B!CB||C!(B||C)A&&!(B||C)A&&!B&&!C
000??????
000??????
010??????
011??????
100??????
101??????
110??????
111??????
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!