100 likes | 175 Views
Computer Science. Learn. Apply. H. Mundo. Objectives. In this lesson you will learn: How to add binary numbers How to add hexadecimal numbers Subtraction will not be covered. 0 + 0. 1 + 0. 0 + 1. 1 + 1. Simple addition rule. 0. 1. 1. 1 0.
E N D
Computer Science Learn. Apply. H. Mundo
Objectives • In this lesson you will learn: • How to add binary numbers • How to add hexadecimal numbers • Subtraction will not be covered
0 + 0 1 + 0 0 + 1 1 + 1 Simple addition rule 0 1 1 1 0 The following additions do not include any carry over values
1 + 1 Binary Addition Example 1 1 1 1 0 1 0 1 + 1 1 1 1 0 21 +30 51 1 1 0 0 1 1 1 1 + 1 11 1 0 The following addition involves carry over values
1 + 1 Binary Addition Example 2 1 1 1 1 0 1 1 1 + 1 1 1 1 0 23 +30 53 1 1 0 1 0 1 1 1 + 1 11 1 0 The following addition involves carry over values
1 + 1 Binary Addition Example 3 1 1 1 1 0 1 1 1 + 1 1 1 1 0 21 +30 51 1 1 0 1 0 1 1 1 + 1 11 1 0 The following addition involves carry over values
1 + 1 Binary Addition Example 4 1 1 1 1 0 1 0 1 + 1 1 1 21 + 7 NOTE: digits should be line up right to left. The following alignment is wrong 28 1 1 1 0 0 1 0 1 0 1 +1 1 1 1 1 + 1 11 1 0 The following addition involves carry over values
Objectives • In this lesson you will learn: • How to add binary numbers • How to add hexadecimal numbers
Adding Hexa #s Example 1 1 1 1 9+4= 13 (13 = D no carry) A+9 = 19 (19 – 16 = 3 carry a 1) 1+5+6 = 12 (12= C no carry ) 1 E 9 C 3 D C+D = 25 (25 – 16 = 9 carry a 1) 1+F+E = 30 (30 – 16 = 14 14 is Ecarry a 1) Final result
Adding Hexa #s Example 2 1 1 1 10+12= 22 (22 - 16 = 6 carry a 1) 1+1+9 = 11 (11=B no carry) 5+A = 15 (15= F no carry ) 1 0 5 F B 6 C+9 = 21 (21 – 16 = 5 carry a 1) 1+F = 16 (16 – 16 = 0 carry a 1) Final result