I have a question. I have a data set of 32 by 32 integer matrix. As int holds 32 bit, i want to break down each elements of my matrix into 32 bit, suppose i have 255 decimal at first place of matrix and this can hold 32 bit as of integer, now i want to convert this 255 decimal into binary 255 i.e. 11111111 and padding with zero the remaining positions. I don't want to construct another matrix because then the data size will be greater than 32 bits. I want to do this with C++. Something like this...
a[32][32];
for(int i=0;i<32;i++)
for(int j=0;j<32;j++)
a[i][j]=255+i+j;
Now let a[0][0]=255 in decimal form...i want to convert this and each element of matrix a into decimal and which will be like this..a[0][0]=00000000000000000000000011111111. This is 32 bit as int can hold 32 bit. Now my question is how i can access each bit of the a[0][0]. The important thing is that i want to stay in 32 bit format and don't want to create another matrix.
If you have any solution then please share with me. I am new to programming world. Thanks