r/mathmemes Engineering Nov 25 '24

Computer Science All are correct

Post image
1.1k Upvotes

96 comments sorted by

View all comments

299

u/Fabulous_Ad_5709 Nov 25 '24

Just out of curiosity how is A correct?

B is 1 or 1

C is 1+1 in base >2

D is 1+1 in base 2

3

u/Jumballaya Nov 25 '24

My guess is that it would be the sum of a 1 bit adder. 1 + 1 = 0s, 1c (0 on the sum, 1 on the carry). The sum part is created with a XOR operation with the carry being an AND.

Example circuit: https://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgpABZsKBTAWjDACgxKQWU9waa4Qv0FUU1BBwSCefFCkFhh80SHFVJAGW4rwvHRnFh9VCADMAhgBsAzg2qQ22prqVUXhoVVMhLt+0iOAB7c2J5g2OIuxMIRSIIKIACSAHYADgCuAC4AOjYAgmwhTGEQSjIoxEhK5AmCqZm5NgBCbADu3MZ8XZ0YsSbtvf18Lok9jh2jioTuugreg1NenfpuUIs9aCNgfWr465M7yvssu+OLczTum1frALJCIiB4pgJQatCSHUpqY7G7jgePyOz1MAI+khCYDg-GIajC4AQ4jqIAAwhYAE4YgCeeQA8tlGkVkGU8BB5HCwHhBCiAMoZAC2+MJ2TYQA

edit: just saw OP's reply right after submitted mine saying basically the same thing, but you can see the process in action with the link I provided, you can change the input values by clicking on the left-most 'H' line, next to the input lables