Computing - Programming Languages

2020-09-21
3 min read

Programming Languages

What is a low level programming language??

A programming language that provides little or no abstraction of a computer’s instruction set.

What are the two parts of an instruction in machine code??
  • The opcode
  • The operand
What is the purpose of having an opcode and an operand??

What do you have (operand) and what do you want do with it (opcode).

What is an instruction set??

All the instructions that a computer can understand and exectue.

An operand can be either??
  • An actual value
  • An adress in memory to a value
What abstraction does assembly language provide for opcodes??

Each opcode is replaced by a mneumonic which gives a clue to the what the operation did.

What abstraction does assembly language provide for operands??

You can specify operands as decimal or hexadecimal instead of binary.

What is the key similarity between assembly and machine code??

There is a one-to-one correspondence between assembly language and machine code.

What does LDA mean??

Load address.

What does STO mean??

Store the value.

What is the main advantage for assembly instead of machine code??
  • Don’t have to manually type in 1s and 0s.
  • Quicker
What is the main disadvantage for assembly instead of machine code??

You have to convert the assembly to machine code first.

How is assembly converted to machine code??

By an assembler.

What was the first high level language??

FORTRAN

What is an imperative high-level language??

A programming language that consists of commands for the computer to perform.

What is the opposite to an imperative high-level language??

Declarative language.

What is the main advantage of a declarative programming language??

You can focus on what the program should do without listing the steps needed to achieve the result.

SQL is what type of high-level language??

Declarative.

What is the main advantage for a high-level language??

The programmer can think and code in terms of algorithms rather than worrying about the computer will execute each tiny step.

What must happen to a high-level language before it can be executed??

It has to be converted to machine code.

What is meant by a portable programming language??

A program written for one type of computer can be recompiled for a different type of computer.

Why will a high-level language run slower??

Compiled code won’t be as fast or optimised as raw assembly or machine code.

Why is larger object/machine code a problem for some environments??

In embedded com

What’s an example of an imperative language??

C++

What’s an example of a declerative language??

SQL

What are 1st generation programming languages??

Machine code

What are 2nd generation programming languages??

Assembly

What are 3rd generation programming languages??

Imperative programming languages

What are 4th generation programming languages??

Declearive programming languages

What are 5th generation programming languages??

Natural language/scratch-live programming languages.

2021-07-08

What are three advantages of using a low-level language??
  • It’s often faster
  • It often uses less memory
  • You have better access to hardware

Metadata
date: 2020-09-21 13:41
tags:
- '@?computing'
- '@?school'
- '@?public'
- '@?safe-to-post-online'
title: Computing - Programming Languages