hex.exact_xorΒΆ
{d3,d2,d1,d0} ^= src
d3,d2,d1,d0 are bit-addresses; src is hex.
SignatureΒΆ
def exact_xor d3, d2, d1, d0, src @ switch, end { ... }
Defined in hex/logics.fj β lines 28β50 (view on GitHub).
ComplexityΒΆ
Time:
@Space:
@+12
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def exact_xor d3, d2, d1, d0, src @ switch, end {
wflip src+w, switch, src
pad 16
switch:
;end // 0
d0;end // 1
d1;end // 2
d1;switch+1*dw // 3
d2;end // 4
d2;switch+1*dw // 5
d2;switch+2*dw // 6
d2;switch+3*dw // 7
d3;end // 8
d3;switch+1*dw // 9
d3;switch+2*dw // 10
d3;switch+3*dw // 11
d3;switch+4*dw // 12
d3;switch+5*dw // 13
d3;switch+6*dw // 14
d3;switch+7*dw // 15
end:
wflip src+w, switch
}
Used byΒΆ
Example usesΒΆ
stl.hex2bitincasting.fjhex.xorinhex/logics.fj
β Previous: hex.xor/3
Next: hex.xor_zero/2 β