signed nibble

Patrick Schluter Patrick.Schluter at bbox.fr
Mon Jan 7 18:42:13 UTC 2019


On Monday, 7 January 2019 at 17:23:19 UTC, Michelle Long wrote:
> Is there any direct way to convert a signed nibble in to a 
> signed byte with the same absolute value? Obviously I can do 
> some bit comparisons but just curious if there is a very quick 
> way.

byte b = nibble | ((nibble & 0x40)?0xF0:0);


More information about the Digitalmars-d-learn mailing list