01-06-2016, 08:01 AM
This work was inspired by PabloDons's BLE ALU.
The Half And Full Subtractor
As we know from our standard adder designs, we create subtraction by simply taking a full adder and Carrying In while inverting one of the inputs.
The reason we do this is because that logic models a full subtractor's logic.
Here is our truth table for an XOR compared to a Subtractor.
0 xor 0=0 0-0=0
0 xor 1=1 0-1=-1
1 xor 0=1 1-0=1
1 xor 1=0 1-1=0
The only difference is 0-1 equals negative one. In a standard RC subtractor, we would simply borrow to the next bit to represent negative. This is represented by a NIMPLIES gate.
This logic is better explained in Pablo's thread on BLE's.
Pablo's BLE
The CCA Implementation.
In order to understand BCS, I am going to compare it to CCA.
The basic logic of the CCA is that a carry is propagated until it reaches a condition where it cant be propagated (ie. NOR), where it will then stop propagating.
In BCS, we do the exact same thing except that we propagate a borrow (B Nimplies A) until it reaches a cell where it can no longer propagate (ie. A NIMPLIES B) which will act as our cancel.
As many people have discovered, there are difficulties using AND as the carry for CCA adders. Using B Nimplies A as the borrow for BCS also causes difficulties. Therefore, I use XOR instead of B NIMPLIES A because the only case where XOR is wrong (A NIMPLIES B) is also the same case where the borrow is cancelled, negating the problem the same way NOR negates the problem of XNOR propogating with no inputs on in CCA.
So here are the three stages of BCS.
First Half Adder=XOR, A Nimplies B
Carry Logic=Slab Tower With Comparator
Second Half Adder= XOR
This is also relatively easy to make into an ALU as I have shown here. This example shown has B Nimplies A rather than OR, but is otherwise like any other CCA in the general concept of it's parts.
If you want to check this model out, try /warp BCS_ALU
If you want to see Pablo's model (which sadly does not have it's logic explained) try /warp BCS
The Half And Full Subtractor
As we know from our standard adder designs, we create subtraction by simply taking a full adder and Carrying In while inverting one of the inputs.
The reason we do this is because that logic models a full subtractor's logic.
Here is our truth table for an XOR compared to a Subtractor.
0 xor 0=0 0-0=0
0 xor 1=1 0-1=-1
1 xor 0=1 1-0=1
1 xor 1=0 1-1=0
The only difference is 0-1 equals negative one. In a standard RC subtractor, we would simply borrow to the next bit to represent negative. This is represented by a NIMPLIES gate.
This logic is better explained in Pablo's thread on BLE's.
Pablo's BLE
The CCA Implementation.
In order to understand BCS, I am going to compare it to CCA.
The basic logic of the CCA is that a carry is propagated until it reaches a condition where it cant be propagated (ie. NOR), where it will then stop propagating.
In BCS, we do the exact same thing except that we propagate a borrow (B Nimplies A) until it reaches a cell where it can no longer propagate (ie. A NIMPLIES B) which will act as our cancel.
As many people have discovered, there are difficulties using AND as the carry for CCA adders. Using B Nimplies A as the borrow for BCS also causes difficulties. Therefore, I use XOR instead of B NIMPLIES A because the only case where XOR is wrong (A NIMPLIES B) is also the same case where the borrow is cancelled, negating the problem the same way NOR negates the problem of XNOR propogating with no inputs on in CCA.
So here are the three stages of BCS.
First Half Adder=XOR, A Nimplies B
Carry Logic=Slab Tower With Comparator
Second Half Adder= XOR
This is also relatively easy to make into an ALU as I have shown here. This example shown has B Nimplies A rather than OR, but is otherwise like any other CCA in the general concept of it's parts.
If you want to check this model out, try /warp BCS_ALU
If you want to see Pablo's model (which sadly does not have it's logic explained) try /warp BCS