Skip to content

Commit 5c12f45

Browse files
committed
Minor typo fix.
1 parent b1c36a8 commit 5c12f45

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/algorithms/math/bits/__test__/fullAdder.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fullAdder from '../fullAdder';
22

3-
describe('Full adder', () => {
3+
describe('fullAdder', () => {
44
it('should add up two numbers', () => {
55
expect(fullAdder(0, 0)).toBe(0);
66
expect(fullAdder(2, 0)).toBe(2);

src/algorithms/math/bits/fullAdder.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import getBit from './getBit';
33
/**
44
* Add two numbers using only binary operators.
55
*
6-
* This is an implementation of full adders logic circut.
6+
* This is an implementation of full adders logic circuit.
77
* https://en.wikipedia.org/wiki/Adder_(electronics)
88
* Inspired by: https://www.youtube.com/watch?v=wvJc9CZcvBc
99
*
@@ -65,5 +65,6 @@ export default function fullAdder(a, b) {
6565
// Set ith least significant bit of the result to bitSum.
6666
result |= bitSum << i;
6767
}
68+
6869
return result;
6970
}

0 commit comments

Comments
 (0)