1 Number SystemsLecture 8
2 BINARY (BASE 2) numbers
3 DECIMAL (BASE 10) numbers
4 Decimal (base 10) number system consists of 10 symbols or digits
5 Decimal The numbers are represented in Units, Tens, Hundreds, Thousands; in other words as 10 power. 191=1 x x x 10 0 increasing power Th.Hund.Tens.Units
6 Binary (base 2) number system consists of just two 0 1
7 Binary On the pattern of Decimal numbers one could visualize Binary Representations: Powers =1 x x x 2 0 =5 10
8 Conversion = = = 240 Decimal to Binary Binary to Decimal
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 Codes Octal Power Hexadecimal A B C D E F
11 Code conversions Decimal to Octal Similar to Dec-to Binary: Start dividing by 8 and build Octal figures from Remainders: =
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: = Octal Values: 4 7 2
13 Octal Conversion binary:Octal: x x x 8 0
14 Decimal (base 10) numbers are expressed in the positional notation 4202 = 2x x x x10 3 The right-most is the least significant digit The left-most is the most significant digit
15 Decimal (base 10) numbers are expressed in the positional notation 4202 = 2x x x x10 3 1’s multiplier 1
16 Decimal (base 10) numbers are expressed in the positional notation 4202 = 2x x x x ’s multiplier 10
17 Decimal (base 10) numbers are expressed in the positional notation 4202 = 2x x x x ’s multiplier 100
18 Decimal (base 10) numbers are expressed in the positional notation 4202 = 2x x x x ’s multiplier 1000
19 Binary (base 2) numbers are also expressed in the positional notation = 1x x x x x2 4 The right-most is the least significant digit The left-most is the most significant digit
20 Binary (base 2) numbers are also expressed in the positional notation = 1x x x x x2 4 1’s multiplier 1
21 Binary (base 2) numbers are also expressed in the positional notation = 1x x x x x2 4 2’s multiplier 2
22 Binary (base 2) numbers are also expressed in the positional notation = 1x x x x x2 4 4’s multiplier 4
23 Binary (base 2) numbers are also expressed in the positional notation = 1x x x x x2 4 8’s multiplier 8
24 Binary (base 2) numbers are also expressed in the positional notation = 1x x x x x2 4 16’s multiplier 16
25 Counting in Decimal Counting in Binary
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 Convert 75 to Binary remainder
28 Check =1x x x x x x x2 6 = =75
29 Convert 100 to Binary remainder
30 That finishes the - introduction to binary numbers and their conversion to and from decimal numbers