1.2.4 Types of Programming Language Flashcards Preview

A Level Computer Science > 1.2.4 Types of Programming Language > Flashcards

Flashcards in 1.2.4 Types of Programming Language Deck (69)
Loading flashcards...
1

Define programming paradigm

A style of programming

2

Define procedural programming

When every variable, constant, and subroutine is defined separately, with no relationship between them

3

Define object-orientated programming

Separate objects are defined with their own subroutines and values

4

Define a constructor

A method that creates an object of a particular class with its own attributes

5

Define a static attribute or method

Attributes or methods relevant to a whole class

6

Define a non-static attribute or method

Attributes or methods that are relevant to only the object

7

What are some features of procedural programming?

  • The programmer specifies steps needed to be executed
  • The order of the steps is up to the programmer
  • Statements can be grouped into procedures and functions

8

What are some features of object-orientated programming?

  • The programmer can design self-contained objects
  • Each object contains methods and the data that is being processed
  • The program is split into smaller units (objects)
  • Objects can be reused and inherited easily

9

What are some features of assembly language?

  • Low-level language
  • Has a one-to-one relationship with machine code
  • Uses mnemonics to represent machine code
  • Specific to a processor

10

Define homogeneous elements

All elements have the same data type

11

Define heterogeneous elements

Elements can have different data types

12

What is the typical size and explanation of an integer data type?

2 or 4 bytes

A whole numerical value

13

What is the typical size and explanation of a real/float data type?

4 or 8 bytes

A decimal value

14

What is the typical size and explanation of a string data type?

Usually 1 byte per character

A set of character and/or numbers

15

What is the typical size and explanation of a boolean data type?

1 bit

Can be one of two values

16

What is the typical size and explanation of a character data type?

1 byte

A single letter, digit, or symbol

17

What is the typical size and explanation of a date/time data type?

1 byte per date or time

A value that states the date or time:

DD/MM/YYYY or hh:mm:ss

18

What is the typical size and explanation of a currency data type?

8 bytes

A real/float value which is told which currency symbol to assign to it

19

What is the basic structure of a 16-bit machine code instruction?

Opcode (operation code): basic machine operation (6 bits) and addressing mode (2 bits)

Operand

20

ADD: instruction, numeric code, and description

ADD

1xx

Adds the contents of the memory address to the Accumulator

21

SUB: instruction, numeric code, and description

Subtract

2xx

Subtracts the contents of the memory address to the Accumulator

22

STA: instruction, numeric code, and description

Store

3xx

Stores the contents of the Accumulator to the memory address

23

LDA: instruction, numeric code, and description

Load

5xx

Loads the contents of the memory address to the Accumulator

24

BRA: instruction, numeric code, and description

Branch always

6xx

Branches to the instruction in the memory address

25

BRZ: instruction, numeric code, and description

Branch if zero

7xx

Branch if the contents of the Accumulator is 000 to the instruction in the memory address

26

BRP: instruction, numeric code, and description

Branch if positive

8xx

Branch if the contents of the Accumulator is positive to the instruction in the memory address

27

INP: instruction, numeric code, and description

Input

901

Input data which is copied to the Accumulator

28

OUT: instruction, numeric code, and description

Output

902

Output the contents of the Accumulator

29

HLT: instruction, numeric code, and description

Halt

000

End the program

30

DAT: instruction, numeric code, and description

Data

-

Used to indicate a location that contains data