473,395 Members | 1,937 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,395 software developers and data experts.

how to handle big numbers (n x 32 bits)

Hi!!!!!!!!!!!!!!!!!!!!

Please I want to know how to create a variable of 64 bits, and this variable must allow functionality for their shifting. Thanks for your help

Best Regards,
Aug 14 '06 #1
9 4192
Hi Banfa, Thanks for your help, I apreciated, well regarding one of my Question about permutation you told me that for the 64 bits variable I must declare it using the followin instruction, long long K, the thing is that Microsoft Visual c++ does not allow me to do it this way, so could you please tell me how to create this variable, so I can use shifting?
Aug 14 '06 #2
Banfa
9,065 Expert Mod 8TB
That is platform dependent so we can't help without knowing the platform.
Aug 14 '06 #3
Banfa
9,065 Expert Mod 8TB
use

__int64

on microsoft (I may have the number of _ wrong check the help/header files).
Aug 14 '06 #4
So this is intended to be use in both plataform Linux and Windows. Thanks for your help
Aug 14 '06 #5
Banfa
9,065 Expert Mod 8TB
on Linux use

long long

on Windows use

__int64
Aug 14 '06 #6
So this is intended to be use in both plataform Linux and Windows. Thanks for your help
Aug 14 '06 #7
Banfa
9,065 Expert Mod 8TB
Oh and note

long long does not guarantee 64 bits in fact just that

sizeof(long long) >= sizeof(long)

it is just usual for it to be 64 bits.
Aug 14 '06 #8
Banfa
9,065 Expert Mod 8TB
And please reply to posts when talking about the same subject don't create new threads :-)
Aug 14 '06 #9
Thanks for your help, now I Know how.
Aug 14 '06 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: cylin | last post by:
Hi all, If I have a variable and it's just have 22 bits, and I must set this variable unsigned integer. This 2's complement value maybe is negative. For example: A= 11 1111 1111 1110 ...
3
by: Fred Hebert | last post by:
I am trying to use a 3rd party DLL that requires the main window handle as a parameter. e.g. MyFunc(WHND MyHandle); The example looks something like this: Result = MyFunc(Handle); Where...
10
by: Eric | last post by:
I have an array that contains over 30000+ bits. The size varies at runtime. I need to move through this chunk of memory and count bits every so often. Example: First 9 bits has 2 ones, next 10...
3
by: julry | last post by:
I need to compute factorials, but I hit a limit around 170!. Is there anyway to handle numbers larger than the float data type can handle? Thanks.
28
by: MLH | last post by:
The largest integer A97 can deal with is 2,147,483,647, as I understand it from HELP. I would be content to represent larger integers as strings. For example, "2147483648" would suit me fine. I...
17
by: Sri | last post by:
How do you add an n-bit number in C? Regards, Sri
29
by: Halid Umar A M | last post by:
Hi All, I m Halid Umar, network security research student. I will explain my situation and give me hint if you can. I expect reply from you all. * I have to handle numbers that have more than...
39
by: Frederick Gotham | last post by:
I have a general idea about how negative number systems work, but I'd appreciate some clarification if anyone would be willing to help me. Let's assume we're working with an 8-Bit signed integer,...
15
by: steve yee | last post by:
i want to detect if the compile is 32 bits or 64 bits in the source code itself. so different code are compiled respectively. how to do this?
14
by: thehobbit | last post by:
Hi, Could anyone give ideas on how to add 4 20 digit numbers in ANSI C and pass the result back to a calling program in COBOL? We were able to add up to 15 digit numbers without any problems,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.