Bit rate [kilobits per second - kbps] = frequency x bit depth x
channels
File size of a sound file = Bit rate x number of seconds
File size of an image [bits] = height x width x number of bits
per pixel [to find in bytes you divide by 8]
Sound and Sampling
Analogue sounds are physical sounds that are converted to digital
sounds by a computer.
Sampling is a method of converting analogue sound signals into a
set of binary numbers that are then stored in a digital file.
Amplitude is the height of the wave.
Sample rate = number of samples per an amount of time
o sample rate measured in Hertz
o the higher the sample size, the larger the file.
Sample resolution = bit depth – the number of bits used per
sample.
o More bits per sample = higher sound quality
Bit rate is the number of bits used per second of audio.
ADC (analogue to digital converter) used to convert inputs to
digital signals
DAC (digital to audio converter) used to convert digital signals
to outputs
Sound sampling = measurement of amplitude of wave
File size = sample size x bit depth x duration
Functions
A function is a block of code which is executed when it is called
from somewhere in the program.
A function will return a value.
Functions are perfect for abstraction. They allow us to write
blocks of code which can be reused in different ways and in
different programs.
Data Types
Boolean – true or false
String
Integer – whole number
Float – decimal number
, Character – single letter or number
Arithmetic operators
+
-
/
*
^
MOD – gives remainder
DIV – divides number
Computational Thinking
An algorithm is a clear sequence of instructions with a start, a
finish, and usually some decisions in the middle. An example of an
algorithm in the real world is in automotive design to make faster,
lighter, more fuel efficient and safer vehicles like cars or planes.
Decomposition is breaking down a complex problem or system into
smaller, more manageable parts.
Abstraction is focusing on the important information and ignoring
irrelevant details.
Abstraction and decomposition are required to figure out an
algorithm about how much to charge for lemonade at a lemonade stand
because the person needs to figure out how much they pay to buy the
ingredients, make the lemonade and set up the stand, and figure out
how much profit they plan to make.
Computational thinking is breaking down a problem and finding
solutions that a computer can understand.
The CPU and how it works
CPU stands for central processing unit. It is the part of the
computer that fetches and executes [FDE Cycle] the instructions
that are stored in cache/memory [RAM].
The CPU has three main parts; the CU, the ALU and the cache.
The CU controls and coordinates all activities - is in overall
control of the CPU, it manages the FDE cycle and controls the
flow of data inside the CPU [to registers, ALU, cache, etc.] and
outside the CPU [to main memory and input/output devices]. It
decodes instructions and executes them, receives signals from the