Data Types Flashcards

1
Q

How are characters represented on a computer?

A
  • In binary format

- Each character assigned a code point

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is ASCII?

A
  • American Standard Code. For Information Interchange
  • 7 bit standard ASCII is able to represent 128 different characters
  • MSB is set to 0
  • 128 unused code points
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is extended ASCII?

A
  • Makes use of remaining 128 codes
  • represents special characters
  • many different extended ASCII code sets
  • useful for representing different languages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Unicode?

A
  • ASCII uses 1 byte per character, so can only store 256 characters
  • some languages have > 12,000 characters
  • Unicode uses 2 bytes per character
  • This equates to 65,536 different characters
  • Eliminates the need for extended character sets
  • Extended Unicode uses 21 bits allowing us to represent dead languages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are sound cards?

A

-Translate analogue sound into digital signals for the computer to understand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How are sound waves converted so a computer can understand them?

A
  • Converted via equipment such as microphone into voltage changes
  • Changing voltage is sampled at intervals, sample rate
  • Sampled values converted into binary
  • Collection of binary values stored as a sound file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a digital analogue converter?

A
  • Stored sound data recreated using DAC
  • Binary numbers converted back into a varying voltage
  • When the voltage is fed to a speaker driver it results in vibrations which reproduce the sound
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the sampling rate?

A
  • Number of samples taken per second (from analogue sound waves)
  • Measured in hertz (44.1 KHz for an audio CD)
  • Higher sample rates means the closer the match between the original analogue sound waves and digital version. However more processing power is required to manipulate data and the file size will be larger.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the bit rate?

A
  • Number of memory bits used to store each sample per given time period
  • Higher bit rate = larger file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a bitmap image?

A
  • Groups of pixels
  • colour of each pixel stored as binary code
  • Becomes pixelated when enlarged. The pixels are larger and more visible
  • To store large or high res images a bitmap needs to store more information and the size of the file increases with size and resolution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the colour depth?

A
  • The number of bits used for each pixel
  • More bits per pixel means..
  • More combinations of pixels means more colours possible
  • 1 bit/pixel = 2 possible colours
  • 24 bit / pixel = 16 million possible colours
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are vector graphics?

A
  • Stored as set of instructions
  • How to draw each shape
  • Geometric shapes, logos and text
  • When enlarged, entire image is redrawn
  • No pixelation occurs. Smooth rescaling
  • Usually smaller files sizes
  • Size of file it not affected by size of image as the definition for the primitive shapes and control points remain unchanged
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the main data types we use?

A
  • Character: single letter, digit, symbol or control code
  • String: A string of alphanumeric characters
  • Boolean: one of two values (true or false)
  • Integer: Whole number values with no decimal parts
  • Real: Numbers with decimal or fractional parts
  • floating point: Any number with a fractional part, processed to a limited number of SF
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

1) Go through examples of how to convert +/- denary > +/- Binary and how to convert denary and binary into hex
2) Also go through binary mathematics

A

Do above

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is metadata?

A
  • Information about the image that allows the computer to interpret the stored binary accurately to reproduce the image.
  • Contains width, height and colour depth
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the resolution of an image?

A

-The number of pixels per unit (ppi)

17
Q

What is hex?

A

Short form of binary that is easy to remember

18
Q

How do you add FLPB?

A

1-convert exponent back to SF
2-Reverse the exponent
3-add like normal binary

19
Q

How do you sub FLPB?

A
1-convert exponent back to SF
2-reverse the exponent 
3-make both mantissas the same size
4-convert the negative using 2's compliment
5-add one to the negative value
6-add like normal binary
20
Q

What does shifting do?

A
  • logical shift moves each binary value left or right with any voids being filled with a 0
  • shift to the left by 2 = value*4
  • shift to right by 2 = value/4
21
Q

What is a mask? (Bitwise manipulation)

A

-bits in the mask chosen to manipulate the bits in the operand, allowing them through or blocking them

22
Q

What does the ALU use NOT operations for?

A

-NOT = creates a ones compliment value (all 1’s switch to 0’s and vise versa)

23
Q

What does the ALU use AND operations for?

A

-AND = can be used to return bits by using a 1 in the mask or exclude bits by using a 0. Useful for checking conditions stored in a binary value

24
Q

What does the ALU use OR operations for?

A

-OR = can be used to reset particular bits in the binary value. 1 will set the bit to 1, and using a 0 will return the matching bit in the original value

25
Q

What does the ALU use the XOR operation for?

A

-XOR = can be used to check if corresponding bits in two binary values are the same

26
Q

What do we use bitwise manipulation/shift operations for?

A
  • to manipulate binary values
  • To normalise the mantissa by moving the binary point in front of the first significant bit
  • If we employ a mask we can tell if this has happened. Masking with 01000000 using the AND operator will tell us if there is a 1 in the second bit from the left
27
Q

What is another use for bitshifting? Example?

A
  • can be used for multiplication as its faster. Dedicated processors would take full advantage of this
  • shift to the left to * and to the right to /.
  • to work out 3*17 we would shift 3 (in binary) four places to the left then add 3
  • this is because 17=16+1 and in base 2, 16=2^4 then add 3 (value we are multiplying * by remainder when multiplier is converted to base 2)