Term 1 · Computing · Age 14

Binary, hexadecimal, media, compression and first programs

Term 1: 10 lessons in Computing · Age 14

  1. Binary and denary: A processor contains billions of transistors: switches that are either off (0) or on (1). One switch gives 2 patterns.
  2. Hexadecimal and colour codes: A byte is 8 bits. Rows of 0s and 1s are hard for people to read, copy and check. Hexadecimal writes every 4 bits as one symbol.
  3. Input, variables and output: A variable is a named place in memory that holds a value. The = sign means 'store', not 'equals'.
  4. Binary addition, overflow and shifts: Binary addition works like column addition, but you carry at 2 instead of 10. There are only four facts to learn. Tap each one.
  5. Selection: if, elif and else: Selection lets a program choose a path. The condition after if is either True or False.
  6. Text, images and sound as numbers: A character set gives every letter, digit and symbol a number code. In ASCII, A is 65 and a is 97.
  7. File size and compression: 8 bits make a byte. After that, each unit is 1024 times bigger: kibibyte (KiB), mebibyte (MiB), gibibyte (GiB), tebibyte (TiB).
  8. From a problem to an algorithm: Before writing any code, work out the inputs (data going in), the process (what happens to it) and the outputs (results).
  9. Loops: counting and totalling: A for loop repeats its indented lines once for each value. range(1, 6) gives 1, 2, 3, 4, 5: it stops BEFORE the end number.
  10. Tracing a program: A trace table records the value of every variable after each line runs. It is how programmers check an algorithm by hand.

Revision and short notes

All of Computing · Age 14