Integer representation and arithmetic pt2 Flashcards

1
Q

How does binary addition work (carrying and result)

A
  • Add from least to most significant
  • If 1 + 1 => carry 1 val 0
  • If 1 + 1 + 1 (carry) => carry 1 val 1
  • Carry is 1 larger than length
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the psuedo-code for addition in any base (digit by digit, low to high sig)

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

What is a Full-Adder and its truth table

A
  • Adds two single bits together
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does a full-adder work in circuit

A
  • Each full-adder is responsible for each bit (low to high signficance)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What two cases can binary addition fail

A
  1. The inputs are unsigned and there is a carry-out (larger than max val)
  2. The inputs are signed but the sign of the result makes no sense (eg: 1000 0011 + 1000 0001 = 0000 0100, sign switch)

This problems can be detected and signaled to fix

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