I have an assignment to do, but I have no clue where to start. I am not expecting and definitely do not want answers in code. I would like some guidance as in what to do because
Here is another way of doing it.
unsigned int i = 0; engine_on = 1; gear_pos =2; key_pos = 2; brake1 = 1; brake2 = 1; i |= s1.brake2; i |= (s1.brake1 << 1); i |= (s1.key_pos << 2); i |= (s1.gear_pos << 4); i |= (s1.engine_on << 7);