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