This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Binary number

How do I use a binary number so that the compiler understand it?

This is what I've done:

10101010b

But the compiler gives an error: syntax error near 'b'

Parents
  • The 'C' programming language does not support binary notation - just Octal, Decimal, and Hex.

    Keil C51 does not provide any language extension to support binary notation.

    You can kludge it with preprocessor macros - and a 'Search' should quickly find the many previous discussions of this...

Reply
  • The 'C' programming language does not support binary notation - just Octal, Decimal, and Hex.

    Keil C51 does not provide any language extension to support binary notation.

    You can kludge it with preprocessor macros - and a 'Search' should quickly find the many previous discussions of this...

Children