We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 890bf9e commit 6544ce0Copy full SHA for 6544ce0
src/main/java/com/thealgorithms/bitmanipulation/OnesComplement.java
@@ -9,6 +9,9 @@
9
* @return the complimented binary string
10
*/
11
public class OnesComplement {
12
+ private OnesComplement() {
13
+ }
14
+
15
// Function to get the 1's complement of a binary number
16
public static String onesComplement(String binary) {
17
StringBuilder complement = new StringBuilder();
src/main/java/com/thealgorithms/bitmanipulation/TwosComplement.java
@@ -7,6 +7,9 @@
7
* @return the two's complement of any binary number
8
public class TwosComplement {
+ private TwosComplement() {
// Function to get the 2's complement of a binary number
public static String twosComplement(String binary) {
StringBuilder onesComplement = new StringBuilder();
0 commit comments