Right Projection (or Projection Q), is a part of programming logic that always returns the right-side value in a Truth table. That is to say, for values P and Q in a truth table, the right projection always reflects the value (or state, if Boolean) of q.
To put it visually, where X is the right projection of (p, q):
P | Q | X |
---|---|---|
T | T | T |
T | F | F |
F | T | T |
F | F | F |
List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).
contradiction/falsehood
Contradiction/Falsehood: Setting every bit to 0; Outputting logically false to all possible logical inputs.
Demonstration of the indicated keyword.
If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:
/* * */ #include <stdio.h> #include <stdlib.h> // program to always output false where false = 0 char false(char, char); //function prototype int main( ) { char p = 0; char q = 0; char result = 0; printf("P | Q | X \n"); printf("------------------\n"); printf("%d | %d | %d \n", p, q, false(p, q)); q = 1; printf("%d | %d | %d \n", p, q, false(p, q)); p = 1; q = 0; printf("%d | %d | %d \n", p, q, false(p, q)); p = 1; q = 1; printf("%d | %d | %d \n\n", p, q, false(p, q)); printf("Input P: \n"); scanf("%hhd", &p); printf("Input Q: \n"); scanf("%hhd", &q); scanf("%hhd", &q); result = false(p, q); printf("Result is: %hhd\n\n", result ); return(0); } //function definition char false(char a, char b) { char x; if(b==1) x=0; else if(b==0) x=0; return(x); }