Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Bitwise operation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Truth table for all binary logical operators === There are 16 possible [[truth function]]s of two [[binary variable]]s; this defines a [[truth table]]. Here is the bitwise equivalent operations of two bits P and Q: {| class="wikitable" style="margin:1em auto 1em auto; text-align:center;" |- ! ''p'' !! ''q'' | rowspan=5 style="border-bottom:none" | ! [[Contradiction|F]]<sup>0</sup> ! [[Logical NOR|NOR]]<sup>1</sup> ! [[Converse nonimplication|Xq]]<sup>2</sup> ! [[Negation|'''Β¬p''']]<sup>3</sup> ! [[Material nonimplication|β]]<sup>4</sup> ! [[Negation|'''Β¬q''']]<sup>5</sup> ! [[XOR]]<sup>6</sup> ! [[Logical NAND|NAND]]<sup>7</sup> | rowspan=5 style="border-bottom:none" | ! [[Logical conjunction|AND]]<sup>8</sup> ! [[Logical biconditional|XNOR]]<sup>9</sup> ! [[Projection function|q]]<sup>10</sup> ! [[Material conditional|If/then]]<sup>11</sup> ! [[Projection function|p]]<sup>12</sup> ! [[Converse implication|Then/if]]<sup>13</sup> ! [[Logical disjunction|OR]]<sup>14</sup> ! [[Tautology (logic)|T]]<sup>15</sup> |- ! 1 !! 1 | 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 1 || 1 || 1 || 1 || 1 || 1 || 1 || 1 |- ! 1 !! 0 | 0 || 0 || 0 || 0 || 1 || 1 || 1 || 1 || 0 || 0 || 0 || 0 || 1 || 1 || 1 || 1 |- ! 0 !! 1 | 0 || 0 || 1 || 1 || 0 || 0 || 1 || 1 || 0 || 0 || 1 || 1 || 0 || 0 || 1 || 1 |- ! 0 !! 0 | 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1 |- ! colspan="2" | Bitwise <br/>equivalents | style="border-top:none" | ! <small>0</small> ! <small>NOT <br/>(p OR q)</small> ! <small>(NOT p) <br/>AND q</small> ! <small>NOT <br/>p</small> ! <small>p AND <br/>(NOT q)</small> ! <small>NOT <br/>q</small> ! <small>p XOR q</small> ! <small>NOT <br/>(p AND q)</small> | style="border-top:none" | ! <small>p AND q</small> ! <small>NOT <br/>(p XOR q)</small> ! <small>q</small> ! <small>(NOT p) <br/>OR q</small> ! <small>p</small> ! <small>p OR <br/>(NOT q)</small> ! <small>p OR q</small> ! <small>1</small> |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)