HW 4 Flashcards

(5 cards)

1
Q

Explain the procedure for adding two numbers in 1’s complement form.

A
  1. Add the two binary numbers bit by bit.
  2. If there’s a carry out from the most significant bit (MSB), add this carry back to the least significant bit (LSB) — called end-around carry.
  3. If no carry, result is the sum.
  4. Check sign:

If result is all zeros, it’s zero.

Otherwise, result is in 1’s complement form.

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

How do you identify an overflow condition when you add two numbers in 1’s complement form? Provide an example for this.

A

Identification:
Overflow occurs if adding two numbers with the same sign produces a result with a different sign.

Example:
Add +3 (0011) and +4 (0100) in 4-bit 1’s complement:
Answer: -6, Overflow (sign changed from + to - )

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

What does BCD stand for?

A

Binary Coded Decimal

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

Explain at least two important disadvantages of storing numbers in BCD format.

A
  1. Inefficient Storage:
    BCD uses 4 bits to store each decimal digit (0–9), wasting space since 4 bits can represent 16 values (0–15), but only 10 are used.
  2. Slower Processing:
    Arithmetic operations (like addition and subtraction) are more complex and slower compared to pure binary, requiring extra correction steps.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Offer one advantage for using a BCD format for storing numbers.

A

Easy Decimal Conversion:
BCD makes it simple to convert between binary and decimal, making it ideal for financial and digital display systems (e.g., calculators, digital clocks).

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