473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Difference between Signed and UnSigned variables?

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
Nov 21 '05 #1
3 4213

"Jon B" <no*****@sorry.sorry> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
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/de...ClassTopic.asp

ULong is a synonym for System.UInt64
http://msdn.microsoft.com/library/de...ClassTopic.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
Nov 21 '05 #2
"Jon B" <no*****@sorry.sorry> schrieb:
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.


<URL:http://en.wikipedia.org/wiki/Integer_%28computer_science%29>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #3
signed numbers have one bit that represents pos or neg values..

"Jon B" <no*****@sorry.sorry> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
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

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: dam_fool_2003 | last post by:
For int data type the default range starts from signed to unsigned. If we don't want negative value we can force an unsigned value. The same goes for long also. But I don't understand why we have...
10
by: tinesan | last post by:
Hello fellow C programmers, I'm just learning to program with C, and I'm wondering what the difference between signed and unsigned char is. To me there seems to be no difference, and the...
11
by: Jason Curl | last post by:
Dear C people, C90 doesn't specify if 'char' is either 'signed char' or 'unsigned char' leaving it to the implementation of the compiler. Has this changed for C99, or is it still the same? ...
22
by: juanitofoo | last post by:
Hello, I've just switched to gcc 4 and I came across a bunch of warnings that I can't fix. Example: #include <stdio.h> int main() { signed char *p = "Hola";
4
by: ravinderthakur | last post by:
hi all experts, can anybody explain me the difference between the unsigned char and char in c/c++ langugage. specifically how does this affects the c library fucntion such as strcat,strtok...
20
by: Hanzac Chen | last post by:
Hi, I don't understand why this could happen? The Code 1 will output `fff9' and the Code 2 will output `1' How could the `mod 8' not have effect? /* Code 1 */ #include <stdio.h> #include...
26
by: LuB | last post by:
This isn't a C++ question per se ... but rather, I'm posting this bcs I want the answer from a C++ language perspective. Hope that makes sense. I was reading Peter van der Linden's "Expert C...
2
by: Lugard | last post by:
Hello everyone, I am trying to optimize an application and while I was working on that I stumbled upon a question that I can't really find an answer for. I was wondering whether there was a...
39
by: Juha Nieminen | last post by:
I was once taught that if some integral value can never have negative values, it's a good style to use an 'unsigned' type for that: It's informative, self-documenting, and you are not wasting half...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.