[Coco] replicating bitwise operators in BASIC

Dave Philipsen dave at davebiz.com
Fri Sep 9 15:23:47 EDT 2016


The less complicated way of doing this on a CoCo (since it has an 'OR' 
operator) would be:

10 A = 0: B = 0: GOSUB 100
20 A = 1: B = 0: GOSUB 100
30 A = 0: B = 1: GOSUB 100
40 A = 1: B = 1: GOSUB 100
90 STOP
100 Q = NOT ( A AND B ) AND ( A OR B )
110 PRINT "A = ";A;" B = ";B;" Q = ";Q
120 RETURN



On 9/9/2016 2:04 PM, Allen Huffman wrote:
> The funnest thing is that actually achieves a real result :)
>
> Did someone offer to create a USR() function to do this?
>
>> On Sep 9, 2016, at 2:02 PM, Rogelio Perea <os9dude at gmail.com> wrote:
>>
>> On Fri Sep 9 2016 Allen Huffman wrote:
>>
>> Yep, this is why people hate computers...
>>> Q = NOT ( NOT ( NOT ( A AND B ) AND A ) AND NOT ( NOT ( A AND B ) AND B )
>>> )
>>>
>>>
>> You kidding? no hate here: this has been one of the most logical and
>> interesting exchanges on this list as of late!
>>
>> Looooove it :-)
>>
>>
>> -- RP
>>
>> -- 
>> Coco mailing list
>> Coco at maltedmedia.com
>> https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list