Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4,6 TrustPilot
logo-home
Resume

Summary A Level Computer Science revision notes - 1.2.4 Types of Programming Language

Note
-
Vendu
-
Pages
5
Publié le
23-08-2024
Écrit en
2023/2024

Revision notes for 1.2.4 Types of Programming Language from topic 1.2: Software and software development. Included in OCR A Level Computer Science Paper 1. These notes were originally written in Markdown language and converted to a pdf.

Montrer plus Lire moins
Établissement
Cours

Aperçu du contenu

1.2.4 Types of Programming Language
(a) Need for and characteristics of a variety of programming
paradigms.
Programming Paradigms
• different approaches to using a programming language to solve a problem
• most modern programming languages allow for more than one paradigm
Imperative
• code clearly specifies the actions to be performed
• e.g. procedural, object-oriented
Declarative
• focuses on stating the desired result
• details on how to obtain the result are abstracted from the user
• e.g.
functional: programs are made by reusing a set of functions, lines of code consist
of function calls that are often combined within each other
logic: statements are written to describe the problem to be solved, queries are
used to find answers based on rules of the problem




(b) Procedural languages.
Procedural programming
• uses a sequence of instructions
• traditional data types are built into the language (e.g. integers, strings)
• provides data structures (e.g. dictionaries, arrays)
Structured programming
• a subsection of procedural programming
• four main programming structures define the control flow of a program
Sequence
• code is run line-by-line from the top to the bottom of a program

, Selection
• certain sections of code will run if a specific condition has been met
• e.g. if statements, switch ... case statements
Iteration
• sections of code that will repeatedly be executed a set number of times or while a
condition is met
• e.g. for loops, while loops
Recursion
• when function call themselves
• until a condition (base case) is met which does not call the function
Advantages
• relatively easy to learn and interpret
• executes straightforward tasks efficiently
Disadvantages
• large programs will be difficult to manage
• lack of modularity may lead to code redundancy




(c) Assembly language (including following and writing simple
programs with the Little Man Computer instruction set). See
appendix 5d.
Assembly Language
• low level language
• next level up from machine code
• uses mnemonics which are abbreviations for machine code instructions
• each mnemonic is represented by a numeric code


Mnemonic Instruction Function
ADD add adds the value at the given memory address to the value
in the accumulator
SUB subtract subtracts the value at the given memory address from
the value in the accumulator
STA store stores the value in the accumulator at the given memory
address

École, étude et sujet

Niveau d'études
Editeur
Sujet
Cours

Infos sur le Document

Publié le
23 août 2024
Nombre de pages
5
Écrit en
2023/2024
Type
RESUME

Sujets

€4,17
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien

Faites connaissance avec le vendeur
Seller avatar
alinat

Document également disponible en groupe

Faites connaissance avec le vendeur

Seller avatar
alinat Rugby High School
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
-
Membre depuis
1 année
Nombre de followers
0
Documents
9
Dernière vente
-
alinanotes

0,0

0 revues

5
0
4
0
3
0
2
0
1
0

Documents populaires

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions