I have two questions.. 1) How do I display each bit within a byte, i.e. how do I display it as a series of ones and zeros? Example, the byte ‘97’ can be displayed as ‘97’ or ‘a’, but I’d like to display it as ‘01100001’. 2) Secondly, how do I manipulate individual bits within a byte? i.e. how can I determine if the (for example) 3rd bit from the left is zero or a one, and if need be, how can I change that bit alone?
Why am I asking? I’m trying to do some PDU encoding to send SMSs, I know there’s a PDU library available, but it uses lots of long Strings and seems to be quite memory hungry. I’m trying to re-write it, but it seems to involve a lot of bit and byte manipulation.