Why is the binary system used?
Components inside computers have billions of transistors. Binary is used to represent the transistors inside the component. Transistors can be on or off (1 or 0).
Overflow
When the result of a binary calculation requieres more bits than are available in the computer hardware (register)
Two’s complement, denary to binary
Two’s complement, binary to denary
Logical shifts
When doubling, shift/move all bits to the left
When halving, shift/move all bits to the right
Bit
Binary digit
Image file size formula
File size(bits) = width(px) x height(px) x colour depth(bits)
Hexadecimal
Units
kilobit - 1000 bits
megabit - 1000^2 bits
gigabit - 1000^3 bits
kilobyte - 8 x 1000 bits
megabyte - 8 x 1000^2 bits
gigabyte - 8 x 1000^3
kibibyte - 8 x 1024 bits
mebibyte - 8 x 1024^2 bits
gibibyte - 8 x 1024^3 bits
Compression
Reduce file sizes by repackging or removing some data
Lossless compression
Lossy compression
It reduces file size by permanently deleting some of its data.
How is text represented
Characters in texts
How are characters in text represented
How to computers record sound
With a microphone (or a recording device) a computer will take samples at a fixed interval (usually thousands of samples per second), it will then convert these values into binary to be stored in a file.
Audio file size formula
file size (bits) = sample rate(Hz) x bit depth(bits) x recording length (seconds)
Signed and Unsigned integer
Flowchart symbols
Terminal/”Sausage” - Start/Stop
Rectangle - Process
Diamond- If/elif/else (conditionals)
Parallelogram - Input / Output
Rectangle with vertical borders - Subprograms
Iteration
A repetition of code
Decomposition
Breaking down a bigger problem into smaller parts
Abstraction
Removing unnecessary details so that only the most important details remain
Error types