| Wolf (12) | |
|
hi everybody I'm wondering how can i work out in "C" the bit sequence and the values used to store an integer. "using the easiest way" for example If the number was 12345 the output Values: 57 48 0 0 Bit sequence: 00111001 00110000 00000000 00000000 cheers! | |
|
Last edited on
|
|
| helios (9442) | |
|
Huh?! 12345 in binary is 0011 0000 0011 1001. The easiest way is a clever use of the shift operators and sizeof. | |
|
|
|
| Wolf (12) | |
|
would you give an example please! thanks a lot | |
|
|
|
| Grey Wolf (2909) | |
| google "displaying bit patterns in c" | |
|
|
|