Arithmetic Flashcards
Define Algebra
Any special system of notation adapted
to the study of a special system of relationship.
Features of Boolean Algebra
• Simply: AND;NOT; 0; 1
- Distributive: a(b c) == ab ac
- Commutative: a b == b a
- Associative: (a b) c == a (b c)
How is an N-bit Ripple Adder Built?
• 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 are unsigned integers represented in Boolean
• Stores values in [0; 2n 1].
• e.g. The pattern 1101 represents the natural
number 20 + 22 + 23 = 1 + 4 + 8 = 13.
How are signed Integers represented?
Signed integer numbers
- Sign magnitude
- Two’s complement
- One’s complement
- Biased oset
Describe Sign Magnitude
• 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.
Describe Two’s Complement
• 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.
Describe One’s Complement
• 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).
Describe Biased Offset
• Think unsigned but subtract a constant from all
values.
• Range depends on the bias (but we don’t lose one
due to 0).
Describe general floating-point numbers implementation?
• 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.
What are the four binary formats?
Binary Formats with Width and Bias
What are the special values of floating-point numbers?
How do special values affect computation?
• 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.
What are the attributes of black box leaf-level operations?
- Static attributes: size, speed
- Dynamic attributes: power, electromagnetic
compatibility (emc)