Difference between Signed and UnSigned variables?

  • Thread starter Thread starter Jon B
  • Start date Start date
J

Jon B

Hi There!

What is the difference between Signed and UnSigned variables in .NET
Framework?? My background is just in VB6 and I have no idea what is the
difference between ULong and Long etc.

Please enlighten me!!

Thanks!!
Jon
 
Jon B said:
Hi There!

What is the difference between Signed and UnSigned variables in .NET
Framework?? My background is just in VB6 and I have no idea what is the
difference between ULong and Long etc.


Long is a synonym for System.Int64
http://msdn.microsoft.com/library/d...-us/cpref/html/frlrfSystemInt64ClassTopic.asp

ULong is a synonym for System.UInt64
http://msdn.microsoft.com/library/d...-us/cpref/html/frlrfSystemInt64ClassTopic.asp

Thes are both binary, or base-2, representations of numbers where each bit
represents binary digit. The difference is that for signed types the bit
which would otherwise store the most-significant digit is instead used to
store the sign, with 0 for positive and 1 for negative.

David
 
signed numbers have one bit that represents pos or neg values..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top