Home : Bits and Bytes : Long Definition

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.

Updated: December 5, 2015

Cite this definition:

https://techterms.com/definition/long

TechTerms - The Tech Terms Computer Dictionary

This page contains a technical definiton of Long. It explains in computing terminology what Long means and is one of many computing terms in the TechTerms dictionary.

All definitions on the TechTerms website are written to be technically accurate but also easy to understand. If you find this Long definition to be helpful, you can reference it using the citation links above. If you think a term should be updated or added to the TechTerms dictionary, please email TechTerms!