Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

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

Posted on 2014-10-30
Medium Priority
443 Views
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
Question by:naseeam
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 86

Accepted Solution

jkr earned 2000 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

LVL 1

Author Comment

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

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
``````
0

## Featured Post

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â€¦
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilationâ€¦
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relatâ€¦
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
###### Suggested Courses
Course of the Month9 days, 12 hours left to enroll