What's funny is this is one of the semi-important plot points in Westworld the TV series. The hosts (robots designed to look and act like people) hear their higher level programming directives as an inner monologue.
The scene: https://youtu.be/ZnxJRYit44k
Found it! : https://medium.com/swlh/bicameral-mind-humanoid-robot-with-g...