Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Can ChatGPT Learn to Add? (nobuteru.substack.com)
1 point by rcme on May 4, 2023 | hide | past | favorite | 3 comments


By our current understanding of computational logic, I wager not. But if we were to construct a metaphysical grounding to addition (which I rationally believe is impossible), then ChatGPT could conceivably arrive to the uniqueness of certain kinds of addition and their relevant uses through neural network machine learning. But this would amount to reverse-engineering humans by humans themselves. Can any group fully know themselves? I suspect with proof it's impossible, and that the 'explanatory gap' can only be minimized, not removed entirely.


can you do that off the top of your head without showing your work?

How I would approach it:

Me: I have two arbitrarily long string so of binary numbers and I want to add them what would be the best way to do that?

The best way to add two arbitrarily long strings of binary numbers is to use the binary addition algorithm. Here's a step-by-step process: --- steps ---

Me: what if I don't want to do that manually

If you don't want to do the binary addition manually, you can use a programming language to perform the operation. Here's an example using Python: -- code --

Me: I got an error about not being to big to convert to an integer

If the binary strings are too large to be converted to integers, you can use a custom function to add the binary strings without converting them to integers. Here's an example in Python: -- more code --

Me: I don't know if this will work. How could I tell?

To check if the custom function works for adding large binary strings, you can test it with various examples. Here's the complete function and some test cases to validate the function:


That's a good point about showing work. I originally opted to avoid having it show work for brevity's sake, but it's possible that by "showing work" ChatGPT is storing enough context to compute the answer. So, I asked it to "limit work on each bit to a single line." which a human with understanding of the rules of addition would be more than capable of. The result (below) is still wrong :)

Sure, let's add the two binary numbers you provided, keeping each bit operation to a single line.

      10011111110100011100011011110010
    + 00111010100101000100000101111011
Starting from the least significant bit:

1. 0 + 1 = 1

2. 1 + 0 = 1

3. 0 + 1 = 1

4. 0 + 0 + 1 (carry from step 3) = 1

5. 1 + 1 = 0, with 1 carry.

6. 1 + 0 + 1 (carry from step 5) = 0, with 1 carry.

7. 0 + 0 + 1 (carry from step 6) = 1

8. 1 + 1 = 0, with 1 carry.

9. 1 + 0 + 1 (carry from step 8) = 0, with 1 carry.

10. 0 + 0 + 1 (carry from step 9) = 1

11. 0 + 1 = 1

12. 1 + 0 = 1

13. 1 + 1 = 0, with 1 carry.

14. 1 + 0 + 1 (carry from step 13) = 0, with 1 carry.

15. 0 + 1 + 1 (carry from step 14) = 0, with 1 carry.

16. 0 + 0 + 1 (carry from step 15) = 1

17. 1 + 1 = 0, with 1 carry.

18. 1 + 0 + 1 (carry from step 17) = 0, with 1 carry.

19. 1 + 1 + 1 (carry from step 18) = 1, with 1 carry.

20. 0 + 0 + 1 (carry from step 19) = 1

21. 0 + 1 = 1

22. 1 + 0 = 1

23. 0 + 0 = 0

24. 1 + 1 = 0, with 1 carry.

25. 0 + 0 + 1 (carry from step 24) = 1

26. 0 + 1 = 1

27. 1 + 0 = 1

28. 0 + 0 = 0

29. 1 + 1 = 0, with 1 carry.

30. 1 + 0 + 1 (carry from step 29) = 0, with 1 carry.

31. 1 + 1 + 1 (carry from step 30) = 1, with 1 carry.

32. 0 + 0 + 1 (carry from step 31) = 1

So, the result of the binary addition is:

11011001000010100010001110101101




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: