Click to See Complete Forum and Search --> : Prefx for binary?


May 10th, 1999, 02:45 AM
Hi,

Is there a way of specifying a binary value the way you can specify a hex value? I mean for e.g, 0x00 for hex value of 0.

thanx in advance

Rajesh Makhija
May 10th, 1999, 06:34 AM
I don't think there is a prefix for binary constants values. The "C Interger Constants" help in MSDN talks of only decimal, octal and hexadecimal constants. However you can write a binary constant as a hexadecimal constant after evaluating 4 least significant binary digits to form one least significant hex digit and so on moving upto the most significant digits.
Hope this helps