I need to do bit operations on representations of arbitrary precision numbers in Objective C. So far I have been using NSData objects to hold the numbers – is there a way to bit shift the content of those? If not, is there a different way to achieve this?
I need to do bit operations on representations of arbitrary precision numbers in Objective
Share
Using
NSMutableDatayou can fetch the byte in achar, shift your bits and replace it with-replaceBytesInRange:withBytes:.I don’t see any other solution except for writing your own date holder class using a
char *buffer to hold the raw data.