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

variables with a big number of bit and bit operation


sorry for my bad english.

i'm trying to create variables made by a number of bit rounding about 500
bit, on which i can perform bit operations like & and |.
the problem is that i'm unable to resolve this problem without chunking the
variable in smaller parts, and this is a solution that i wouldn't use.

so everything you can say for helping me is wellcome.

thanks in advance,
--

Jan 3 '06 #1
2 1631
In article <43**********************@reader1.news.tin.it>,
none <no**@none.none> wrote:
i'm trying to create variables made by a number of bit rounding about 500
bit, on which i can perform bit operations like & and |.
the problem is that i'm unable to resolve this problem without chunking the
variable in smaller parts, and this is a solution that i wouldn't use.


If you refuse to chunking of the variable into smaller parts, then
you will need to:

a) find some very specific hardware that supports large bit operations
and code only for that; or

b) use a different programming language which will hide the chunking
from your sight; or

c) give up.
There is nothing you can do in standard C that can extend the
number of bits that the hardware itself can operate on at one time.
If the maximum word size that a particular compiler can use on
a particular machine is 32 bits, then there is not going to be anything
you can do to force the hardware to operate on 33 or 48 or 64 bits.
All you -can- do is write software routines that operate on a chunk
at a time.
--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
Jan 3 '06 #2


none wrote:
sorry for my bad english.

i'm trying to create variables made by a number of bit rounding about 500
bit, on which i can perform bit operations like & and |.
the problem is that i'm unable to resolve this problem without chunking the
variable in smaller parts, and this is a solution that i wouldn't use.

so everything you can say for helping me is wellcome.

thanks in advance,
--


Try using

GNU MP
The GNU Multiple Precision Arithmetic Library

This will give you bit operations on unlimited precision integers
along with some other interesting functions like scanning for the
least significant 1 or 0 bit, population count (number of 1 bits)
and Hamming distance (count of bit differences).

Jan 3 '06 #3

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

Similar topics

2
by: Paweł | last post by:
I have a big number of variables, mostly data from the form. I want to convert all empty variables into "NULL". Obviously for each variable I could write: if (empty($a)) $a=="NULL"; if...
11
by: Jeff Wagner | last post by:
I am importing a file which contains a persons name (firstName, middleName, etc). If I define a function to do this, how can I use the variables outside of that function? Here is the code: ...
2
by: Miles Davenport | last post by:
My Javascript is rather rusty :( ... and I need to do change some form values, in the folowing way: (1). I have the following a href (wrapped in PHP), which calls processForm. ==== <input...
13
by: sneill | last post by:
I know its possible to dynamically remove elements from the DOM, but rather than deleting them forever, is it possible to 'capture' them and save them as an object variable so they can be reused...
4
by: ykz | last post by:
what format shall i use to print clock_t variables? i tried %f, %i, %S or %M(seconds or minutes, as said in K&R2 book), all seem not to work. the code is like: #include <time.h> clock_t t1,...
11
by: john_c | last post by:
I'd like to store information for roles in Session variables. RoleA has a specific set of values, RoleB has a specific set and so one. When I access values for RoleA, it looks like this: ...
14
by: Sugandh Jain | last post by:
Hi, The warning from Microsoft.Performance Code Analysis check that, its not required to initialize numeric variables to zero, boolean to false and object to null is a good one because CLR does...
20
by: tshad | last post by:
Using VS 2003, I am trying to take a class that I created to create new variable types to handle nulls and track changes to standard variable types. This is for use with database variables. This...
2
by: alwaali | last post by:
Hi I need help please This is my project and i need a help to solve it with you A page of text is to be read and analyzed to determine number of occurrences and locations of different words. The...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.