Representing data Flashcards
In computers, how is data and instructions represented?
Binary
What type of number system is binary?
Base two (0 and 1)
What is each digit in a binary number called?
Bit
Convert 10110 to denary
22
Convert 0100 1001 to denary
73
What is a group of 8 bits called?
Byte
How many bytes are in a kilobyte?
1024
How many kilobytes are in a megabyte?
1024
How many megabytes are in a gigabyte?
1024
How many gigabytes are in a terabyte?
1024
What is half a byte (4 bits) called?
Nibble
Convert 34 (base 10) to binary?
0010 0010
Convert 115 (base 10) to binary
0111 0011
What is 1 + 1 in Binary?
10 (binary)
1101 + 1011 (binary)
1 1 0 1 1 0 1 1 ----------- 1 1 0 0 0 ----------- 1 1 1 1
=11000
What is an overflow error?
When the result of binary addition is too big to fit the available space
Why do programmers use hexadecimal numbers?
Easier to recognise and remember than large binary numbers.
What is 27 (hexadecimal) in denary?
39 (base 10)
What is BD (hexadecimal) in denary?
B = 11 D = 13
11*16 = 176 13*1 = 13
176+13 = 189
= 189
What is 197 (base 10) in hexadecimal?
197 / 16 = 12
(remainder of 5)
12 / 16 = 0
(remainder of 12)
12 (den) = C (hex)
5 (den) = 5 (hex)
= C5
Convert 10100011 to hexadecimal
1010 = 10 (base 10) 0011 = 3 (base 10)
10 = A (hex) 3 = 3 (hex)
= A3
Convert C5 (hex) to binary
C = 12 (base 10) 5 = 5 (base 10)
12 = 1100 5 = 0101
= 1100 0101
How are characters represented on a computer?
By a binary code
What determines the number of characters or symbols that can be used?
The number of bits
ASCII Example
A is
1000001
How are images stored on a computer?
Using binary
What is metadata?
Data about the data
E.g. Data to tell the computer how to properly interpret the binary data of the image file to display it (resolution)
What is the height and width of an image measured in?
Pixels
What is a pixel?
One “dot” in an image
What determines the number of bits required to code for one pixel?
How many colours each pixel can represent
What is colour depth measured in?
bpp (bits per pixel)
Define resolution
The number of pixels per unit
Eg dots per inch (dpi)
The greater the resolution, the _____ the file size.
Larger
What happens if a bit mapped image is enlarged?
Pixelated or blocky
How is an analogue sound converted into digital?
Sampling
What is a sample interval?
The time between each sample.
The greater the sample interval the _____ the sample rate
Lower
What happens when a sound is sampled at a low rate?
- Few samples are taken.
- There is a poor match between the original and the sampled sound.
- A small file size is required.
What happens when sound is sampled at a higher rate?
- More samples are taken
- There is a good match between the original and sampled sound
- A large file size is required
Define bit rate
The amount of space used for each sample
A high bit rate means
- More accurate sampling at each point which gives a better quality
- More data needs to be stored so there will be a larger file size
What process does the CPU do with instructions?
Fetch, decode, execute
What is a computer instruction split up into?
Operator and operand
What does an operator represent?
An operation to do to the operand
What does an operand represent?
The data that the instruction uses
What is the operator and operand for:
10011011
1001 1011
Operator Operand
What is an accumulator?
A register in the CPU used to store the results of an calculation