Hexadecimal/octal constants

Roy Johnson rjohnson at shell.com
Wed Mar 20 09:11:44 AEST 1991


Is it true on every platform that 0xf == 15?
Is it also true on every platform that for bitwise operations, C
behaves as if it is on a two's complement machine, so that, e.g., the
result of 0xf & 0x2 is 0x2, even if the machine representation of
0xf is 1010 and 0x2 is 0101 [think hypothetical here 8^)]?
--
======= !{sun,psuvax1,bcm,rice,decwrl,cs.utexas.edu}!shell!rjohnson =======
Feel free to correct me, but don't preface your correction with "BZZT!"
Roy Johnson, Shell Development Company



More information about the Comp.lang.c mailing list