Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Juan Toranzo

#1
newLISP in the real world / Bitwise operators
June 19, 2012, 09:29:52 AM
I am new to this forum.



I would like to ask for an improvement to the bitwise operators documentation. Especially to the & (bitwise and), |(bitwise or), ^ (bitwise xor), and ~(bitwise not) operators.



For example:

(= (& 11 10) 10)

(= (& 111 100) 100)



as I expected, but

(= (& 1000 0010) 8) ; I was expecting 0

(= (& 11111 10101) 9061) ; I was expecting 10101

(= (& 0101 1000) 64)

(= (& 1010 1111) 82)

(= (& 1010 1111) 82)



Thanks in advance.