ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with an algorithm (https://www.excelbanter.com/excel-programming/372456-re-help-algorithm.html)

Peter T

Help with an algorithm
 
I follow what you say about the bit/byte orders but none of the rest of your
description or examples. Maybe a search for "little-endian big-endian" will
find many examples of what you are looking for.

Regards,
Peter T


"Dan" wrote in message
...
Need help in determining an algorithm to extract bit/byte information from

a
data stream. I know the where the bit/byte starts and the lenght to

extract,
but the problem is extracting the information correctly.

7 - 0 15 - 8 23 - 16 31 - 24 39 - 32 47 - 40 55 - 48
7654_3210 5432_1098 3210_9876 1098_7654 9876_5432 7654_3210 5432_1098
03 C2 FF A0 78 23 F6

The first and second rows above sequence is to show the bit location

within
the sequence. The third is the actual data that will be received.

The problem is that bit information (8 bits or less) is read right to left
and byte information (9 bits and greater) is read left to right.

Expected
Value Bit Length Variable
0 0 1 A
0 1 1 B
0 3 1 C
0 4 1 D
0 5 1 E
0 6 1 F
0 7 1 G
0 8 1 H
1 9 1 I
0 10 3 J
1 13 1 K
0 14 1 L
1 16 1 M
1 18 1 N
1 19 1 O
1 20 1 P
5A 24 8 Q
5A 32 8 R
002D 47 16 S

Thanks




dan

Help with an algorithm
 
The problem is a little involved. I will try to break it down and post in
smaller samples. I will search your suggestion.

Thanks



"Peter T" wrote:

I follow what you say about the bit/byte orders but none of the rest of your
description or examples. Maybe a search for "little-endian big-endian" will
find many examples of what you are looking for.

Regards,
Peter T


"Dan" wrote in message
...
Need help in determining an algorithm to extract bit/byte information from

a
data stream. I know the where the bit/byte starts and the lenght to

extract,
but the problem is extracting the information correctly.

7 - 0 15 - 8 23 - 16 31 - 24 39 - 32 47 - 40 55 - 48
7654_3210 5432_1098 3210_9876 1098_7654 9876_5432 7654_3210 5432_1098
03 C2 FF A0 78 23 F6

The first and second rows above sequence is to show the bit location

within
the sequence. The third is the actual data that will be received.

The problem is that bit information (8 bits or less) is read right to left
and byte information (9 bits and greater) is read left to right.

Expected
Value Bit Length Variable
0 0 1 A
0 1 1 B
0 3 1 C
0 4 1 D
0 5 1 E
0 6 1 F
0 7 1 G
0 8 1 H
1 9 1 I
0 10 3 J
1 13 1 K
0 14 1 L
1 16 1 M
1 18 1 N
1 19 1 O
1 20 1 P
5A 24 8 Q
5A 32 8 R
002D 47 16 S

Thanks






All times are GMT +1. The time now is 06:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com