Patrick.Schluter at bbox.fr
Mon Jan 7 18:50:37 UTC 2019
On Monday, 7 January 2019 at 18:47:04 UTC, Adam D. Ruppe wrote:
> On Monday, 7 January 2019 at 18:42:13 UTC, Patrick Schluter
>> byte b = nibble | ((nibble & 0x40)?0xF0:0);
> don't you mean & 0x80 ?
He asked for signed nybble. So mine is wrong and yours also :-)
It's obviously 0x08 for the highest bit of the low nybble.
byte b = nibble | ((nibble & 0x08)?0xF0:0);
More information about the Digitalmars-d-learn