Fixed Point Math

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
waluigi
Member++
Posts: 22
Joined: Sun Nov 07, 2010 6:33 pm

Post by waluigi »

lilltroll wrote:SHL Shift left
Shifts a word left by y bits, filling the least significant y bits with zeros.

0xFFFF00000000 <<16 =? 0 != -1

Please correct me if I'm mistaken
I'm not really sure why you've got so many zeros there, but as an example

0xFFFF0000 << 16 = 0

If you want to be really sure add some masks by all means.