<div dir="ltr"><div><div><div><div><div><div><div><br clear="all"><div><div>Hi All,<br><br>Most of the configuration for the Cochran is
stored in bits and I'm wondering how experience programmers would handle
this. Here's a sense of the data:<br><br></div>short int a5 consists of <br>
</div> byte 0 : alarm clock minute<br></div> byte 1, bit 7: alarm clock on<br></div> byte 1, bits 6-0: alarm clock hour<br><br></div>There are also 3 and 4 bit integers stored in bytes.<br><br>Finally there are decimals stored as<br>
</div> byte 0: decimal fraction * 256<br></div> byte 1: integer portion<br><br></div>I can create a function that extracts the bits into handy to use values and another to insert the bits back in. I can also use a struct with bit positions.<br>
<br>What would you suggest is the best and portable way to handle this?<br><br></div>Thanks<br><div><div><div><div><div><div><div><div><div><div>-- <br><div dir="ltr"><div>John Van Ostrand<br></div><div>At large on sabbatical<br>
</div><br></div>
</div></div></div></div></div></div></div></div></div></div></div>