I learned that a boolean does not need all the memory space it is provided in order to display true or false (1 or 0), but since the lowest space computers can work with is byte it was expressed as that.
I also read that there are ways to store the boolean in a bit instead of 8 bits, I got this code:
bool bits[] = {1, 0, 0, 0, 0, 0, 1, 0};
char character = 0;
for(int i = 0; i < 8; i++)
character += bits[i] << i;
I have seen that character becomes 65 at the end, I understand that this is because for each array member there is a 2 to the i value, if the member's value is 1 then this 2 to the i is added to character, since the first and second to last are actives the result is 65, I understand this.
But what I want to know is what is << doing exactly, I read something about moving the binary number, but since 1 is 1 in binary wouldn't this make it 1? And then the other 1 would not be 1 000 000? Why is that that it becomes 64?