If I have .txt file include 10 digits such as
0//start bit
1
1
0
0
0
0
1
0//parity bit
1//end bit

If I put those into an array, how to check the first bit, the last bit and parity bit?
How to convert the mid 7 digits in to a character?

I've got a lot of questions, it would be better if you leave your email:)

kind regards

3
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by WaltP

If your using bits then maybe you should consider a structure with bits fields.

``````struct my_bits
{
unsigned int one:1;
unsigned int two:1;
unsigned int three:1;
unsigned int four:1;
unsigned int five:1;
unsigned int six:1;
unsigned int seven:1;
unsigned int eight:1;
unsigned int nine:1;
unsigned int ten:1;
};``````

If I have .txt file include 10 digits such as
0//start bit
1
1
0
0
0
0
1
0//parity bit
1//end bit

If I put those into an array, how to check the first bit, the last bit and parity bit?

When you've read the data into your array, what's the index of the first bit, the last bit, and the parity bit?

Edited by WaltP: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.