Checked shift?

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jul 31 13:14:42 PDT 2014


H. S. Teoh:

> OK, makes sense. But what about if only the most significant 
> bit is 1?
> Wouldn't that also be an overflow? So you're essentially 
> checking if the
> topmost n bits are zero, where n is the number of bits you wish 
> to shift by.

Of course.

https://issues.dlang.org/show_bug.cgi?id=13231

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list