I am trying to implement a data structure that implements a generic linear feedback shift register (LFSR) of variable length and with a separate coefficient vector (another 32-bit value that...
Type: Posts; User: jaarestad
I am trying to implement a data structure that implements a generic linear feedback shift register (LFSR) of variable length and with a separate coefficient vector (another 32-bit value that...
I would like to be able to access each of the bit values as a field.
Actually, this works well.
#define BIT(val, bit) ((val & (1 << bit)) >> bit)
int main(int argc, char *argv[])
{
...
Hi, I have created the following data type...
typedef struct tagLFSRType {
union {
struct {
unsigned int bit0 : 1; //
unsigned int bit1 : 1; //
...
My suggestions would be:
1) Don't use quite so many blank lines between groups of statements (enhances readability).
2) Precede each scanf() with a printf() to prompt the user. (This was...
Hi, I am curious to know if there is a way that one could create a bitfield using the standard technique of creating a structure within a union, as follows:
typedef union {
struct {...