Fundamentals of data representation Flashcards
Understand the following number bases:
• decimal (base 10)
• binary (base 2)
• hexadecimal (base 16)
Decimal (denary) is base 10 because there are ten different digits (0-9)
Binary is base 2 because there are two digits (0,1)
Hexadecimal is base 16 because there are 15 digits (9-F)
Why do computers use binary?
Computers use binary to represent all data and instructions. A bit pattern could represent different types of data including text, image, sound and integer
Explain why hexadecimal is often used
Due to hex numbers being shorter, theres less chance of input errors. It’s easier to convert between binary and hex than binary and denary. It’s simpler to remember large numbers in hex as they are shorter than binary numbers.
What is: a bit and a byte?
A bit is the smallest measure of data, it is a single binary digit (0 or 1)
A byte is 8 bits, it is large enough to store one character
Name the measurements of data
Bit - single binary digit Nibble - 4 bits Byte - 8 bits Kilobyte - 1000 bytes Megabyte - 1000 kilobytes Gigabyte - 1000 megabytes Terabyte - 1000 gigabytes Petabyte - 1000 terabytes
What is a binary shift? Describe situations where binary shifts can be used
A binary shift moves every bit in a binary number left or right by a certain number of places.
Binary shifts can be used to perform simple multiplication/division by powers of 2
What is a character set?
collections of characters that a computer recognises from their binary representation
Describe ASCII and Unicode
ASCII -
What is a pixel?
The term pixel is short for Picture Element. A pixel is a single point in a graphical image.
Describe the following for bitmaps:
• size in pixels
• colour depth
The size of an image is expressed directly as width of image in pixels by height of image in pixels using the notation width x height.
Colour depth is the number of bits used to represent each pixel
Describe how a bitmap represents an image using pixels and colour depth
A bitmap is an image stored as an array of individual pixels. Black and white images only use two colours meaning they only need 1-bit to represent each pixel - o for white, 1 for black. 2-bit images can be made up of four colours. Each pixel can be one of four binary values - 00, 01, 10, 1. You can make a greater range of shades and colours by increasing the number of bits for each pixel.
Describe how the number of pixels and colour depth can affect the file size of a bitmap image
The higher the resolution, the more pixels there are in a certain area and so the better quality of image. Increasing the resolution or the colour depts means that there are more bits in the image. This improves image quality but also increases the file size.
How do you calculate bitmap image file sizes?
Size bits = W x H x D
Size bytes = W x H x D /8 W = image width
H = image height
D = colour depth in bits
How is sound sampled?
Sound is recored by a microphone as an analogue signal. The analogue signals need to be converted into digital data so that computers can read and store files. To covert the analogue recording to digital data, we sample the amplitude of the wave at regular intervals. The amplitude can only take certain values depending on the bit rate.The digital data can be improved by taking samples more regularly.
Why are sound waves sampled?
A sample is a measure of amplitude at a point in time
Describe the digital representation of sound in terms of:
• sampling rate
• sample resolution
Sampling rate is the number of samples taken in a second and is usually measured in hertz (1 Hertz = 1 sample per second).
Sample resolution is the number of bits per sample
How do you calculate sound file sizes?
File size (bits) = rate x res x secs rate = sampling rate res = sample resolution secs = number of seconds
Explain what data compression is
When we make file sizes smaller, while trying to make the compressed file as true to the original as possible. This takes up less storage space, take up less bandwidth as streaming and downloading files is quicker. Allows web pages to load more quickly.
Explain how data can be compressed using run length encoding (RLE)
Lossy - permanently remove data. It takes up less bandwidth, greatly reduce file size. However it does data, can’t be used on text or software files and are worse quality than the original.
Lossless - remove data temporarily, no reduction in quality, can be decompressed and can be used on text and software files. Only a slight reduction in file size.