SLR07 - Types of Programming Languages

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

26 Terms

1
New cards

Programming Paradigm

  • Describes a way of doing things

  • Expect languages to include facilities 

2
New cards

Turing complete

Languages that can solve all the problems a computer can solve

3
New cards

Why are different programming paradigms needed?

Some problems are better suited to being solved using a certain paradigm

4
New cards

Machine code

  • Least abstract

  • Closest to what actually happens on computer

  • Programs directly to OS

  • Translated into matching electrical signals

5
New cards

Assembly language

  • Uses mnemonics, each having specific sequence 1s & 0s

  • One-to-one relationship with machine code

  • Translated by assembler

  • Eg: LMC

6
New cards

High level language

  • One-to-many relationship for code to machine code

  • More complex

7
New cards

Imperative Language

  • Uses sequence, selection, iteration statements that change a program’s state

  • Focus on describing how a program operate

  • Contains Procedural and Object Orientated Programming

8
New cards

Procedural programming

Program is built from one or more subroutines

9
New cards

Statements in procedural programming

  • Sequence

  • Selection

  • Iteration

10
New cards

Object orientated programming

Focuses on a modular approach to programming

11
New cards

Advantages & Disadvantages of machine code & assembly language

<p></p>
12
New cards

Feature comparison of procedural & object orientated

knowt flashcard image
13
New cards

LMC mnemonics

knowt flashcard image
14
New cards

Opcode & Operand

  • Opcode: Instruction

  • Operand: Data instruction is carried out on

15
New cards

Immediate addressing 

  • Value in address part of instruction is actually the value to be used, memory is not searched

  • ADD 10 means “add 10” not add value held in memory position 10

16
New cards

Direct addressing

  • Value in address part of instruction is a reference to the address in memory where required value is located

  • ADD 10 means “find whatever is in memory location 10 and add it to accumulator”

17
New cards

Indirect addressing

  • Value in addressing part references a memory location that contains the address in memory where required value is located

  • ADD 10 = “Find memory address 10, there you will find another address, go to this address and add what is found there to accumulator”

  • Useful as for larger address range as operand has only 4 bits available

18
New cards

Indexed addressing

  • Eg. contents of an array of 100 items long has to be added together

  • Need to use Index Register

  • IR set to 0, so first value taken from 10 + 0

  • IR incremented and same instruction = uses address 10 + 1

  • This is why array needs to be stored in contiguous memory locations

  • “ADD 10” = find memory address 10 plus value of IR

19
New cards
20
New cards
21
New cards
22
New cards
23
New cards
24
New cards
25
New cards
26
New cards