Professional Documents
Culture Documents
03
Chapter 3 - Understanding Data Your Text Here
You can simply im-
press your audience
3.2- Binary Arithmetic and Conversions and add a unique
zing.
04 05 06
Your Text Here Your Text Here
You can simply im- You can simply im-
press your audience press your audience
and add a unique and add a unique
zing. zing.
Chapter 1 Topics
1 Number Systems
1.1: Understand the different representations of number systems
02
1.2: Convert a number system to any other number system
03
10101 = ?
2’s Complement
2’s Complement (ex)
2’s Complement (exe)
10101 = ?
Binary Arithmetic -Addition
Rules
Binary Arithmetic –Addition (ex)
Binary Arithmetic –Addition (exe)
1101 + 1011 = ?
1 1 1
1101 + 13 +
1011 11
----------- -----------
11000 24
Binary Arithmetic –Addition (exe)
1101 + 1111 = ?
13
15
-----------
28
Binary Arithmetic - Subtraction
Rules
Binary Arithmetic – Subtraction (ex)
Ex1. Ex2.
Binary Arithmetic – Subtraction (exe)
110 – 101 = ?
Binary Subtraction using 1’s Complements
(X)2 – (Y) 2 = (?) 2
Steps:
1- Find the 1’s complement of (Y) (subtrahend) (change 1 to 0 & 0 to 1)
2- Add (X) (minuend) to the result of step 1 (i.e., to the 1’s complement of Y)
3- If there is a carry, add it to the LSD of the sum. (this will be the result)
3- If there is NO carry, take the 1’s complement of the sum and assign nega-
tive(-) sign to the answer ( this will be the result)
Binary Subtraction using 1’s Complements
Case-1: with carry Case-2: no carry
58 43 15 38 49 -11
(111010)2 – (101011) 2 = (?)
1111
2 2 (100110)2 – (110001) 2 = (?)
- 1011 2
2
Steps:
1- Find the 2’s complement of (Y) (subtrahend) (change 1 to 0 & 0 to 1 then add 1)
2- Add (X) (minuend) to the result of step 1 (i.e., to the 2’s complement of Y)
3- If there is a carry, discard the carry. (the remaining will be the result)(Positive)
3- If there is NO carry, take the 2’s complement of the sum and assign negative (-)
sign to the answer ( this will be the result) (Negative)
Binary Subtraction using 2’s Complements
Case-2: no carry
Case-1: with carry (1000)2 – (1101) 2 = (?)
- 101
2 2
(1111)2 – (1001) 2 = (?)
1102 2
Step-1 11012
Step-1 10012 0010 2 1’s complement