This week's book giveaway is in the Big Data forum. We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line! See this thread for details.

studying, i got struck here "-6 in binary is 11111010"

again i need to know how exactly the conversion is taking place

Thanks

Java uses two's complement to represent integers. But to summarize the link -- to negate a number, the two's complement operation is to invert all the bits, and add one.