Hello. Little question, cause I'm kinda doubtful.

Are 0x0 and 0x00 same or in one case 0x0 designates a byte and 0x00 designates a word (due to the 2 bytes following the prefix) ?
A brief answer may help.
Posted on 2011-07-31 10:54:34 by Chuck Sausage
With most programming languages, the data type specification (e.g. BYTE, WORD, etc...) and the base numeric system (e.g. DEC, HEX, etc...) utilized are separate.

So, with respect to most standards, the short answer is no, a BYTE of 0x0 equals a BYTE of 0x00... as does a WORD of 0x0 equals a WORD of 0x00.

If good habit and clarity of code is maintained, a BYTE would typically be shown as 0x00 (two nibbles) and a WORD would be 0x0000 (four nibbles).

Any decent assembler/compiler should warn about truncation (or deny it) as well. Specifying a BYTE of 0x1234 would normally be truncated to 0x34.
Posted on 2011-07-31 11:01:17 by SpooK
Thank you.
Posted on 2011-08-01 07:15:53 by Chuck Sausage
If the assembler you are using accepts c-style integer constants then be careful about leading zero(s), 0011 is not the same as 11. 0011 will be treated as octal constant!
Posted on 2011-08-04 12:23:18 by drizz