Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 3110: Introduction to Digital Systems

Similar presentations


Presentation on theme: "ECE 3110: Introduction to Digital Systems"— Presentation transcript:

1 ECE 3110: Introduction to Digital Systems
Number Systems: unsigned numbers addition/subtraction

2 Previous class Summary
Conversions: Binary, Oct, Hex Any number <---->Decimal

3 Binary Addition, Subtraction (single digit)
The rules for binary addition are: The rules for binary subtraction are: 0 + 0 = 0, carry = 0 0 - 0 = 0, borrow = 0 1 + 0 = 1, carry = 0 1 - 0 = 1, borrow = 0 0 + 1 = 1, carry = 0 0 - 1 = 1, borrow = 1 1 + 1 = 0, carry = 1 1 - 1 = 0, borrow = 0 Multiple digits: Borrows, Carries from digits to left of current of digit. Binary subtraction, addition works just the same as decimal addition, subtraction.

4 Binary Addition, Subtraction (multiple digits)
cin or bin X Y Cout s Bout d 1

5 Binary, Decimal addition
From LSB to MSB: 1+1 = 0, carry of 1 1 (carry)+1+0 = 0, carry of 1 1 (carry) = 1, no carry = = = 1 answer = 34 from LSD to MSD: 7+4 = 1; with carry out of 1 to next column 1 (carry) = 5. answer = 51.

6 Subtraction Binary Decimal 900 1002
= 9; with borrow of 1 from next column 0 -1 (borrow) - 0 = 9, with borrow of (borrow) - 0 = 8. Answer = 899. 1002 = 1; with borrow of 1 from next column 0 -1 (borrow) - 0 = 1, with borrow of (borrow) - 0 = 0. Answer = 0112.

7 Octal/Hex addition/subtraction
Rarely Convert to decimal-->calculate results-->convert back. Column addition/subtraction (example pp34)

8 Next… Signed numbers


Download ppt "ECE 3110: Introduction to Digital Systems"

Similar presentations


Ads by Google