# Bit By Bit

### Bitwise Operator Calculation

Let's say we have a truth function where each operand is a truth function, all on the same domain. $$ \left(\textbf{B}^m\right)_\beta\ni B_i=\left(\textbf{A}^n\right)_{\alpha_i}\forall i\in\left[1,m\right] $$

It stands to reason that there should be a truth function, on the domain $\textbf{A}^n$, that gives the same results, for each condition value of $\textbf{A}^n$. $$ \left(\textbf{A}^n\right)_\gamma=\left(\textbf{B}^m\right)_\beta\ \forall \left(\textbf{A}^n\right)_\text{CV}\in\left[0,2^n-1\right] $$

If we consider that equality means the expression to the left of the equals sign has the same value as the expression on the right, we can see this as a biconditional, of the two expressions, where a value of one, from the biconditional, means the two expressions are equal. $$ \left(\left(\textbf{A}^n\right)_\gamma,\left(\textbf{B}^m\right)_\beta\right)_\mathtt{0x9} $$

Further, a conjunctive neglect of this biconditional, where $\textbf{A}^n$ is the neglected domain, will only produce a value of one if both expressions return the same value for every condition value of $\textbf{A}^n$, as required in equation (2). $$ \left<\left(\left(\textbf{A}^n\right)_\gamma,\left(\textbf{B}^m\right)_\beta\right)_\mathtt{0x9}\right>^{\left(\textbf{A}^n\right)}_\cap=1 $$

By the definition of a neglect function we know that equation (4) is a proxy for a conjunction of semi-parses of the form: $$ C_i=\left.\left(\left(\textbf{A}^n\right)_\gamma,\left(\textbf{B}^m\right)_\beta\right)_\mathtt{0x9}\right|_{\left(\textbf{A}^n\right)_\text{CV}=i}\forall i\in\left[0,2^n-1\right] $$ Which all become: $$ C_i=\left(\gamma_i,\left(\alpha^1_i,\alpha^2_i,\ldots,\alpha^{m-1}_i,\alpha^m_i\right)_\beta\right)_\mathtt{0x9} $$

Where $\alpha^j_i$ is the $i^\text{th}$ parse of the operator $\alpha_j$. The conjunctive neglect requires all $C_i$ to be equal to one. $$ \left(\gamma_i,\left(\alpha^1_i,\alpha^2_i,\ldots,\alpha^{m-1}_i,\alpha^m_i\right)_\beta\right)_\mathtt{0x9}=1 $$

As noted in the beginning, when a biconditional returns one, it's two terms have the same value. $$ \gamma_i=\left(\alpha^1_i,\alpha^2_i,\ldots,\alpha^{m-1}_i,\alpha^m_i\right)_\beta $$

Which is to say, the value of $\gamma$ is calculated one parse at a time, using the very truth function, $\beta$, that originally defined the problem. To barrow from computer sciences, this type of calculation is bitwise; noting that each parse represents a bit in the binary number that is a truth function's operator.

As is my habit, I feel the regular use of this property warrants special notation. Since this bitwise function so resembles truth functions I will simply replace the parentheses with square brackets. So the bitwise calculation of $\gamma$ is written: $$ \gamma=\left[\alpha_1,\alpha_2,\ldots,\alpha_{m-1},\alpha_m\right]_\beta $$

**Example 1:**$\left(B,A\right)_\alpha=\left(A,B\right)_\mathtt{0xD}$

In order to calculate $\alpha$, using bitwise truth functions, all truth functions need to have the same domain; in particular, they should be in the domain of $\alpha$. To do this, consider $A$ to be a truth function with the standard operators $\sigma^2_2$, and $B$ a truth function with the operator $\sigma^2_1$. $$ \left(B,A\right)_\alpha=\left(\left(B,A\right)_{\sigma^2_2},\left(B,A\right)_{\sigma^2_1}\right)_\mathtt{0xD}\nonumber $$

With all terminal truth functions in the same domain the bitwise truth function can be written, $$ \alpha=\left[\sigma^2_2,\sigma^2_1\right]_\mathtt{0xD}\nonumber $$

Using standard operator values the bitwise function can easily be evaluated, $$ \alpha=\left[\mathtt{0xC},\mathtt{0xA}\right]_\mathtt{0xD}=\mathtt{0xB}\nonumber $$

Substituting $\alpha$ into the original truth functions then produces: $$ \left(B,A\right)_\mathtt{0xB}=\left(A,B\right)_\mathtt{0xD}\nonumber $$

**Example 2:**$\left(A,B,C\right)_\alpha=\left(A,\left(B\right)_\mathtt{0x1},C\right)_\mathtt{0xE4}$

Again, the first step is put all of the terminal truth functions into the same domain as $\alpha$. $$ \left(A,B,C\right)_\alpha=\left(\left(A,B,C\right)_{\sigma^3_1},\left(\left(A,B,C\right)_{\sigma^3_2}\right)_\mathtt{0x1},\left(A,B,C\right)_{\sigma^3_3}\right)_\mathtt{0xE4}\nonumber $$ Thus allowing $\alpha$ to be written as a bitwise truth function. $$ \alpha=\left[\sigma^3_1,\left[\sigma^3_2\right]_\mathtt{0x1},\sigma^3_3\right]_\mathtt{0xE4}\nonumber $$

Then substituting values for $\sigma^3_1$, $\sigma^3_2$ and $\sigma^3_3$ allows $\alpha$ to be calculated. $$ \alpha=\left[\mathtt{0xAA},\left[\mathtt{0xCC}\right]_\mathtt{0x1},\mathtt{0xF0}\right]_\mathtt{0xE4}=\left[\mathtt{0xAA},\mathtt{0x33},\mathtt{0xF0}\right]_\mathtt{0xE4}=\mathtt{0xB1}\nonumber $$

Finally, substituting $\mathtt{0xB1}$ for $\alpha$ yields: $$ \left(A,B,C\right)_\mathtt{0xB1}=\left(A,\left(B\right)_\mathtt{0x1},C\right)_\mathtt{0xE4}\nonumber $$