Arithmetic Flashcards

1
Q

Define Algebra

A

Any special system of notation adapted
to the study of a special system of relationship.

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

Features of Boolean Algebra

A

• Simply: AND;NOT; 0; 1

  • Distributive: a(b c) == ab ac
  • Commutative: a b == b a
  • Associative: (a b) c == a (b c)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How is an N-bit Ripple Adder Built?

A

• An N-bit ripple adder can be
assembled by cascading full-
adders.
• All combinatorial
• Individual bit delays are dif-
ferent, but total delay propor-
tional to N.
• All stages are identical (apart
from LSB).

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

How are unsigned integers represented in Boolean

A

• Stores values in [0; 2n 􀀀 1].
• e.g. The pattern 1101 represents the natural
number 20 + 22 + 23 = 1 + 4 + 8 = 13.

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

How are signed Integers represented?

A

Signed integer numbers

  • Sign magnitude
  • Two’s complement
  • One’s complement
  • Biased oset
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe Sign Magnitude

A

• Stores values in [-2n-1 - 1; 2n-1 - 1].
• The most significant bit (MSB, at n-1) represents
the sign of the integer.
• e.g. The 8-bit pattern 10001101 represents the
integer number -13.

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

Describe Two’s Complement

A

• Stores values in [-2n-1; 2n-1 - 1] (no -0).
• Value defined such that X + (-X) = 2n. This is
convenient:
- Addition: An unsigned adder is suitable.
- Negation: Complement each bit and add 1.

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

Describe One’s Complement

A

• Stores values in [-2n-1 - 1; 2n-1 - 1] (we lose one
due to -0).
• Value defined such that inverting the bit pattern
returns the negative of the original value.
• Rarely used (Some ADCs use this).

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

Describe Biased Offset

A

• Think unsigned but subtract a constant from all
values.
• Range depends on the bias (but we don’t lose one
due to 0).

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

Describe general floating-point numbers implementation?

A

• Standard form as you know it: 2:56X 104.
• Value = (-1)S X 1:F X 2E
• The exponential field E is biased such that all
legitimate numbers satisfy E >= 0.

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

What are the four binary formats?

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

Binary Formats with Width and Bias

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

What are the special values of floating-point numbers?

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

How do special values affect computation?

A

• Computation must continue under certain special
values - they propagate with certain identities (e.g.
f(NaN)=NaN, 1 + (+infinity) = +infinity)

• Denormalised numbers are susceptible to creeping
underflow: the numbers have decreasing precision
as they get smaller. These numbers are treated
specially: Value = (-1)S X 0:F.

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

What are the attributes of black box leaf-level operations?

A
  • Static attributes: size, speed
  • Dynamic attributes: power, electromagnetic
    compatibility (emc)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe NAND and AND Gates

A
  • Size is approximately proportional to fan-in.
  • AND is bigger than NAND due to extra inversion.
17
Q

What affects gate delay?

A
  • Transport delay (di erent for 1 → 0 and 0 → 1):
  • Depends on the values of other inputs:
  • Depends on gate type.
  • Depends on signal value.
  • Depends on load:

However, we normally combine all this as a single ddelay constant

18
Q

What is inertia and how does it relate to inertial delay?

A

if two events occur on an input of the component with an interval time less than the defined delay, the output will not reflect either input event,

Inertia is Indisposition to motion, exertion, or
change

19
Q

Feature of Cascading Full Adders

A
  • Size proportional to n (good)
  • Delay proportional to n (awful)
  • NB: Assuming constant delay d
20
Q

Features of Carry Lookahead Logic

A
  • Size proportional to n2 (awful)
  • Delay constant (good)
21
Q

What are the steps for floating-point addition subtraction?

A
  1. Handle NaN and +- infinity propagation.
  2. Check for zero operands (saves time).
  3. Subtract exponents such that |EA - EB| = d.
  4. Align the fractions: right-shift the fraction of the
    smaller exponent by d (you should now have two
    numbers with the same exponent, but one may not
    be in standard form).
  5. Add/Subtract the fraction components.
  6. Normalise the number (bring it into standard form,
    while adjusting the exponent parts).
  7. Rounding, as appropriate.
22
Q

Unsigned Multiplication

A

Combinatorial
• Area proportional to n2 (massive)
• Single Cycle

23
Q

Features of Booth Multiplication

A

Computes P = A X B, with P starting at zero. Method (repeat n times):
• Add P to (B or 0) depending on the LSB of A.
• Replace P with the sum.
• Right-shift P&A.
Smaller area, but n cycles.

24
Q

Features of Signed Multiplication

A

• The right-shift of P&A is arithmetic (i.e. the
left-hand bit loops around), instead of logical.
• Register A is extended one bit to the right.
• +- ALU: Extra circuit is needed.

25
Q

Steps for Floating Point Multiplication

A
  1. Handle NaN and +- infinity propagation.
  2. Check for zero operands (saves time).
  3. Evaluate product sign ().
  4. Fixed-point unsigned multiply/divide the fractions.
  5. Sum the exponents
  6. Normalise the number (bring it into standard form,
    while adjusting the exponent parts).
  7. Rounding, as appropriate.
26
Q

What is an ALU?

A

• A selectable function unit
• Usually two data inputs of equal size, with a
function-select bus. The compiler needs to
know how this bus is coded.
• ALUs typically support logical and arithmetic
operations.

27
Q
A