Presentation is loading. Please wait.

Presentation is loading. Please wait.

Number System. Popular number systems Decimal. (Base 10). The system that we humans are most familiar with. Binary. (Base 2). Octal. (Base 8). Hexadecimal.

Similar presentations


Presentation on theme: "Number System. Popular number systems Decimal. (Base 10). The system that we humans are most familiar with. Binary. (Base 2). Octal. (Base 8). Hexadecimal."— Presentation transcript:

1 Number System

2 Popular number systems Decimal. (Base 10). The system that we humans are most familiar with. Binary. (Base 2). Octal. (Base 8). Hexadecimal. (Base 16).

3 Decimal system Digits: 0 1 2 3 4 5 6 7 8 9 A positive number can be expressed as a sum of power of 10. Example, 8253 8253 = 8x10 3 + 2x10 2 + 5x10 1 + 3x10 0 = 8000 + 200 + 50 + 3 [10 0 = 1] Powers of 10 are called the place values of digit.

4 Decimal fractional numbers may also be expressed as power of 10. Example, 837.526 837.526 = 8x10 2 + 3x10 1 + 7x10 0 + 5x10 -1 + 2x10 -2 + 6x10 -3 = 800 + 30 + 7 + 0.5 + 0.02 + 0.006 Any digit to the right of decimal point can be expressed as negative power of 10.

5 Binary system Digits: 0 and 1 (total 2 bits, a bit is a short of binary digit). It’s a sequence of bits. The place values of the bits are power of 2. [0=0] [1=1] [2=10] [3=11] [4=100] [5=101] [6=110] [7=111] [8=1000] [9=1001] [10=1010] [11=1011] [12=1100] Example (binary-to-decimal), 1001 9 = 1x2 3 + 0x2 2 + 0x2 1 + 1x2 0 Example (binary-to-decimal), 101.11 5.75 = 1x2 2 + 0x2 1 + 1x2 0 + 1x2 -1 + 1x2 -2

6 Decimal to binary, (example 109.78125) First convert a) non-fractional part and then b) fractional part. a) conversion of 109: 2)109 2)54……………………..1 2)27……………………..0 2)13……………………..1 2)6……………………..1 2)3……………………..0 2)1……………………..1 0…………………..…1 Ans (a): 1101101

7 b) conversion of 0.78125: 0.78125 x 2 = 1.56250 …………..1 0.56250 x 2 = 1.1250 …………....1 0.1250 x 2 = 0.250 ……………..0 0.250 x 2 = 0.50 …..…………..0 0.50 x 2 = 1.0 ………………..1 Ans (b): 0.11001 So full answer is (a) + (b) = 1101101.11001

8 Octal system Digits: 0 1 2 3 4 5 6 7 [0=0] [1=1] [2=2] [3=3] [4=4] [5=5] [6=6] [7=7] [8=10] [9=11] [10=12] Example (octal-to-decimal), 147 103 = 1x8 2 + 4x8 1 + 7x8 0 Example (octal-to-decimal), 45.23 37.296875 = 4x8 1 + 5x8 0 + 2x8 -1 + 3x8 -2

9 Decimal to octal,, (example 37.296875) First convert a) non-fractional part and then b) fractional part. a) conversion of 37: 8)37 8)4…..…………………..5 0….…………………..4 Ans (a): 45 b) conversion of 0.296875: 0. 296875 x 8 = 2.375 …………..2 0.375 x 8 = 3.0 ………….….3 Ans (b): 0.23 So full answer is (a) + (b) = 45.23

10 Hexadecimal system Digits: 0 1 2 3 4 5 6 7 8 9 A B C D E F Here, A=10, B=11, C=12, D=13, E=14, F=15 [0=0] [1=1] [2=2] [3=3] [4=4] [5=5] [6=6] [7=7] [8=8] [9=9] [10=A] [11=B] [12=C] [13=D] [14=E] [15=F] [16=10] [17=11] Example (hexadecimal-to-decimal), 1AE 430 = 1x16 2 + 10x16 1 + 14x16 0 Example (hexadecimal-to-decimal), AB.23 171.13671875 = 10x16 1 + 11x16 0 + 2x16 -1 + 3x16 -2

11 Decimal to hexadecimal, (example 171.13671875 ) First convert a) non-fractional part and then b) fractional part. a) conversion of 171: 16)171 16)10…..………………..B 0….……………… A Ans (a): AB b) conversion of 0.13671875: 0. 13671875 x 16 = 2.1875 …………..2 0.1875 x 16 = 3.0 …..……….….3 Ans (b): 0.23 So full answer is (a) + (b) = AB.23

12 Binary Octal Example, 147 (octal) 147 001 100 111=1100111 (binary) Example, 1101010 (binary) 001101010=152 (octal)

13 Example, 27.A3C (hexadecimal) 27.A3C 0010 0111. 1010 0011 1100 = 100111.1010001111 (binary) Example, 11100.1011011011 (binary) 0001 1100. 1011 0110 1100 = 1C.B6C (hexadecimal) Binary Hexadecimal


Download ppt "Number System. Popular number systems Decimal. (Base 10). The system that we humans are most familiar with. Binary. (Base 2). Octal. (Base 8). Hexadecimal."

Similar presentations


Ads by Google