[Coco] replicating bitwise operators in BASIC

Dave Philipsen dave at davebiz.com
Sat Sep 10 01:04:02 EDT 2016


Looks like ECB will do boolean logic up to 15 bits.


On 9/9/2016 11:19 PM, Melanie and John Mark Mobley wrote:
> The following math will xor the 8-bits of A with the 8-bits of B.  I think
> it is 8-bits.  In assembly its 8-bits.
> Q= (NOT A AND B) OR (A AND NOT B)
> QN=NOT Q
> QN=(NOT A AND NOT B) OR (A AND B)
>
> XOR is used for parity It test for even or odd.  Do you have an even number
> of bits or an odd number of bits.
>
> The following math will give a 1-bit answer.
> A=1
> B=0
> Q=(A+B) AND 1
> Q=1 if A+B is odd.
>
> John Mark Mobley
>
>
>



More information about the Coco mailing list