# Long

Long is a data type used in programming languages, such as Java, C++, and C#. A constant or variable defined as long can store a single 64-bit signed integer.

So what constitutes a 64-bit signed integer? It helps to break down each word, starting from right to left. An integer is a whole number that does not include a decimal point. Examples include 1, 99, or 234536. "Signed" means the number can be either positive or negative, since it may be preceded by a minus (-) symbol. 64-bit means the number can store 263 or 18,446,744,073,709,551,616 different values (since one bit is used for the sign). Because the long data type is signed, the possible integers range from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, including 0.

In modern programming languages, the standard integer (int) data type typically stores a 32-bit whole number. Therefore, if a variable or constant may potentially store a number larger than 2,147,483,647 (231 ÷ 2), it should be defined as a long instead of an int.

NOTE: In standard C, a long integer may be limited to a 32-bit value ranging from -2,147,483,648 to 2,147,483,647.

Which of the following is a valid IPv4 address?

A
123.456.789.0
0%
B
234.234.234.234
0%
C
56.273.155.20
0%
D
101.202.303.4
0%
Correct! Incorrect!     View the IPv4 definition.
More Quizzes →

## The Tech Terms Computer Dictionary

The definition of Long on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.