CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Prefx for binary?

    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


  2. #2
    Join Date
    Apr 1999
    Posts
    6

    Re: Prefx for binary?

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured