Class 22: Integer Representation Flashcards

1
Q

For using Ned addition, if carry out from most significant pair of bits is _____, there is not overflow

A

0

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

Two complements range for values

A

-2^(w-1) <= x,y <= 2^(w-1) -1

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

Unsigned min and max values

A

Min value: 0
Max value 2^(w) -1

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

Conversion from two complement to usigned

A

X < 0: add 2^w
X <0: just x, no change

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

Usinged to two complement conversion

A

X < 2^(w-1) : nothing
X > 2^(w-1): subtract 2^w

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

B2O

A

One complement

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

In B2O, the most significant digit represent the _____ _____

A

Sign bit

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

If the sign bit is ____, it is a ____a number and to get the magnitude, _____ the bits

A

1, negative, invert

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

B2S

A

Sign magnitude

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

In B2S most significant bit represents ____ bit

If sign bit is 1, it is ____ and to get the magnitude of the number, use the remaining _____ bits

A

Sign bit
Negative, w-1

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

Loss of information in truncation

When a high order w-k bits are dropped when truncating to w bit number what happens

Unsigned:
Signed:

A

Unsigned: if all bits dropped are 0, value is preserved
Signed: If the most significant bit in the truncated number is the same as each of the truncated buts, value is reserved

(1111) to (111)
-1. -1

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

Unsigned integer addition overflow

A

Overflow when x+y > 2^(w) -1

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

Singed integer addition overlord

A

Negative overflow: x+y < -2^(w-1)
Positive overflow: x+y > 2^(w-1)-1

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

Get a signed (B2T) representation of a negative value of (B2U) bit patter (unsigned)

A

INVERT the B2U bit pattern and add 1

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

Going from signed to usigned

A
  1. Convert binary to two complement
  2. Invert bits
  3. Add 1
  4. Interpret that binary as unsigned
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Additive inverse

A

Value added to given number to get 0

17
Q

-2^(w-1) is its own additive inverse

18
Q

23.67 rounded to nearest