Fundamentals of Programming
Lecture 2 Hamed Rasifard
Fundamentals of Programming Lecture 2 Hamed Rasifard Outline - - PowerPoint PPT Presentation
Fundamentals of Programming Lecture 2 Hamed Rasifard Outline Numerical Systems Converting Numbers Summation and Subtraction of Binary Numbers Numerical Systems Binary (base 2) Octal (base 8) Decimal (Base 10)
Lecture 2 Hamed Rasifard
Binary Octal Decimal Hexadecimal
1 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 9 9 A B C D E F
Binary: 101, 1100, 1001, 10011 Decimal: 101, 676, 245, 1470 Octal: 101, 345, 777 Hexadecimal:101, 234, 547E, A45CF
Mention base: (101)2, (101)10, (345)8
(101011)2 (53)8
(101011)2 (2B)16
(653)8 (110101011)2
(FAD5)16 (1111101011010101)2
(1*100 + 0*10 + 1*1)2=(1*22 + 0*21 + 1*20)10 (1*100 + 0*10 + 1*1)8=(1*82 + 0*81 + 1*80)10 (1*100 + 0*10 + 1*1)16=(1*162 + 0*161 + 1*160)10