Computer Science - 4CP0 PearsonEdexcel

Programming Languages

Overview

A processor only ever executes one thing: streams of binary numbers called machine code. Nobody writes real programs that way any more, yet every program that runs, however it was written, ends up as exactly that. This lesson explains the layers between a programmer's source code and the machine code the processor actually obeys, and the trade-offs behind each layer.

You will compare high-level and low-level languages, meet machine code and assembly language directly, and work through how compilers, interpreters and assemblers each translate source code differently, with different consequences for speed, portability and debugging.

Objectives

  1. Understand what is meant by high-level and low-level programming languages and understand their suitability for a particular task
  2. Understand what is meant by an assembler, a compiler and an interpreter when translating programming languages and know the advantages and disadvantages of each

Lesson Note

A processor's instruction set only understands binary patterns: machine code. Every program a computer runs, whatever language it was written in, must eventually exist as machine code specific to that processor before it can execute. The question a programmer faces is not whether to reach machine code, but how directly to write towards it.

Available on the Green Bridge App

Download the Green Bridge CBT app on your phone or computer to access full lesson notes, practice questions, and more.

Full lesson notes with diagrams
AI-powered learning assistant
Study offline, anytime, anywhere
Available on Android, Windows, macOS, and Linux

Lesson Evaluation

Congratulations on completing the lesson on Programming Languages. Now that youve explored the key concepts and ideas, its time to put your knowledge to the test. This section offers a variety of practice questions designed to reinforce your understanding and help you gauge your grasp of the material.

You will encounter a mix of question types, including multiple-choice questions, short answer questions, and essay questions. Each question is thoughtfully crafted to assess different aspects of your knowledge and critical thinking skills.

Use this evaluation section as an opportunity to reinforce your understanding of the topic and to identify any areas where you may need additional study. Don't be discouraged by any challenges you encounter; instead, view them as opportunities for growth and improvement.

  1. Which of the following is the lowest-level form a program can take? A) High-level language source code B) Assembly language C) Machine code D) Pseudocode Answer: C
  2. What translates assembly language into machine code? A) A compiler B) An interpreter C) An assembler D) An operating system Answer: C
  3. Which statement about a compiler is correct? A) It translates and runs one statement at a time B) It translates the whole program before it is run and produces an executable file C) It only works with low-level languages D) It cannot report more than one error Answer: B
  4. An interpreter reaches a statement containing an error. What does it do? A) Ignores the error and continues to the next statement B) Reports all errors in the program at once C) Stops at that statement and reports the error immediately D) Automatically corrects the error Answer: C
  5. Which of these is the strongest reason to choose a high-level language over a low-level language for most general application software? A) High-level languages always run faster B) High-level languages are easier to write and are not tied to one processor's instruction set C) High-level languages need no translator at all D) High-level languages give more direct control over memory addresses Answer: B

Available on the Green Bridge App

Download the Green Bridge CBT app on your phone or computer to access full lesson notes, practice questions, and more.

Full lesson notes with diagrams
AI-powered learning assistant
Study offline, anytime, anywhere
Available on Android, Windows, macOS, and Linux

Available on the Green Bridge App

Download the Green Bridge CBT app on your phone or computer to access full lesson notes, practice questions, and more.

Full lesson notes with diagrams
AI-powered learning assistant
Study offline, anytime, anywhere
Available on Android, Windows, macOS, and Linux

Practice Mock Questions

Want to practice mock questions on Programming Languages? Download the Green Bridge CBT app to access mock questions and full practice assessments for this topic.

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Past Papers Across IGCSE, JAMB, WAEC & NECO
Over 3000 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning