S3 Data Representation Flashcards
What is a logic gate?
Circuits built into computer chips
- they receive binary data
- apply a Boolean operation
- output a binary resume
Symbol for A AND B
A . B
Symbol for NOT A
Ā
Symbol for A OR B
A + B
Symbol for XOR B
A (+) B
Convert 300 kB to bits
300kB = 300 x 1000 = 300 000 bytes
300 000 bytes = 300 000 x 8
=2 400 000 bits
What is the order of the sizes of bits and bytes?
Bit
Nibble
Byte
Kilobyte
Megabyte
Gigabyte
Terabyte
What is 1+1 in binary?
What is 1+0 in binary?
10
01
What is 1011 after having a 2 place shift left?
What is the effect of this shift?
10
÷4
Why do programmers prefer hex?
- simpler to remember larger numbers
- Due to hex being shorter, less chance of input errors
- easier to convert between binary and hex than binary and decimal
What is hex 87 in decimal?
8 x 16 = 128
7 x 1 = 7
128 + 7 = 135
What is decimal 106 in hex?
106 ÷ 16 = 6 r 10
= 6A
What’s the largest number in hex?
FF
255
Convert binary 1011 1001 to hex
1011 1001
1011 = 11(dec) = B
1001 = 9
=B9
What is hex 8C in binary?
8 = 1000(binary)
C = 12(dec) = 1100
= 1000 1100
Define character set
Collections of characters that a computer recognises from their binary representation.
Up to what number are ASCII and Unicode the same?
128
How many different characters can 7 bit ASCII represent?
128
How many bits are used per character in ASCII? What about Unicode?
7-bits
Extended = 8 bits
Multiple bytes
Does Unicode cover all languages?
No
It covers all major languages
What is the total amount of colours for a 4 bit image?
2⁴ = 16 colours
How do you work out the file size of an image? (How many bits it will take up)
File size (in bits) = image size x colour depth
Image size = width x height
Define pixel
Picture element, a single point in an image
Sound waves are recorded as an analogue signal. What is an analogue signal?
Pieces of continuously changing data
How do analogue to digital converters work?
1) Analogue sound is received by a microphone
2) This is converted to an electrical analogue signal
3) The signal amplitude is sampled at regular intervals
4) The values are rounded to a level
5) The values are stored as a series of binary numbers
Define sample rate/frequency
How many samples you take per second(Hz/kHz)
Define sample resolution
The number of bits used to store each sample
How do you calculate bit rate?
Bit rate = sample rate x sample resolution
How do you calculate the size of a sound file?
File size (bits) = Sample rate (Hz) x sample resolution x seconds
Or bit rate x seconds
Define hertz
Samples per second
What are 4 reasons to compress files?
- less storage space
- streaming and downloading files from the internet faster as they take up less bandwidth
- web pages load faster
- emails have restrictions on file size.
Define Lossy compression
Permanently removing data from a file to reduce it’s size.
Define lossless compression
Temporarily removing data to store a file, then returning it to it’s original state when opened
Pros of lossy compression
- Greatly reduced file size
- Takes up less bandwidth
- Commonly used, most software can read
Cons of lossy compression
- cannot be restored to original state