‎2007 May 08 10:55 AM
NT2: 2-byte integer between -32767 and 32767 what does this negative number represents if we give domain as data type as int2 and data length as -678 will it accept if it accepts the length will be up to 678 if so what is the diff between 678 and -678.plz explain me.
‎2007 May 08 11:07 AM
every byte contains 8 bit so for 2 bytes it is comming 16 bits. for int2 it is comming 16 bits. now one bit is reserve for sign (i.e for + or -) so maximum value it can contain 2^15 - 1 = 32767 ( here 1 bit for sign and in remaining 15 bits it can contain 1 which comes in binary calculation). so it can contain -32767 to 32767.
since 678 or -678 is in between this so it can contain the value.
regards
shiba dutta
‎2007 May 08 11:15 AM
Hi,
this negative number represents the lower value range it means int2 field will accept values as lower as -32768 if you tyr to enter -32769 it will not accept tthe value if the length is set to 5.
and in the domain we cannot specify negative values.-678 is a negative value and it will not be accepted as data length.only positive values are accepted.
Rgds,
Prajith