Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers.

Similar presentations


Presentation on theme: "1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers."— Presentation transcript:

1 1 Number SystemsLecture 8

2 2 BINARY (BASE 2) numbers

3 3 DECIMAL (BASE 10) numbers

4 4 Decimal (base 10) number system consists of 10 symbols or digits 0 1 2 3 4 5 6 7 8 9

5 5 Decimal The numbers are represented in Units, Tens, Hundreds, Thousands; in other words as 10 power. 191=1 x 10 2 + 9 x 10 1 + 1 x 10 0  increasing power Th.Hund.Tens.Units

6 6 Binary (base 2) number system consists of just two 0 1

7 7 Binary On the pattern of Decimal numbers one could visualize Binary Representations:  Powers 101 2 =1 x 2 2 +0 x 2 1 + 1 x 2 0 =5 10

8 8 Conversion 2240 21200 2 600 2 300 2 150 271 231 211 = 11110000 128 64 32 16 8 4 2 1 = 128 + 64 + 32 + 16 = 240 Decimal to Binary Binary to Decimal

9 9 Other popular number systems Octal –base = 8 –8 symbols (0,1,2,3,4,5,6,7) Hexadecimal –base = 16 –16 symbols (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)

10 10 Codes Octal  Power Hexadecimal 8 3 8 2 8 1 8 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 A B C D E F

11 11 Code conversions Decimal to Octal Similar to Dec-to Binary: Start dividing by 8 and build Octal figures from Remainders: 240 10 =360 8 8240 8300 8 36 03

12 12 Code conversions Binary –to-Octal 3 bits of binary could provide weight of 8 10, that is equivalent to Octal;i.e: Bits: b2b1b0 Wts:421 Bin: 111  7 10 and Octal range 0-7 Example:100111010= 100 111 010 Octal Values: 4 7 2

13 13 Octal Conversion binary:Octal: 011 010 110 2 3 2 6  326 8  256 128 64 32 16 8 4 2 1 3 x 8 2 + 2 x 8 1 + 6 x 8 0

14 14 Decimal (base 10) numbers are expressed in the positional notation 4202 = 2x10 0 + 0x10 1 + 2x10 2 + 4x10 3 The right-most is the least significant digit The left-most is the most significant digit

15 15 Decimal (base 10) numbers are expressed in the positional notation 4202 = 2x10 0 + 0x10 1 + 2x10 2 + 4x10 3 1’s multiplier 1

16 16 Decimal (base 10) numbers are expressed in the positional notation 4202 = 2x10 0 + 0x10 1 + 2x10 2 + 4x10 3 10’s multiplier 10

17 17 Decimal (base 10) numbers are expressed in the positional notation 4202 = 2x10 0 + 0x10 1 + 2x10 2 + 4x10 3 100’s multiplier 100

18 18 Decimal (base 10) numbers are expressed in the positional notation 4202 = 2x10 0 + 0x10 1 + 2x10 2 + 4x10 3 1000’s multiplier 1000

19 19 Binary (base 2) numbers are also expressed in the positional notation 10011 = 1x2 0 + 1x2 1 + 0x2 2 + 0x2 3 + 1x2 4 The right-most is the least significant digit The left-most is the most significant digit

20 20 Binary (base 2) numbers are also expressed in the positional notation 10011 = 1x2 0 + 1x2 1 + 0x2 2 + 0x2 3 + 1x2 4 1’s multiplier 1

21 21 Binary (base 2) numbers are also expressed in the positional notation 10011 = 1x2 0 + 1x2 1 + 0x2 2 + 0x2 3 + 1x2 4 2’s multiplier 2

22 22 Binary (base 2) numbers are also expressed in the positional notation 10011 = 1x2 0 + 1x2 1 + 0x2 2 + 0x2 3 + 1x2 4 4’s multiplier 4

23 23 Binary (base 2) numbers are also expressed in the positional notation 10011 = 1x2 0 + 1x2 1 + 0x2 2 + 0x2 3 + 1x2 4 8’s multiplier 8

24 24 Binary (base 2) numbers are also expressed in the positional notation 10011 = 1x2 0 + 1x2 1 + 0x2 2 + 0x2 3 + 1x2 4 16’s multiplier 16

25 25 Counting in Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36... 0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111 10000 10001 10010 10011 10100 10101 10110 10111 11000 11001 11010 11011 11100 11101 11110 11111 100000 100001 100010 100011 100100... Counting in Binary

26 26 Why binary ? Because this system is natural for digital computers The fundamental building block of a digital computer – the switch – possesses two natural states, ON & OFF. It is natural to represent those states in a number system that has only two symbols, 1 and 0, i.e. the binary number system In some ways, the decimal number system is natural to us humans. Why?

27 27 Convert 75 to Binary 752 3712 1812 902 412 202 102 01 1001011 remainder

28 28 Check 1001011=1x2 0 + 1x2 1 + 0x2 2 + 1x2 3 + 0x2 4 + 0x2 5 + 1x2 6 =1 + 2 + 0 + 8 + 0 + 0 + 64 =75

29 29 Convert 100 to Binary 1002 5002 2502 1212 602 302 112 01 1100100 remainder

30 30 That finishes the - introduction to binary numbers and their conversion to and from decimal numbers


Download ppt "1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers."

Similar presentations


Ads by Google