Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 899

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 899

Warning: Cannot modify header information - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 531

Warning: Cannot modify header information - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 532

Warning: Cannot modify header information - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 533

Warning: Cannot modify header information - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/bootstrap.inc on line 534
Logical Operations | Configure Install Setup Web CMS Configuration

Logical Operations

warning: Cannot modify header information - headers already sent by (output started at /home/content/k/h/a/khairisuleiman/html/index.php:3) in /home/content/k/h/a/khairisuleiman/html/includes/common.inc on line 141.

How The Logical Operations Works

This section will, provide a brief review and explanation of the common logical bitwise operations AND, OR, XOR and NOT. Logical operations are performed between two data bits (except for NOT). Bits can be either "1" or "0", and these operations are essential to performing digital math operations.

In the "truth tables" below, the input bits are in bold, and the results are plain.

AND
The logical AND operation compares 2 bits and if they are both "1", then the result is "1", otherwise, the result is "0".

 A  B AND
1  0  0
 0  0 0
 1  1  1


OR
The logical OR operation compares 2 bits and if either or both bits are "1", then the result is "1", otherwise, the result is "0".

 A B  OR
 1  0  1
 0  0  0
 1  1  1

XOR
The logical XOR (Exclusive OR) operation compares 2 bits and if exactly one of them is "1" (i.e., if they are different values), then the result is "1"; otherwise (if the bits are the same), the result is "0".

 A B
 XOR
 1  0  1
 0  0  0
 1  1  0

NOT
The logical NOT operation simply changes the value of a single bit. If it is a"1 ", the result is "0"; if it is a"0", the result is "1". Note that this operation is different in that instead of comparing two bits, it is acting on a single bit.

A
NOT
 0  1
 1  0


Custom Search