• Question: how do computers understand code if they aren't coded to do so?

    Asked by away1jazz to Neil B on 3 Jul 2024.
    • Photo: Neil Barnby

      Neil Barnby answered on 3 Jul 2024:


      The simple answer is – they don’t. To computers code is a set of instructions that they follow. They only understand these instructions as they are converted to binary which is then used to turn switches on or off. Computers are made of billions of switches and outputs come from combinations of those switches being turned on or off. so, computers do not ‘understand’ code.
      If you were meaning ‘how does AI understand code?’, then the answer is still that they don’t. AI that creates code does not understand it, it only recognises patterns and so recognises patterns in code already written and it is this code the AI is trained on. so once that AI has learned the pattern of how a pice of code is structured, it can attempt to write its own by using all the common factors. this is why AI appears to write code, but it often writes code that does not work or does not work properly or even is insecure. AI that hasn’t been trained on any code cannot write it.

Comments