+===========================================+
|Boolean Diagram (C)2008 Timothy Robert Keal|
+=====================+=====================+
| Inputs 0 | |
| { Inputs 1} | |
|{{ Inputs 2}}| |
+=====================+=====================+
| | |
+---------------------+---------------------+
| FALSE . . . 0 | . . . 1 TRUE |
+=====================+=====================+
| {A . 1 . 0} | |
+---------------------+---------------------+
| FALSE . 0 . 0}}| . 1 . 1 TRUE |
| {A NOT . 0 . 1} | {. 1 . 0 A } |
+=====================+=====================+
| {A 1 1 0 0} |{{1 0 1 0 B}}|
+---------------------+---------------------+
| FALSE 0 0 0 0 | 1 1 1 1 TRUE |
|{{A NOR B 0 0 0 1}}|{{1 1 1 0 A OR B}}|
|{{ JUST B 0 0 1 0}}|{{1 1 0 1 A LIMP B}}|
| {A NOT 0 0 1 1} | {1 1 0 0 A } |
+~~~~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~+
|{{A JUST 0 1 0 0}}|{{1 0 1 1 A IMP B}}|
|{{ NOT B 0 1 0 1}}|{{1 0 1 0 B}}|
|{{A XOR B 0 1 1 0}}|{{1 0 0 1 A XNOR B}}|
|{{A NAND B 0 1 1 1}}|{{1 0 0 0 A AND B}}|
+====================+=====================+
Remember it looks like crap if you don't set mono-space to at-least Courier New via override in your browser.
Sorry, but if you can't figure out that chart, there is no way you'll be able to modify a rom without using a pre-fab utility.
So I will help you out by explaining.
Let's say each series of 4 numerals is numbered 3,2,1,0. These are the bits from from the truth-table of output.
True is ". . . 1", False is ". . . 0".
True is also ". 1 . 1", also "1 1 1 1".
False is also ". 0 . 0", also "0 0 0 0".
It is just a matter of how many inputs.
Every time you double the inputs, you clone every bit as two repeated bits of the orignal bit in the truth table.
Each base 2 logarithm of each index, from right to left (the "3 2 1 0") is simply a new axis of possible output bits within the associated truth table.
Meaning:
". . . 0" 0 Inputs
". 1 . 1" 1 Input
"2 2 2 2" 2 Inputs
The diagram cycles thru the operations counter clockwise down the first column then up the second.
The left and right columns for truth tables between each starting "---" row and each ending "===" row are inversions of each other, meaning left side is boolean "NOT" of the other side and vice versa.
In "3 2 1 0"; it goes "both a,b", "just a", "just b", "neither a,b".
A lack of bracers mean no inputs.
One set of bracers means 1 input.
Two nested bracers means 2 inputs.
Even though "B" is one input, I put two bracers around it because "B" cannot be defined without already defining "A". This is because "B" only is defined when there are two or more inputs.
Each "===" row separates an independent section of the diagram.
Each "---" row separates the top half (the input mask) and the bottom half (the truth table mask).
Each "~~~" row simply binary-splits the 2 input set of truth tables into 4 quadrants of input.
And that is it.
Hopefully, this detail makes the chart easier to comprehend.