Chapter 1.3, 1.4
Chapter 1.3, 1.4
3
Addition of
binary number
Addition of binary number
Explanation
1
0+0=0 9
0+9=9 +1
9+0=9
10
9 + 1 = 10
Addition of binary number
Explanation
1 1
6+9 = 15 (>9)
56
1+5+7 = 13 (>9)
+79
1 35
Addition of binary number
Explanation
0+0=0
0+1=1
1+0=1
1 + 1 = 10
Addition of binary number
Explanation
1 1 1
00100111
+01001010
0 1110 001
Addition of binary number
DIY
Perform
01111110 + 00111110
Addition of binary number
Explanation
The bit lost is called the most significant bit, and when it is shifted
beyond the furthest-column the binary data that is stored loses
precision due to overflow.
BINARY SHIFTING WITH 8-BIT BINARY NUMBERS
Represent negative
Multiplication
number in binary
and division of
binary numbers
TWO COMPLEMENTS
0 = POSITIVE
1 = NEGATIVE
CONVERT POSITIVE BINARY INTEGER TO A TWO'S COMPLEMENT 8-
BIT INTEGER
Examples:13
Step 1: Convert 13 into binary.
1101 in binary
Step 2: Put the number into the place value column
-128 64 32 16 8 4 2 1
0 0 0 0 1 1 0 1
Examples:19
Step 1: Convert 19 into binary.
10011 in binary
Step 2: Put the number into the place value column
-128 64 32 16 8 4 2 1
0 0 0 1 0 0 1 1
Step 3: Ensure that the the leftmost bit is 0 (+).
Answer: 00010011
CONVERT TWO'S COMPLEMENT 8-BIT INTEGER TO A POSITIVE BINARY INTEGER
Examples: 10010011
Step 1: Put the number into the place value column
-128 64 32 16 8 4 2 1
1 0 0 1 0 0 1 1
Step 2: The left-most bit is 1, this means that it is a negative
number.
Step 3: Compute the denary value as usual.
(1x -128) + (1x16) + (1x2) + (1x1)
= -128 + 16 + 2 + 1
= -109
DI
Y
Examples: 10110011
Step 1: Put the number into the place value column
-128 64 32 16 8 4 2 1
1 0 1 1 0 0 1 1
Step 2: The left-most bit is 1, this means that it is a negative
number.
Step 3: Compute the denary value as usual.
(1x -128) (1x32)+ (1x16) + (1x2) + (1x1)
= -128 + 32 + 16 + 2 + 1
= -77
CONVERTING NEGATIVE DENARY NUMBERS INTO BINARY NUMBERS IN TWO’S COMPLEMENT FORMAT
Examples: -67
Step 1: Convert the number to positive.
67
Step 2: Write the number in binary form (8 bits).
01000011
Step 3: Invert each binary value.
10111100
Step 4: Add 1 to the binary number.
10111100
+ 1
10111101
Step 5: This gives us -67.
-128 64 32 16 8 4 2 1
1 0 1 1 1 1 0 1
-128 + 32 + 16 + 8 + 4 + 1 = -67
DI
Y
Examples: -65
Step 1: Convert the number to positive.
65
Step 2: Write the number in binary form (8 bits).
01000001
Step 3: Invert each binary value.
10111110
Step 4: Add 1 to the binary number.
10111110
+ 1
10111111
65 Convert to (+)
1 +1