Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

general

Former Member
0 Likes
499

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.

2 REPLIES 2
Read only

Former Member
0 Likes
471

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

Read only

Former Member
0 Likes
471

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