Data representation and data types Flashcards

paper 2

1
Q

what is a word

A

number of bits that can be simultaneously be processed or stored in a single register - typically 32 or 64 bits

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

order of the byte groups

A

byte (2^0 bits)
kilobyte (2^10)
megabyte (2^20)
gigabyte
terabyte
petabyte

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

what does a character set do?

A

maps each character to a unique binary number
eg ascii and unicode

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

what is shifting used for?

A

multiplication and division

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

logical shift

A

shifts digits either left or right not considering sign
used with positive unsigned integers
overflows ignored

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

arithmetic shift

A

shifts digits either left or right while maintaining the MSB to keep the sign AND the sign is passed on to 2nd MSB

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

sign and magnitude

A

MSB represents the sign
1 for negative and 0 for positive
rest of the digits are used as normal
can represent between -127 and +127

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

two’s complement

A

MSB represents -128 and the other values are added to it (if it is set to 1)
can represent between -128 and +127
make a negative number by making a positive number and flipping all the digits up until the leftmost 1

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

what does the number of bits representing the mantissa influence?

A

the precision of the floating point

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

what to do with a negative exponent

A

convert it to denary
move the decimal LEFT by that many spaces
calculate the denary value

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

pro of floating point

A

greater range of positive and negative numbers can be stored in the same bits

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

floating point cons

A

numbers not always stored accurately
requires more complex processing
no exact representation of 0

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

truncation

A

simply ignoring the bits after the cut off point
method of dealing with overflows by the processor

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

rounding

A

approximates a number to the nearest integer, half, quarter etc

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

absolute error fomula

A

original number - truncated (or rounded) number

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

relative error formula

A

absolute error/original number (x100)

17
Q

overflow

A

when the number you want to store is too large for the number of bits assigned to it

18
Q

underflow

A

when the answer is too small to be represented and is stored as 0