Professional Documents
Culture Documents
Interfacing
ES C 263
Number systems
Structure
• Number systems
• Decimal
• Binary
• Hexa Decimal
• Operations
• BCD Codes
Number Systems
Decimal (0,1,2,3,4,5,6,7,8,9)
Octal (0,1,2,3,4,5,6,7)
Hexadecimal (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)
Binary (0,1)
“A number anan-1a2a1a0a-1a-m expressed in base-r
system, has coefficients multiplied by powers of r “
an.rn+an-1.rn-1+………….+a2.r2+a1.r1+a0.r0+a-1.r-1+a-
2.r -2
+……a -m.r- m
Convert to decimal
(4021.2)5=4 X 53 + 0 X 52 + 2 X 51 + 1 X 50 + 2 X 51 = (511.4)10
(10 110 001 101 011 . 111 100 000 110)2 = (26153.7460)8
153
19 1
2 3
0 2
Ans=(231)8
Decimal to hexadecimal
Convert (227)10 to Integer Reminder
Hexadecimal
227
14 3
0 E
Ans=0xE3H
Decimal fractions to octal
0.513 X 8= 4.104
0.104 X 8= 0.832
0.832 X 8= 6.656
4 0 6 5 1 7
(0.513)10= (0.406517..)8
Complements
Add 1 11111001
Signed binary numbers
Get the magnitude of -7
Add 1 00000111
Range of numbers in sign
magnitude
7A 0111 1010 7 A
3F 0011 1111 3 F
Load
Drive
Shaft
encoder
Shaft encoder
Shaft Encoder
Alphanumeric Code
ASCII – American Standard Code for
Information Interchange: