Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conversion between number systems Base 10 Decimal Our ordinal number system; a decimal number provides us a more accurate perception about its quantity.

Similar presentations


Presentation on theme: "Conversion between number systems Base 10 Decimal Our ordinal number system; a decimal number provides us a more accurate perception about its quantity."— Presentation transcript:

1 Conversion between number systems Base 10 Decimal Our ordinal number system; a decimal number provides us a more accurate perception about its quantity. Base 2 Binary The way computers handle numbers. Base 8 Octal An easy way for us to memorize or say a binary string. Base 16 Hexadecimal A much easier way for us to memorize or say a binary string.

2 Weight 3784 Remainder 4 8 7 0 3 Decimal Number: 3784 Least Significant digit Most Significant digit

3 weight2727 2626 2525 2424 23232 2121 2020 11001001 11001001 2 = 1  2 7 + 1  2 6 + 1  2 3 + 1  2 0 = 201 Remainder 201  2 =1  2 6 + 1  2 5 + 1  2 2 = 100 1 100  2 =1  2 5 + 1  2 4 + 1  2 1 = 50 0 50  2 =1  2 4 + 1  2 3 + 1  2 0 = 25 0 25  2 =1  2 3 + 1  2 2 = 12 1 12  2 =1  2 2 + 1  2 1 = 6 0 6  2 =1  2 1 + 1  2 0 = 3 0 3  2 =1  2 0 = 1 1 1  2 = 01 Binary number : 11001001 2 Least Significant bit Most Significant bit

4 weight3737 3636 3535 34343 3232 3131 3030 11001001 11001001 3 = 1  3 7 + 1  3 6 + 1  3 3 + 1  3 0 = 2944 Remainder 2944  3 =1  3 6 + 1  3 5 + 1  3 2 = 981 1 981  3 =1  3 5 + 1  3 4 + 1  3 1 = 327 0 327  3 =1  3 4 + 1  3 3 + 1  3 0 = 109 0 109  3 =1  3 3 + 1  3 2 = 36 1 36  3 =1  3 2 + 1  3 1 = 12 0 12  3 =1  3 1 + 1  3 0 = 4 0 4  3 =1  3 0 = 1 1 1  3 = 01 Trinary number : 11001001 3

5 weight16 2 16 1 16 0 FA9 FA9 H = 15  16 2 + 10  16 1 + 9  16 0 = 4009 Remainder 4009  16 =15  16 1 + 10  16 0 = 250 9 250  16 =15  16 0 = 15 10 15  16 = 015 Hexadecimal number : FA9 H HexDec 00 11 22 33 44 55 66 77 88 99 A10 B11 C12 D13 E14 F15

6 Conversion between Hexadecimal, Octal, and Binary Numbers BinaryOctal 0000 0011 0102 0113 1004 1015 1106 1117 BinaryHex 00000 00011 00102 00113 01004 01015 01106 01117 10008 10019 1010A 1011B 1100C 1101D 1110E 1111F

7 Binary  Octal weight 2828 2727 2626 2525 2424 23232 2121 2020 101001011 = 1  2 8 + 0  2 7 + 1  2 6 + 0  2 5 + 0  2 4 + 1  2 3 + 0  2 2 + 1  2 1 + 1  2 0 = (1  2 2 + 0  2 1 + 1  2 0 )  2 6 + (0  2 2 + 0  2 1 + 1  2 0 )  2 3 + (0  2 2 + 1  2 1 + 1  2 0 )  1 = (1  2 2 + 0  2 1 + 1  2 0 )  (2 3 ) 2 + (0  2 2 + 0  2 1 + 1  2 0 )  (2 3 ) 1 + (0  2 2 + 1  2 1 + 1  2 0 )  (2 3 ) 0 = 5  8 2 + 1  8 1 + 3  8 0 = 513 8

8 Binary  Octal (shortcut) 111110101001 7651 Least Significant bit 10110010101001 2 = 26251 o 010110010101001 26251 Least Significant bit 111110101001 2 = 7651 o

9 Binary  Hexadecimal weight 2 11 2 10 2929 2828 2727 2626 2525 2424 23232 2121 2020 000101001011 = 0  2 11 + 0  2 10 + 0  2 9 + 1  2 8 + 0  2 7 + 1  2 6 + 0  2 5 + 0  2 4 + 1  2 3 + 0  2 2 + 1  2 1 + 1  2 0 = 14B H = (0  2 3 + 0  2 2 + 0  2 1 + 1  2 0 )  (2 4 ) 2 + (0  2 3 + 1  2 2 + 0  2 1 + 0  2 0 )  2 4 + (1  2 3 + 0  2 2 + 1  2 1 + 1  2 0 )  1 = 1  (16) 2 + 4  16 + 11  16 0

10 Binary  Hexadecimal (shortcut) 111110101001 FA9 Least Significant bit 10110010101001 2 = 2CA9 H 0010110010101001 2CA9 Least Significant bit 111110101001 2 = FA9 H

11 Adder (half adder) 1 +)1 1 0 1 0 1 0 1 1 0 0 0 A B c S ABcS 0000 0101 1001 1110 A B S c Adder

12 Logical Gates for an Adder (half adder) A +)B c S ABcS 0000 0101 1001 1110 AND OR AND NOT B A S c 1 1 0 11111111 1111 1 0 Half-Adder 0 1

13 Binary Addition 011111100011100 1111 0000 1010 1010 1010 0101 1111 1111 1010 0101 0000 1010 0101 1111 1010 0000 1100001011100010 1 +) carry

14 Full Adder CiCi A +)B CoCo S CiCi ABCoCo S 00000 00101 01001 01110 10001 10110 11010 11111 A B S Co Full Adder Ci

15 Logical Gates for a Full-Adder CiCi A +)B CoCo S CiCi ABCoCo S 00000 00101 01001 01110 10001 10110 11010 11111 A B S Co Ci A full-adder can be constructed from half-adders. half- adder half- adder OR 01100110 1 S 1010 c S c 0 1 01110111 1 0 A Full Adder 1

16 4 bits Adder Full Adder Full Adder Full Adder Full Adder A B0 110 1 010 1011 0 010 0 1 0 0 1011 +)0010 1101

17 Logical Gates and Clock AND OR AND NOT B A S c 0 11111111 1111 0101 Half-Adder 0 1 400 MHz 4  10 8 /sec 0

18 Full-Adder and Clock A B S Co Ci half- adder half- adder OR c s c s 1 3 3 1 1 For a 16 bits adder: 16  7+2=114 4  10 8  114  3.5  10 6

19 Leopold Kronecker (1823-1891) “God created the integers, all else is the work of man. “ Image from http://www-groups.dcs.st-and.ac.uk/http://www-groups.dcs.st-and.ac.uk/ ~history/Mathematicians/Kronecker.html

20 Adder, that’s enough! Full Adder Full Adder Full Adder Full Adder A B0 110 1 010 1011 0 010 01 0 0 XXXXX Created full-adders, all else is the work of programmers


Download ppt "Conversion between number systems Base 10 Decimal Our ordinal number system; a decimal number provides us a more accurate perception about its quantity."

Similar presentations


Ads by Google