NCEA L1 Digital Tech cheat sheet
NCEA L1 Digital Tech · Keep the key ideas within reach.
Software Programming
Three core control structures: sequence (statements run in order), selection (if/elif/else, switch), iteration (while/for loops).
A variable is a named reference to a memory location; its type determines valid operations (int, float, string, boolean).
IPO model: Input → Process → Output. Every program can be decomposed into these three stages.
Arithmetic operators: + - * / (float division) // (integer division) % (modulo remainder) ** (exponent).
Comparison operators return booleans: == != < > <= >=. Assignment (=) is not comparison (==).
Boolean logic: AND requires both true; OR requires at least one true; NOT inverts. Precedence: NOT > AND > OR.
Loop patterns: definite iteration (known count, for-loop) vs indefinite iteration (condition-driven, while-loop); a while-loop must update its condition variable or it runs forever.
A function encapsulates reusable logic: parameters pass data in, return passes a value out. Local variables exist only inside the function scope.
Testing types: unit (single function), integration (modules together), acceptance (meets user requirements). Debugging locates defects; testing reveals them.
Electronic Environments and Embedded Systems
Ohm's Law: V = I × R (voltage = current × resistance). Rearranged: I = V/R, R = V/I.
Power formula: P = V × I (watts = volts × amps). Also P = I²R and P = V²/R.
Series circuit: current is the same through all components; resistances add (R_total = R1 + R2 + ...); voltage divides.
Parallel circuit: voltage is the same across all branches; 1/R_total = 1/R1 + 1/R2 + ...; current divides.
Digital signals have two discrete states (HIGH/LOW, 1/0); analog signals vary continuously over a range.
An embedded system = microcontroller + dedicated firmware + sensors/actuators, designed for a specific task rather than general computing.
Input devices (sensors, switches, LDR, thermistor) convert physical quantities to electrical signals; output devices (LED, motor, buzzer, relay) convert electrical signals to physical action.
A microcontroller typically integrates CPU, memory (RAM/ROM), and I/O pins on one chip; a microprocessor needs external memory and peripherals.
Pulse-width modulation (PWM) varies average power to a load by rapidly switching a digital output on and off; duty cycle = on-time / period × 100%.
Digital Information Systems
Data vs information: data is raw unprocessed symbols; information is data processed into meaningful context for a purpose.
Binary is base-2 (digits 0,1); decimal is base-10; hexadecimal is base-16 (0-9, A-F). One hex digit = 4 bits; one byte = 8 bits.
Convert binary to decimal by summing place values: 1011₂ = 8+0+2+1 = 11₁₀.
Storage units: 1 byte = 8 bits; 1 KB = 1024 bytes; 1 MB = 1024 KB; 1 GB = 1024 MB.
Character encoding maps symbols to numeric codes: ASCII uses 7/8 bits (128/256 characters); Unicode supports far larger character sets.
A database is an organised collection of related records; a record is a set of fields describing one entity; a field is a single attribute.
Primary key uniquely identifies each record; foreign key references a primary key in another table to create a relationship.
Data integrity is protected by validation (range, type, presence, format checks) and verification (double entry, proofreading).
Compression reduces file size: lossless (e.g. PNG, ZIP) preserves all data; lossy (e.g. JPEG, MP3) discards data deemed less perceptible.
Digital Media
Raster images are grids of pixels; resolution (width × height) and colour depth (bits per pixel) determine file size: size ≈ width × height × colour depth / 8 bytes.
Vector images use mathematical paths (points, lines, curves) and scale without pixelation; raster images lose quality when enlarged.
Colour models: RGB is additive (screens, light); CMYK is subtractive (print). RGB uses 8 bits per channel = 24-bit colour (~16.7 million colours).
Frame rate is measured in frames per second (fps); higher fps gives smoother motion but larger files. 24-30 fps is standard for video.
Audio sampling: sample rate (samples per second, e.g. 44.1 kHz) and bit depth (bits per sample, e.g. 16-bit) determine quality and file size.
File size of uncompressed audio ≈ sample rate × bit depth × channels × duration (seconds) / 8 bytes.
Lossy compression (JPEG, MP3, MP4) removes perceptually redundant data; lossless (PNG, FLAC, ZIP) retains all original data.
Design principles: contrast, alignment, repetition, proximity (CARP); hierarchy guides the viewer's eye to key information first.
Aspect ratio is width:height (e.g. 16:9 widescreen, 4:3 standard); changing it without cropping distorts the image.
Software Programming
Three core control structures: sequence (statements run in order), selection (if/elif/else, switch), iteration (while/for loops).
A variable is a named reference to a memory location; its type determines valid operations (int, float, string, boolean).
IPO model: Input → Process → Output. Every program can be decomposed into these three stages.
Arithmetic operators: + - * / (float division) // (integer division) % (modulo remainder) ** (exponent).
Comparison operators return booleans: == != < > <= >=. Assignment (=) is not comparison (==).
Boolean logic: AND requires both true; OR requires at least one true; NOT inverts. Precedence: NOT > AND > OR.
Loop patterns: definite iteration (known count, for-loop) vs indefinite iteration (condition-driven, while-loop); a while-loop must update its condition variable or it runs forever.
A function encapsulates reusable logic: parameters pass data in, return passes a value out. Local variables exist only inside the function scope.
Testing types: unit (single function), integration (modules together), acceptance (meets user requirements). Debugging locates defects; testing reveals them.
Electronic Environments and Embedded Systems
Ohm's Law: V = I × R (voltage = current × resistance). Rearranged: I = V/R, R = V/I.
Power formula: P = V × I (watts = volts × amps). Also P = I²R and P = V²/R.
Series circuit: current is the same through all components; resistances add (R_total = R1 + R2 + ...); voltage divides.
Parallel circuit: voltage is the same across all branches; 1/R_total = 1/R1 + 1/R2 + ...; current divides.
Digital signals have two discrete states (HIGH/LOW, 1/0); analog signals vary continuously over a range.
An embedded system = microcontroller + dedicated firmware + sensors/actuators, designed for a specific task rather than general computing.
Input devices (sensors, switches, LDR, thermistor) convert physical quantities to electrical signals; output devices (LED, motor, buzzer, relay) convert electrical signals to physical action.
A microcontroller typically integrates CPU, memory (RAM/ROM), and I/O pins on one chip; a microprocessor needs external memory and peripherals.
Pulse-width modulation (PWM) varies average power to a load by rapidly switching a digital output on and off; duty cycle = on-time / period × 100%.
Digital Information Systems
Data vs information: data is raw unprocessed symbols; information is data processed into meaningful context for a purpose.
Binary is base-2 (digits 0,1); decimal is base-10; hexadecimal is base-16 (0-9, A-F). One hex digit = 4 bits; one byte = 8 bits.
Convert binary to decimal by summing place values: 1011₂ = 8+0+2+1 = 11₁₀.
Storage units: 1 byte = 8 bits; 1 KB = 1024 bytes; 1 MB = 1024 KB; 1 GB = 1024 MB.
Character encoding maps symbols to numeric codes: ASCII uses 7/8 bits (128/256 characters); Unicode supports far larger character sets.
A database is an organised collection of related records; a record is a set of fields describing one entity; a field is a single attribute.
Primary key uniquely identifies each record; foreign key references a primary key in another table to create a relationship.
Data integrity is protected by validation (range, type, presence, format checks) and verification (double entry, proofreading).
Compression reduces file size: lossless (e.g. PNG, ZIP) preserves all data; lossy (e.g. JPEG, MP3) discards data deemed less perceptible.
Digital Media
Raster images are grids of pixels; resolution (width × height) and colour depth (bits per pixel) determine file size: size ≈ width × height × colour depth / 8 bytes.
Vector images use mathematical paths (points, lines, curves) and scale without pixelation; raster images lose quality when enlarged.
Colour models: RGB is additive (screens, light); CMYK is subtractive (print). RGB uses 8 bits per channel = 24-bit colour (~16.7 million colours).
Frame rate is measured in frames per second (fps); higher fps gives smoother motion but larger files. 24-30 fps is standard for video.
Audio sampling: sample rate (samples per second, e.g. 44.1 kHz) and bit depth (bits per sample, e.g. 16-bit) determine quality and file size.
File size of uncompressed audio ≈ sample rate × bit depth × channels × duration (seconds) / 8 bytes.
Lossy compression (JPEG, MP3, MP4) removes perceptually redundant data; lossless (PNG, FLAC, ZIP) retains all original data.
Design principles: contrast, alignment, repetition, proximity (CARP); hierarchy guides the viewer's eye to key information first.
Aspect ratio is width:height (e.g. 16:9 widescreen, 4:3 standard); changing it without cropping distorts the image.