@@ -226,13 +226,12 @@ Number: 9 = (10 - 1) = 0b01001
226
226
227
227
> See[ isPowerOfTwo.js] ( isPowerOfTwo.js ) for further details.
228
228
229
-
230
229
####Full Adder
231
230
232
231
This method adds up two integer numbers using bitwise operators.
233
232
234
233
It implements[ full adder] ( https://en.wikipedia.org/wiki/Adder_(electronics) )
235
- electronicscircut logic to sum two 32-bit integers in two's complement format.
234
+ electronicscircuit logic to sum two 32-bit integers in two's complement format.
236
235
It's using the boolean logic to cover all possible cases of adding two input bits:
237
236
with and without a "carry bit" from adding the previous less-significant stage.
238
237
@@ -245,7 +244,8 @@ Legend:
245
244
- ` carryOut ` : a bit to carry to the next most-significant stage
246
245
- ` bitSum ` : The sum of` ai ` ,` bi ` , and` carryIn `
247
246
- ` resultBin ` : The full result of adding current stage with all less-significant stages (in binary)
248
- - ` resultBin ` : The full result of adding current stage with all less-significant stages (in decimal)
247
+ - ` resultDec ` : The full result of adding current stage with all less-significant stages (in decimal)
248
+
249
249
```
250
250
A = 3: 011
251
251
B = 6: 110
@@ -260,7 +260,7 @@ B = 6: 110
260
260
```
261
261
262
262
> See[ fullAdder.js] ( fullAdder.js ) for further details.
263
- > See[ Full Adder on YouTube] ( https://www.youtube.com/watch?v=wvJc9CZcvBc ) .
263
+ > See[ Full Adder on YouTube] ( https://www.youtube.com/watch?v=wvJc9CZcvBc&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8 ) .
264
264
265
265
##References
266
266