ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i dont think there is such a thing. ints are 32-bits. However, when programming with MCUs, we would use extra variables, take 2 8-bit registers to make the equiv. of a 16-bit register. But that's low level stuff, the same could be done with char's if you wanted to use 8-bit chunks and make then unsigned (0-255).
I think 64 bit integer is the integer type of the 64 bit compiler for the 64 bit machines.
64 bit processors have 64 bit registers.
So I think, if you are working on a 64 bit machine, if you declare an integer, it's 64 bit automatically.
Well, I don't know if this will help you or not, but I've got a "huge_int" class that I wrote in C++. It can represent an arbitrary length integer. You specify how many bits the register will use, and it behaves like a normal integer from that point on. I used overloading operators to allow addition by unsigned integers and string representations of integers. In fact, that's how the class is implemented: a string of 1's and 0's. It allows for display in decimal, hex, or binary formats. Most math operators are implemented: addition, subtraction, multiplication, division, +=, -=, etc. I can dig it up if anyone is interested.
Note: I never got around to making it a signed integer. So if you need negative values, then you'll have to modify the class, or add the appropriate twos-complement adjustment when it's displayed.
And yes, traditionally, the base size of an integer is the width of a processor's internal registers. So 32-bit machines have 32-bit integers, a 64-bit has 64-bit integers, etc.
I think 64 bit integer is the integer type of the 64 bit compiler for the 64 bit machines.
64 bit processors have 64 bit registers.
So I think, if you are working on a 64 bit machine, if you declare an integer, it's 64 bit automatically.
I don't think this is true for the (quasi) 64-bit processors of the x86 architecture, you have to use "long long" to get a 64-bit int. It would be helpful if the original poster would say exactly what problem he had with this solution in Redhat.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.