This is the table
0 & 0 = 0
1 & 0 = 0
0 & 1 = 0
1 & 1 = 1
This is the truth table of the AND bitwise operator. In programming language every single thing is transalted into bytes, and smaller bits.
1 byte=8 bits.
Here are some info about bits: http://en.wikipedia.org/wiki/Bit
So, in your case you had a for from 0 to 9, all of that bitwise and with 1 (i & 1).
First of all we will translate every single i into binary:
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...