2.2 Integer Representation Flashcards

1
Q

Bit to Unsigned formula

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

Bit to two-complement equation

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

Equation for TMin

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

Equation for TMax

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

Two-complement to unsigned formula

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

Unsigned to two-complement equation

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

Range for T2U operation

A

TMin ≤ x ≤ Tmax

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

Range for U2T

A

0 ≤ u ≤ UMax

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

What happens when an operation in C is performed where one operand is signed and the other is unsigned

A

C implicitly casts the signed argument to unsigned and performs the operations assuming the numbers are nonnegative

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

Implicit casting

A

When an expression of one type is assigned to a variable of another

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

Explicit casting

A

Using the type between brackets
tx = (int) ux;

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

What is truncating

A

Reducing the number of bits representing a number

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

Rule for truncation of two-complement number

A

The most significant bit is converted to a sign bit

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