Solved

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

Posted on 2014-10-30
3
341 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
Comment Utility
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
Comment Utility
>>   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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
I wrote this article because EE Articles rank high in search engines and anytime we can share our experiences where others may benefit from them then we all win. I have a 2002 dodge grand caravan that I bought used in '06 at 65k miles. It's been …
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

743 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