[Semibug] Need Help with C language

Jonathan Drews jondrews at fastmail.com
Sun Oct 17 18:23:12 EDT 2021


I think I understand what is going on. Just as i = i + 1  can be written as
i += 1 so also can i = ( i << 1 ) be written as i <<=  1. Am I understanding that correctly?

On Sun, Oct 17, 2021, at 09:47, Job Snijders wrote:
> On Sun, Oct 17, 2021 at 09:43:40AM -0600, Jonathan Drews wrote:
> > I know that it << 1 is a bitwise shift operation. What does it <<= 1 mean?
> 
> This is a 'bitwise assignment operator'.
> 
> The string '<<=' means "left shift assignment"
> 
> https://en.wikipedia.org/wiki/Bitwise_operations_in_C
> 
> Kind regards,
> 
> Job
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nycbug.org/pipermail/semibug/attachments/20211017/27a12d5d/attachment.htm>


More information about the Semibug mailing list