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

shift array of bytes

i have an array of bytes from variable length and i need to shift it
in variable size of bits between 1-7. do someone know about
constructive way to do it? beside iterate the array and deal with each
byte or word each time .
thanks
Jul 22 '05 #1
1 7761

"itzik peretz" <it***@tracespan.com> wrote in message
news:c6**************************@posting.google.c om...
i have an array of bytes from variable length and i need to shift it
in variable size of bits between 1-7. do someone know about
constructive way to do it? beside iterate the array and deal with each
byte or word each time .
thanks


You'll have to iterate, sorry. There may be some machine-code instructions
on certain processors that let you do bit-shifts across a span of memory,
but that's assembler, and platform-specific, not something you can do in
standard C++.

-Howard
Jul 22 '05 #2

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

Similar topics

6
by: Herrcho | last post by:
in K&R Chapter 6.3 it mentions two methods to calculate NKEYS. and points out the first one which is to terminate the list of initializers with a null pointer, then loop along keytab until the...
1
by: Be Learning | last post by:
I need your help! I want to declare and shift left a buffer that bigger then any basic data type that C/C++ supports And I'm doing so: ...
5
by: DbNetLink | last post by:
I am trying to convert some Japanese text encoded as Shift-JIS/ISO-2022-JP to UTF-8 so I can store all data in my database with a common encoding. My problem is the encoding conversion code works...
11
by: Kenneth Lantrip | last post by:
Anyone got any ideas as to how this process could be improved for speed? this is what I have... Dim j, q As Integer Dim x(16), y(16) As Byte x.CopyTo(y, 0) ' shift left circular 24 bits
12
by: Mick_fae_Glesga | last post by:
OK, the solution to this is probably blindingly obvious to everyone, but... surely it can't be right. I am compiling with borland bcc32 free compiler this piece of code is designed to identify...
3
by: Cindy | last post by:
I am struggling over a simple way to shift multi bytes for certain bits. Hope someone can help. For example, I open a memory space for 10 bytes: unsigned char *pData = new unsigned char; then...
7
by: Bint | last post by:
Hi, What is a simple way to shift the elements in an array, circularly? Is there a way to do it so that you don't need a separate storage array? IE I want to shift array A{1,2,3,4,5,6,7,8} by...
1
by: pantagruel | last post by:
Hi, I have an array like the following: for(x=0;x<results.length;x++){ alert(results.length); extracted=results.shift(); alert(results.length); if(results.indexOf(extracted)== -1){
2
by: Polaris | last post by:
Hi C# Experts: I have a byte-array: byte byte_array = new byte; byte_array = 0; byte_array = 1; byte_array = 2; byte_array = 3;
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.