-
Asked by best1hake on 3 Jul 2024.
-
Amin Kassab-Bachi answered on 3 Jul 2024:
Most coding software (may also be called an interpreter or an Integrated Development Environment (IDE) depending on its features), have an integrated piece of software called a compiler.
The compiler reads the instructions (commands) you write into your code and translates them into what’s known as the machine language, which the computer can read and execute. The format of these instructions depends on what programming language you’re using. That’s why a programming language is called a language, because as a human language, it has syntax and rules that make it make sense. That’s why you need a specific compiler to act as a translator for your code.
-
-
Sheridan Williams answered on 3 Jul 2024:
High-levellanguages need to be broken down (compiled) into indivdual instructions. At the fundamental level these instructions are in binary, so 1100001110101000 might mean add something to the accumulator.
The CPU has built into its instruction set a number of thes binary codes. The decode part of the ‘fetch-decode-execute’ cycle determines what process is to be performed. -
Andrew Parrott answered on 3 Jul 2024:
As Amin suggests most coding languages work by a some point converting what the human inputs into machine code. The machine code tells the computer (processor usually) what to do. The computer is holding everything as binary representations (bits) and the machine code tells the computer what to do with the bits (i.e. move them, invert them, add them, etc.). The outcome is then fed back to the interpreter which then converts this back to something a human can more easily understand. One of the best explanations I have read for this is given in the book by Charles Petzold called “code”.
Another answer is involving large language models and an AI “understanding” of the code. It can tell what the code is trying to achieve and convert it into other code (language) if required (e.g. convert Python in VBA). Or take human input and covert to code (e.g. I want to code that takes two numbers and finds a common factor it might be able to work out what code i need in a certain language). So that is another sort of “understanding”. ChatGPT and others like it do this sort of thing. In the background though at some point some conversion to machine code is required so the code that runs the AI can run on some computer hardware.
-
Luke Humphrey answered on 3 Jul 2024: last edited 3 Jul 2024 11:31 am
Excellent question. See this webcomic: https://xkcd.com/378/
(And here’s the explanation: https://explainxkcd.com/378/)
-
Amber Villegas - Williamson answered on 3 Jul 2024:
As Sheridan has explained we store information as either a 1 or a 0.
The way we tell computers what we are soring is the part of programming to make life / communication easier.As an example
01001000 01100101 01101100 01101100 01101111 00100001doesn’t mean much right now but it is stored on a device somewhere and we need to work out way it means…. so we need to decode it
On the weblink there is a conversion chart which tells you what 01001000 converts to…(H)
so now if you look at the conversion you will see that
01001000 01100101 01101100 01101100 01101111 00100001Simply means “HELLO”
Well that’s a lot of 0 and 1 and it can be easy to get confused and whilst letters are great we need machines and systems to do more complex things so coding is basically a way of giving really long instructions in a simple form.
If we told a dog to “fetch” we are using a simple command to ask them to “go pick up the ball and bring it to me” but fetch is simple and is decoded into the complete action by the dog.
Hope this helps 🙂
-
Neil Barnby answered on 4 Jul 2024:
You have some very good answers here but I will add that computers don’t ‘understand’ code, they only read it and follow the instructions.
Related Questions
What is AI?
how do computers understand code if they aren't coded to do so?
What's the worst attack you've defended against?
what is big data analytics
do you know anything about computer cyber security
What is computing?
Do you find that within your job, you’re spending continuously draining hours in-front of a computer ?
can you fix computers?
who made computers
Latest Questions
-
How do you make new drugs
-
how many plants do you study normally?
-
what happens when a person whos sick gets a DNA while the person is sick what do you do
-
What are polysaccharides?
-
how many nuclear explosions happen in the world
-
how does your job effect your daily life ? (2 Comments)
-
why does nuclear waste glow in the dark? (1 Comment)
-
how to you deal with problems you come across when doing your research? (2 Comments)
-
If you have been emotionally invested (focusing on anxiety if you suffer with it, dementia etc) do you find it
-
what motivates you to carry out your research? (1 Comment)
Latest Comments
-
how does your job effect your daily life ? (2 comments)
-
why does nuclear waste glow in the dark? (1 comment)
-
what motivates you to carry out your research? (1 comment)
-
how to you deal with problems you come across when doing your research? (2 comments)
-
How long have you been a scientist for (2 comments)
Comments