Presentation on theme: "101. When you communicate with people you use a language that you both understand. The trick is that the computer does not speak English. To communicate."— Presentation transcript:
When you communicate with people you use a language that you both understand. The trick is that the computer does not speak English. To communicate with a computer you need to speak it’s language.
The language that you use when communicating with a computer is called a ‘programming language’. There are many programming languages out there and they all have a different style in which they talk to the computer. The computer programming language that we will be using in this class is called ‘Scratch’.
1GL (First Generation Language) Speaks in the computers native language. That’s 0’s and 1’s (binary) What does that look like? Why it’s good Code is VERY FAST Why it’s bad Hard to read by humans 1010101001100010 1001101010000001 1111111110100010
2GL’s Replace 0’s and 1’s with Mnemonic Codes An Assembler converts your codes into machine code. Why it’s good Still very fast (1 to 1 relationship with machine code) Why it’s bad Code is tied to a specific processor Still very hard to understand for a human 2GL (Second Generation Programming) LDA A ADD #5 STA A JMP #3 000100110100 001000000101 001100110100 010000000011 Assembler
3GL’s Are called ‘high level languages’ Are closer to English (or real world language’ than the mnemonics used in 2GL’s This makes them more programmer friendly Which makes them easier to use Are imperative That means code is executed line by line in the order that you write the code In an imperative language YOU tell the computer how to do the work 3GL (Third Generation Programming)
3GL’s A program called a compiler converts your commands into Object (machine code) There is NOT a 1 to 1 relationship between a 3GL command and its machine code Compilers can create machine code that is not tied to a particular computer platform 3GL (Third Generation Programming) 000100110100 001000000101 001100110100 010000000011 Compiler Source Code Object (machine) Code
4GL’s Are designed to decrease the amount of time it takes to create computer programs Are declarative That means you describe what you would like the computer to do but NOT how to do it In an declarative language YOU tell the computer what you want it to do and it figures out how to get it done. The line between 3GL’s and 4GL’s continues to get more blurry as computer programming languages continue to evolve. 4GL (Fourth Generation Programming)