Solved

In Vector CANoe trace, which is Bit 0,  Bit 63 ?

Posted on 2014-10-30
3
384 Views
Last Modified: 2014-10-30
Here is the Vector CANoe trace:

Tx      03  22  F1  00   00  00  00  00
Rx      07  42  E1  00  00  22   44  01

In any of the above 8 bytes messages, which is bit 0 and which is bit 63 ?
0
Comment
Question by:naseeam
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 40414262
Assuming that the above is something that you get displayed (and not a 'raw' memory dump), bit 0 is always the lowest value bit, i.e. in Rx as  '07  42  E1  00  00  22   44  01' it is the rightmost '1' and in Tx as '03  22  F1  00   00  00  00  00' it is the leftmost zero. In both cases, bit 64 - the leftmost value - is not set.
0
 

Author Comment

by:naseeam
ID: 40414302
>>   and in Tx as '03  22  F1  00   00  00  00  00' it is the leftmost zero.

Do you mean rightmost zero ?
0
 
LVL 86

Expert Comment

by:jkr
ID: 40414318
Yes, sorry, that should have been the 'rightmost' as well.

BTW, you can programatically obtain these values via bitwise AND operations, e.g.

#define MSB_64(x) (x & 0x8000000000000000) // bit 63, the Most Significant Bit
#define LSB_64(x) (x & 0x0000000000000001) // bit 0, the Least Significant Bit

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now