Skip to content

Commit 890bf9e

Browse files
Added Ones & Twos Complement
1 parent 8b829c5 commit 890bf9e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/main/java/com/thealgorithms/bitmanipulation/OnesComplement.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
/**
44
* @author - https://github.com/Monk-AbhinayVerma
55
* @Wikipedia - https://en.wikipedia.org/wiki/Ones%27_complement
6-
* The class OnesComplement computes the complement of binary number and returns
7-
* the complemented binary string.
6+
* The class OnesComplement computes the complement of binary number
7+
* and returns
8+
* the complemented binary string.
89
* @return the complimented binary string
910
*/
1011
public class OnesComplement {

src/main/java/com/thealgorithms/bitmanipulation/TwosComplement.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package com.thealgorithms.bitmanipulation;
2+
23
/**
34
* @wikipedia - https://en.wikipedia.org/wiki/Two%27s_complement
4-
* This Algorithm was first suggested by Jon Von Neumann
5+
* This Algorithm was first suggested by Jon Von Neumann
56
* @author - https://github.com/Monk-AbhinayVerma
67
* @return the two's complement of any binary number
78
*/

0 commit comments

Comments
 (0)