Computer Science - 9210 OxfordAQA

Arithmetic Operations In A Programming Language

Overview

A vending machine has 287 cents to give back and a hopper of coins. It cannot hand over 2.87 of anything. It has to work out how many dollars, then how many fifties, then how many twenties, and it does that with two operations that a calculator does not have a button for: whole-number division, and the remainder that whole-number division leaves behind. Almost every time a program has to split a quantity into units, those two do the work.

This lesson covers the five arithmetic operations the specification names: addition, subtraction, multiplication, real division, and integer division including remainders. Four of them behave exactly as they do in mathematics. The fifth is the one that earns marks and solves problems, and the specification devotes its whole additional-information column to explaining it. You will learn what DIV and MOD produce, why the pair of them is usually used together, and the handful of standard tricks that MOD makes possible.

Objectives

  1. Be familiar with and be able to use:
  2. addition
  3. subtraction
  4. multiplication
  5. real division
  6. integer division, including remainders.

Mind map

This topic is mapped out so you can see how the ideas connect.

Open the mind map in the app

Lesson Note

The specification requires you to be familiar with and able to use addition, subtraction, multiplication, real division, and integer division including remainders. The first four hold no surprises: they mean what they mean in arithmetic, and in pseudocode they are written with the ordinary symbols.

Complete Note Available on the Green Bridge App

Get the Green Bridge CBT app on your phone or computer for the complete IGCSE library: past papers, mark schemes, mind maps, flashcards and audio lessons.

Full lesson notes with diagrams
AI-powered learning assistant
Timed mock exams marked the moment you finish
Available on Android, Windows, macOS, and Linux iOS app coming soon

Lesson Evaluation

Congratulations on completing the lesson on Arithmetic Operations In A Programming Language. 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. What is the value of 23 DIV 4? A. 3 B. 5 C. 5.75 D. 6 Answer: B
  2. What is the value of 23 MOD 4? A. 0 B. 1 C. 3 D. 5 Answer: C
  3. Which expression tests whether the integer N is a multiple of 3? A. N DIV 3 = 0 B. N MOD 3 = 0 C. N / 3 = 0 D. 3 MOD N = 0 Answer: B
  4. What is the value of 5 + 10 DIV 5? A. 3 B. 7 C. 11 D. 15 Answer: B
  5. A variable Turn holds 2 and is updated by Turn ← (Turn + 1) MOD 3. What does it hold afterwards? A. 0 B. 1 C. 2 D. 3 Answer: A

Work through these questions in the app

Work through these questions in the app

Practice Mock Questions

Want to practice mock questions on Arithmetic Operations In A Programming Language? 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+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning