how can i take 1's complement in making a java program?
Jump to Post
You can use Bitwise unary NOT operator
Check the Java Language Spec... there no such thing as a "Bitwise unary NOT operator". There is bitwise complement operator, just like the previous poster already said.
ps You can also exclusive OR with a value of all 1 bits.
All 9 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.