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

How to enter an binary data in Keil?

How can we do this
In assembly we do
mov P0, #10001000B

But in Keil how can we do this
P0 = 10001000, in binary
not by
P0 = 0x11;
Thank you!

Parents
  • Standard C does not include a notation for integer literals in binary. Decimal, hexadecimal, and octal, yes; binary, no.

    I've occasionally seen macro solutions such as that mentioned above. Most C programmers I've known just write the number in hex. The translation from that to binary is fairly easy in your head.

Reply
  • Standard C does not include a notation for integer literals in binary. Decimal, hexadecimal, and octal, yes; binary, no.

    I've occasionally seen macro solutions such as that mentioned above. Most C programmers I've known just write the number in hex. The translation from that to binary is fairly easy in your head.

Children
No data