100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Summary A Level Computer Science revision notes - 1.2.4 Types of Programming Language £2.99   Add to cart

Summary

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

 6 views  0 purchase
  • Institution
  • OCR

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.

Preview 2 out of 5  pages

  • August 23, 2024
  • 5
  • 2023/2024
  • Summary
All documents for this subject (8)
avatar-seller
alinat
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller alinat. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £2.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

70840 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£2.99
  • (0)
  Add to cart