<< is a bit shift to the left. 1<<7 equals pow(2,7) which equals 128 or 10000000 in binary.
& performs a bitwise and on the two operands. So the result will be 128 if the 8th bit in v is set and 0 if it isn't (in the first iteration).
That result is converted to bool (false for 0, true for all other values) and is used as the condition for the ?: operator.
v is shifted one position to the left then, so that means that the former 7th bit is now the 8th bit.
So essentially this code displays the lower 8 bits of v as a binary number.
& is the "and" operator. It compares the bits of two values and results in 1 if both of the appropriate bits are set, and 0 if either or both bits are clear: