fuzzylizard Posted November 5, 2003 Report Share Posted November 5, 2003 I am trying to write a C program where I need to work directly with some binary numbers. The only thing that I can not find, and yes I have looked, is how to represent binary numbers. Basically what I am looking for is how to store am a 8 bit binary number, say 0110110, in a variable. The best that I have found so far would be to do something like this: #define BYTE char BYTE myBinaryNo = 0x0110110; Would this be correct though? I thought the 0x notation was for hex numbers. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.