Hello fellow programmers,
I am new to the cprogramming forum and am requesting some assistance in further understanding bit manipulation in c.
I am undertaking my first attempt at learning c, as i have previously learnt c++.
I was confronted with a question regarding bit manipulation and using certain bits within a bit field to store values.
The question i was asked is that a card is made up of 7 bits.
2 bits = suit (Diamond, Clubs, Hearts, Spades)
4 bits = value (A,K,Q,J,10-2)
1 bit = colour (Black, Red)
Can someone please assist me in clearing up my understanding of bit operations ( bitwise &, bitwise OR,<< ,>>) and also provide an example of how the operations are carried out.
Thankyou fellow programmers
Sicilian_10