100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

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

Rating
-
Sold
-
Pages
5
Uploaded on
23-08-2024
Written in
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.

Show more Read less
Institution
Course









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Study Level
Publisher
Subject
Course

Document information

Uploaded on
August 23, 2024
Number of pages
5
Written in
2023/2024
Type
Summary

Subjects

Content preview

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
$4.11
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
alinat

Document also available in package deal

Get to know the seller

Seller avatar
alinat Rugby High School
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
1 year
Number of followers
0
Documents
9
Last sold
-
alinanotes

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions