Binary Representation (Ch9) (M1) Flashcards
What is a character set?
A character set is a list of binary codes that can be recognised by computers as being usable characters
What is ASCII?
ASCII is a common encoding system for text and is a standard that was used by many computers worldwide
What does ASC() do?
ASC() coverts a string character to an ASCII code value
What does CHR() do?
CHR() converts an ASCII code to a string character
What is unicode?
Unicode is a character set used to represent all known languages
What is the equation to find the size of a text file?
Text file size = bits per character x number of characters
What do computers operate and communicate with?
Computers operate and communicate using binary
Why are binary codes used to represent text?
Binary codes are used to represent text because letters, punctuation, numbers, and symbols cannot be recognised by a computer
What is the difference between ASCII and unicode?
ASCII stores characters as 7 bit values, whereas unicode stores characters as 8 bit ASCII
How many bits was ASCII originally represented with, how has this changed?
ASCII was originally represented with 7 bits
This is often now represented with 8 bits by adding a 0 at the beginning
What is the value of “A” and “a” in ASCII?
A = 65
a = 97
Why did ASCII store characters as 7 bit values, and then changed to store them as 8 bit values?
ASCII changed the amount of bits needed to store a character because computing grew in popularity.
This led to ASCII being extended to 8 bits to allow for: foreign languages, mathematical symbols, and special symbols
In English, what is the same about Unicode and 8 bit ASCII?
In English, the first 128 codes in unicode are the same as in ASCII
What is the relationship between the number of characters and the number of bytes?
The number of characters (including blank spaces) in the file, equals the number of bytes
1 character = 1 byte
What is a pixel?
A pixel is the smallest possible dot on a computer screen, and has a colour
What is resolution?
Resolution is the number of pixels per square inch on the computer screen
What is colour depth?
Colour depth is the number of bits used to encode the colour of each pixel
What is metadata?
Metadata is data about data
What is the formula to find the file size of an image?
Image file size = colour depth x image height (px) x image
An image sized 640 x 420 has:
640 pixels in width
420 pixels in height
Calculate the total number of pixels
Total pixels = width x height
Total pixels = 640 x 420
Total pixels = 268,800
What is a greyscale image?
A greyscale image is where the value of a pixel is a single sample, only representing an amount of light
What is the relationship between the number of pixels and the image quality?
The more pixels, the higher the image quality
The less pixels, the lower the image quality
What are bitmap images made up of?
Bitmap images are made up of pixels
How can you make a greater range of shades and colours in an image?
You can make a greater range of shades and colours by increasing the number of bits per pixel (the colour depth)
What are the common colour depths?
Common colour depths: 1-bit, 8-bit, 16-bit, and 24-bit
Most devices use a 24-bit colour depth. How many bits are used for each colour?
8 bits are for the levels of red, green and blue in each pixel
What is the formula to find the total number of colours in an image?
Total number of colours = 2^n
(Where n = number of bits per pixel (bpp), or colour depth)
In 8-bit encoding, how many colour variations are there?
In 8-bit encoding, there are 256 colour variations
If 8-bit encoding has 256 colour variations, how many colour variations does 24-bit encoding have?
8 bits = 256 colour variations
24 bits = 256 x 256 x 256
= 16,777,216 colour variations
What is 24-bit encoding known as? Why?
24-bit encoding is known as true colour
This is because this colour depth can produce more colours than the human eye can see (estimated to be 10 million)
What is the formula to find the number of pixels in an image?
Number of pixels = image width x image height x colour depth encoding value
(Number of pixels = resolution x colour depth encoding value)
P = W x H x D
An image that has a resolution of 640 x 420 has a 24-bit colour depth. How many pixels does the image have?
Resolution = 640 x 420 = 268,800
Colour depth = 24
Number of pixels = resolution x colour depth encoding value
Number of pixels = 268,800 x 24
Number of pixels = 6,451,200 pixels
An image that has a resolution of 640 x 420 has a 24-bit colour depth. What is the file size of the image in megabytes?
Resolution = 640 x 420 = 268,800
Colour depth = 24
Number of pixels = resolution x colour depth encoding value
Number of pixels = 268,800 x 24
Number of pixels = 6,451,200 pixels
File size = 6,451,200 bytes
1MB = 1,000,000 bytes
6,451,200 / 1,000,000 = 6.4512 (6.4) MB
What is the equation to find the file size in bytes?
File size (in bytes) = file size (in bits) / 8