3.3 Data Representation Flashcards
Gigabyte (GB)
1000 megabytes
A bitmapped graphic uses a colour depth of 3 bits allowing 8 different colours to be used. How many bits are required to represent the colours if an image included 30 colours?
5 bits
[1 bit - 2 colours
2 bits - 4 colours
3 bits - 8 colours
4 bits - 16 colours
5 bits - 32 colours]
Character set
All data including characters are represented by binary code. These sets of characters are collections of characters that computers recognise from their binary representation
Byte
8 bits
Binary
A number base of 2
To divide a binary number by 2, shift the digits ONE place to the right.
To divide a binary number by 4, shift the digits TWO places to the right.
Divide 1100 by 2.
128 64 32 16 8 4 2 1
1 1 0 0
1 1 0
[The right-hand digits are lost when they are shifted. To check:
1100 = 12 in denary: 12/2 = 6]
Megabyte (MB)
1000 kilobytes
What is a binary shift?
Binary numbers are multiplied and divided through a process of shifting. To multiply a number all the digits move to the left. To divide a number all the digits move to the right.
Terabyte (TB)
1000 gigabytes
Hexadecimal
A number base of 16
Nibble
4 bits
What is the file size of an image in bytes which is 120pixels x 300 pixels and uses 8 colours? Show your working out.
120 x 300 = 36,000
[8 colours requires 3 bits]
36,000 x 3 = 108,000 bits.
108,000/8 = 13,500 bytes
ASCII (American Standard Code for Information Interchange)
Uses 7 bits and represent 128 different characters.The codes are order sequentially, so for example, A is 65 in decimal, B is 66, etc.
Unicode
Using extended ASCII the maximum number of 256 characters is far too small to hold every character in other languages, such as Chinese or Arabic. Unicode uses 16 bits, giving a range of over 65,000 characters and more!
Kilobyte (kB)
1000 Bytes