1.4 Data Representation and data types Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are the 4 rules of binary subtraction?

A

0 - 0 = 0
1 - 1 = 0
1 - 0 = 1
0 - 1 = 1 (After Borrowing)
The bit turns into two

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

What is 1110 - 1101 ?

A

1 1 1 0
- 1 1 0 1
= 0001 or just 1

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

What are the parts of a parts of floating point stored number?

A

Mantissa
- Sign bit
- Decimal Point
- Value
Exponent
- Sign bit
- Value

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

What is truncation?

A

When there is not enough bits to represent all numbers stored and extra bits are missed out
e.g. 0.100101 could be cut down to 0.1001

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

What are the types of error measurements for truncation, rounding and floating points?

A

Absolute error- Original number -Altered Number

Relative error- Absolute error/ Original Number

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

What is rounding?

A

This is when there are not enough bits to represent all numbers and the bit before the cut off is increased by 1 if the bit after the cut off is 1
e.g. 0.0101101 -> 0.011

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

What is normalization in floating point numbers?

A

This is when a floating point number (exponent and mantissa) is changed so that the first digit of the mantissa is a significant figure.

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

Why do we normalize a floating point number?

A

To allow for the maximum possible precision with a given number of bits

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

What is the order of prefixes for storing bytes?

A

Byte - B - 8 bits
Kilobyte- KB - 1024B
Megabyte - MB - 1024KB
Gigabyte - GB - 1024MB
Terabyte - TB - 1024GB
Petabyte - PB - 1024TB
Exabyte - EB - 1024PB
Zettabyte - ZB - 1024EB
Yottabyte - YB - 1024ZB

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

How many bits is an ASCII character and how many characters can be represented?

A

7-bits and 128 characters

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

What does ASCII stand for?

A

American Standard Code for Information Interchange

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

How many bytes does UNICODE use to store characters?

A

up to 4 bytes/ 28 bits
But usually 2 bytes

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

What is the storage requirements for each data type?

A

Character - 1 byte for ASCII or 4 bytes for UNICODE
String - number of characters multiplied by 1 byte or 4 bytes
Boolean - 1 bit
Integer- 2 bytes
Real- Whatever the word length of a system (64 bit -> 8 bytes but depends on the mantissa and exponent size

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