Data Flashcards
Why do computers use binary
To represent data and program instructions
Max number of patterns that can be represented by a binary pattern of a given length
2 ^ n
Unsigned integers
- a positive or negative number that has been assigned a + or - value.
- unsigned integers aren’t assigned and therefore are positive
- sign is always represented using the most significant bit
Two’s complement
most common way of representing signed binary integers. only one way of representing zero
it follows the rules of sign and magnitude - sign is the left most bit, and 0 = positive and 1 = negative
Arithmetic works in two’s complement
Convert MSB to negative and then work out the number in denary
Denary to 8-bit binary
use ur brain for this one
Binary addition
0 + 0 = 0
0 + 1 = 1
1 + 1 = 0 carry 1
1 + 1 + 1 = 1 carry 1
Logical shift
Moves a set of bits either right or left. Vacant bits filled with 0s.
Arithmetic shift
Multiplying and dividing binary numbers. Sign bit preserved
Left shift
Multiplication
Right shift
Division
Overflow
when the result of a calculation is too large to be represented in the number of bits allocated
7-bit ASCII
A = 65
Bitmap images
A file format used to store digital images
Analogue sound
Computer captured sound waves stored in binary. Most commonly stored with sampling
Samples the sound at regular intervals (sample rate)
Duration and sample resolution (bit depth) all impact the sound quality and size of file
ADC - analogue to digital converter. Converts electrical signals to digital values
DAC - Digital to analogue converter. Converts digital values back to analogue electrical signals
Limitations of binary storage
Constrained by the number of available bits
Data compression
making a data file smaller to fit in a computer
Lossy
Some data is lost during the compression process
Lossless
Allows data to be exactly reconstructed from compressed data
Terminator
Goes at beginning and end, and signifies termination of code. it is an oval
Processes
Any action that needs to be carried out - Rectangle
Data
Used for input and output of a value. Parallelogram.
Decisions
Diamond, each side is a different ‘fork’ or pathway. Similar to Circuit Wizard.
Arrow
Joins symbols together and shows direction of flow. Needs an arrowhead!!
Pixel
Smallest element in an image
Colour depth
1 bit colour depth = 2 colours
4 bit colour depth = 16 colours
8 bit colour depth = 256 colours
Image resolution
Number of pixels that can be contained per inch
Metadata
Data about data e.g. Colour depth, file format
File size calculations
Sample rate * Sample resolution * Duration = File size