User Tools

Site Tools


opus:fall2012:tedmist1:discretepart1

Converse Implication, Discrete

Definition

For any two propositions P and Q, if Q implies P, then P is the converse implication of Q.

It may take the following forms:

  1. p⊂q
  2. Bpq
  3. p←q
 P  |  Q  | XNq  
 _  _  _  _  _  
 0  |  0  |  0 
 0  |  1  |  0 
 1  |  0  |  1 
 1  |  1  |  0

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

Discrete Keyword Phase 2

Nonconjunction/Not Both … And.

Definition

The relation among the components of such a proposition, usually expressed by AND or & or ·

References

Discrete Keyword 1 Phase 2 Phase 2

Left Projection

Definition

The left-shift operator causes the bit pattern in the first operand to be shifted to the left by the number of bits specified by the second operand. The value of a left-shift expression x « y is x * 2y

References

Demonstration (Left Projection)

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
  unsigned int i;
  int j;
  int input;
 
  i = 1;
 
printf("Enter a number to end your projection on: ");
scanf("%d", &input);
 
  for(j = 0; j < input ; j++)
{
    i = i << 1;
    printf("Left shift %d: %d(%X)\n", j, i);
}
 
return (0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd ./src/discrete
lab46:~/src/discrete$ ls
big  bigl  bigl.c  bignum.c  bit  bitwise.c  ctruth  ctruth.c  inc  inc.c  sets.c  sort  sort.c
lab46:~/src/discrete$ ./bit
Enter a number to end your projection on: // Choose any number here \\ 9
Left shift 0: 2(0)
Left shift 1: 4(1)
Left shift 2: 8(2)
Left shift 3: 16(3)
Left shift 4: 32(4)
Left shift 5: 64(5)
Left shift 6: 128(6)
Left shift 7: 256(7)
Left shift 8: 512(8)
  Numbers in ( ) represent hexadecimal format, for when it becomes applicable at larger projection numbers.
opus/fall2012/tedmist1/discretepart1.txt · Last modified: 2012/09/30 02:33 by tedmist1