chapter 3 data representation Flashcards

1
Q

what is fixed size numbers

A

Fixed Size Numbers

Half the natural numbers will represent themselves
The other half will represent negative integers

100= -50 to 49
we count zero

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

what is ten’s complement? and what is the formula?

A

Ten’s complement: Using two decimal digits, represent 100 numbers

*If unsigned, the range would be …
– let 1 through 49 represent 1 … 49
– let 50 through 99 represent -50 … -1

formula:
Negative(i) =10^k -i

k is the number of digits and i is the number you what to change

For example, -3 is Negative(3), so using two digits, its
representation is
Negative(3) = 100 – 3 = 97

What about three-digit representation?
Negative(3) = 1000 – 3 = 997

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

what is two complement?

A

positive and negative numbers in a binary number representation.

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

what are real numbers?

A

its the numbers that come after the decimal point

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

what is floating point? mantissa? and exponent?

and how do they work together?

A

floating point: is a way to represent real numbers, including fractions and really big or small values, in a computer.

mantissa = the whole number

exponent = tells us where to move the decimal

sign * mantissa * 10^exponent

example
12001.00 = 12001*10^0

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

how do you convert fraction to binary?

how do you convert .75 to binary

A
  1. Write Down the Fraction: Start with your fraction, like 0.75.
  2. Multiply by 2: Take your fraction and multiply it by 2. For 0.75, that gives you 1.5.
  3. Note the Whole Part: Write down the whole part of the result on the left side. In this case, it’s 1.
  4. Keep the Fraction Part: Take the fractional part of the result (the part after the decimal point), which is 0.5 in this case.
  5. Repeat Steps 2-4: Now, repeat these steps with the fractional part. Multiply it by 2 again. For 0.5, you get 1.0.

6.Note the Whole Part: Write down the whole part of this new result, which is 1.

7.Repeat Again: Keep repeating these steps, multiplying by 2 and writing down the whole part until the fractional part becomes 0 or until you’ve gotten the number of binary digits you want.

EXAMPLE

Here’s how it looks with 0.75:

0.75 x 2 = 1.5, so you write down 1.
The fractional part becomes 0.5.
0.5 x 2 = 1.0, so you write down 1.
The fractional part becomes 0 (no remainder).
So, in binary, 0.75 is written as 0.11.

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

what is scientific notation

A

A form of floating-point representation in which the decimal
point is kept to the right of the leftmost digit
12001.32708
is 1.200132708E+4 in scientific notation (E+4 is how computers
display x104
)

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

what is keyword encoding?

A

Replace frequently used patterns of text with a single special
character. the goal is make the data smaller to save room and encode it

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

what is run-length encoding?

A

single value may be repeated over and over again in a long sequence

Replace a repeated sequence with
* a flag
* the repeated value
* the number of repetitions

EXAMPLE
* *n8
* * is the flag
* n is the repeated value
* 8 is the number of times n is repeated

remember *n3 is still 3 values

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

what is huffman encoding

A

Huffman encoding makes common things shorter in data, like using shortcuts to save space in a message.

huffman encoding is an example of prefix coding

example
1011111001010 = DRAB

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

what are names for these
BMP?
GIF?
PNG?
JPEG?
vector graphic ?

what are the difference between them?

A

BMP = bitmap =TrueColor color depth, or less to reduce file size
* Well suited for compression by run-length encoding

gif= indexed color=File explicitly includes palette of 256 or fewer colors
* Each pixel thus requires only 8 or fewer bits
* Animated GIFs are short sequences of images

png = portable network graphics =Intended to replace GIFs
* Greater compression with wider range of color depths
* No animation

jpeg =joint photographic =Suitable for photographs and complex images with millions of colors (24-bit).
=Commonly used for web images, digital photography, and anywhere a good balance between quality and file size is needed.

vector graphics = a format that describes an image in terms of lines and geometric shapes

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

what is temporal compression

A

A technique based on differences between consecutive frames:
If most of an image in two frames has not changed, why should
we waste space duplicating information?

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

what is spatial compression

A

A technique based on removing repetitive information within a
frame: This problem is essentially the same as that faced when
compressing still images

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