The Three Types of ALU Operations

Test yourself on Arithmetic Logic Unit (ALU) with exam style questions, marked instantly.

Flashcards that come back just before you would forget them.

A revision plan that remembers what you know and shows what to do next.

See which topics you have nailed and which need another look.

Quiz yourself on Arithmetic Logic Unit (ALU)Get your flashcardsBuild my revision planTrack my progress

The Three Types of ALU Operations

1. Arithmetic Operations

Mathematical calculations that produce numerical results:

  • Addition (+): 5 + 3 = 8
  • Subtraction (−): 10 − 4 = 6
  • Multiplication (×): 6 × 7 = 42
  • Division (÷): 20 ÷ 4 = 5
  • MOD (modulus): the remainder after division. 17 MOD 5 = 2
  • DIV (integer division): how many whole times one number goes into another. 17 DIV 5 = 3

Real-world uses: Calculating totals in shopping carts, working out game physics, processing scientific data, rendering 3D graphics

2. Logic Operations

Boolean operations that work with True/False values:

  • AND: Both inputs must be TRUE for output to be TRUE (e.g., TRUE AND TRUE = TRUE, TRUE AND FALSE = FALSE)
  • OR: At least one input must be TRUE for output to be TRUE (e.g., TRUE OR FALSE = TRUE, FALSE OR FALSE = FALSE)
  • NOT: Inverts the input (TRUE becomes FALSE, FALSE becomes TRUE)
  • XOR (Exclusive OR): TRUE if inputs are different, FALSE if same

Real-world uses: Checking multiple conditions in IF statements, combining Boolean flags, encrypting data, validating user permissions

3. Comparison Operations

Compare two values and return True or False:

  • Equal to (=): Is 5 = 5? TRUE. Is 5 = 3? FALSE
  • Not equal to (≠): Is 7 ≠ 3? TRUE
  • Greater than (>): Is 10 > 5? TRUE
  • Less than (<): Is 3 < 8? TRUE
  • Greater than or equal (≥): Is 5 ≥ 5? TRUE
  • Less than or equal (≤): Is 4 ≤ 9? TRUE

Real-world uses: Age verification (age >= 18), sorting algorithms, loop conditions (while count < 10), finding minimum/maximum values

Make this stick

Signing in gives access to all PrepWise features.

PrepWise is a trading name of A3M Quality Solutions Limited, registered in England and Wales, company number 14959172. Registered office: 202 Stroud Road, Gloucester, GL1 5LA. ICO registration ZC267069.