Number Systems
Table: - Various number systems and their bases
S. No | Name of Number System | Base/Radix |
1. | Binary | 2 |
2. | Octal | 8 |
3. | Decimal | 10 |
4. | Hexadecimal | 16 |
Table: - number systems
S. No | Name of Number System | Base/Radix | First Digit | Last Digit | All Digits/ Characters |
1. | Binary | 2 | 0 | 1 | 0,1 |
2. | Octal | 8 | 0 | 7 | 0,1,2,3,4,5,6,7 |
3. | Decimal | 10 | 0 | 9 | 0,1,2,3,4,5,6,7,8,9 |
4. | Hexadecimal | 16 | 0 | F | 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F |
Table: - Number Formats
S. No | Name | Size (bits) | Example |
1. | Bit | 1 | 1 |
2. | Nibble | 4 | 1010 |
3. | Byte | 8 | 1000 1100 |
4. | Word | 16 | 1010 1010 1010 1010 |
5. | Double Word | 32 | 1100 1100 1100 1100 1100 1100 1100 1100 |
Table: - Decimal, Binary, Octal and Hexadecimal Number
S. No | Decimal | Binary | Octal | Hexadecimal |
1. | 0 | 0000 | 0 | 0 |
2. | 1 | 0001 | 1 | 1 |
3. | 2 | 0010 | 2 | 2 |
4. | 3 | 0011 | 3 | 3 |
5. | 4 | 0100 | 4 | 4 |
6. | 5 | 0101 | 5 | 5 |
7. | 6 | 0110 | 6 | 6 |
8. | 7 | 0111 | 7 | 7 |
9. | 8 | 1000 | 10 | 8 |
10. | 9 | 1001 | 11 | 9 |
11. | 10 | 1010 | 12 | A |
12. | 11 | 1011 | 13 | B |
13. | 12 | 1100 | 14 | C |
14. | 13 | 1101 | 15 | D |
15. | 14 | 1110 | 16 | E |
16. | 15 | 1111 | 17 | F |
17. | 16 | 0001 0000 | 20 | 10 |
18. | 17 | 0001 0001 | 21 | 11 |
19. | 18 | 0001 0010 | 22 | 12 |
20. | 19 | 0001 0011 | 23 | 13 |
21 | 20 | 0001 0100 | 24 | 14 |
Base Conversions
· Binary to Decimal
(1110.01)2= (?)10
= 1×23 + 1x22 + 1×21+ 0x20 + 0x2-1 + 1×2-2
= 1× 8+1×4+1×2+0×1+0×0.5+1×0.25
= 8+4+2+0+0.5+0.25 = 14.25
(1110.01)2 = (14.25)10
- Octal to Decimal
(4057.06)8= (?)10
=4 x 83 + 0 x 82 +5 x 81 + 7 x 80 +0×8-1+6 x 8-2
= 4×512+0×64+5×8+7×1+0×0.125+6×0.015625
= 2048+0+40+7+0+0.0937
= (2095.0937)10
(4057.06)8 = (2095.0937)10
- Hexadecimal to Decimal
(A0F9.0EB) 16= (?)10
= A x 163 + 0 x 162 +F x 161 + 9 x 160 +0×16-1+E x 16-2 +B x 16-3
= 10 x 163 + 0 x 162 +15 x 161 + 9 x 160 +0×16-1+14 x 16-2 +11 x 16-3
= 10 x 4096 + 0x 256 +15x 16 + 9x 1 +0×0.0625+14 x0.00390625 +11x0.000244140625
= 40960+0+240+9+0+0.0546+0.0026
= (41209.0572)10
(A0F9.0EB) 16= (41209.0572)10
Note MSB = Most significant bit & LSB = Least significant bit
· Decimal to Binary
(52)10= (?)2
2 | 52 | 0 LSB |
2 | 26 | 0 |
2 | 13 | 1 |
2 | 6 | 0 |
2 | 3 | 1 |
1 | 1 MSB |
(52)10= (110100)2
· Decimal to Binary
(105.75)10= (?)2
2 | 105 | 1 L SB |
2 | 52 | 0 |
2 | 26 | 0 |
2 | 13 | 1 |
2 | 6 | 0 |
2 | 3 | 1 |
1 | 1 MSB |
Given Fraction 0.75
Multiply 0.75 by 2 1.50 MSB
Multiply 0.50 by 2 1 LSB
(105.75)10= (1101001.11)2
· Decimal to Octal
(5497.93)10= (?)8
8 | 5497 | 1 L.SB |
8 | 687 | 7 |
8 | 85 | 5 |
8 | 10 | 2 |
1 | 1 M.S.B |
Given Fraction 0.93
Multiply 0.93 by 8 7.44 MSB
Multiply 0.44 by 8 3.52
Multiply 0.52 by 8 4.16
Multiply 0.16 by 8 1.28
Multiply 0.28 by 8 2.24
Multiply 0.24 by 8 1.92
Multiply 0.92 by 8 7.36
Multiply 0.36 by 8 2.88 L.SB
(5497.93)10= (12571.73412172)8
· Decimal to Hexadecimal
(3481.55)10= (?)16
16 | 3481 | 9 LSB |
16 | 217 | 9 |
13 | 13 MSB |
Given Fraction 0.55
Multiply 0.55 by 16 8.8 MSB
Multiply 0.8 by 16 12.8 LSB
Where 13= D & 12=C
(3481.55)10= (D99.8C)16
· Binary to Octal
(1110.01)2= (?)8
= 1×23 + 1x22 + 1×21+ 0x20 + 0x2-1 + 1×2-2
= 1× 8+1×4+1×2+0×1+0×0.5+1×0.25
= 8+4+2+0+0.5+0.25 = 14.25
(1110.01)2 = (14.25)10
8 | 14 | 6 L.SB |
1 | 1 M.S.B |
Given Fraction 0.25
Multiply 0.25 by 8 0.08 MSB
Multiply 0.08 by 8 0.64
Multiply 0.64 by 8 5.12
Multiply 0.12 by 8 0.96
Multiply 0.96 by 8 7.68
Multiply 0.68 by 8 5.44
Multiply 0.44 by 8 3.52
Multiply 0.52 by 8 4.16 L.SB
(1110.01)2= (61.00507534)8
· Binary to Hexadecimal
(11110.01)2= (?)16
=1×24 + 1×23 + 1x22 + 1×21+ 0x20 + 0x2-1 + 1×2-2
= 1× 16+1× 8+1×4+1×2+0×1+0×0.5+1×0.25
= 16+8+4+2+0+0.5+0.25 = 30.25
(11110.01)2 = (30.25)10
16 | 30 | 14 LSB |
1 | 1 MSB | |
Given Fraction 0.25
Multiply 0.25 by 16 4.00 MSB
Where 13= D, 14= E & 12=C
(11110.01)2= (1E.4)16
· Octal to Binary
(4057.06)8= (?)2
=4 x 83 + 0 x 82 +5 x 81 + 7 x 80 +0×8-1+6 x 8-2
= 4×512+0×64+5×8+7×1+0×0.125+6×0.015625
= 2048+0+40+7+0+0.0937
= (2095.0937)10
(4057.06)8 = (2095.0937)10
2 | 2095 | 1 L SB |
2 | 52 | 0 |
2 | 26 | 0 |
2 | 13 | 1 |
2 | 6 | 0 |
2 | 3 | 1 |
1 | 1 MSB |
Given Fraction 0.75
Multiply 0.75 by 2 1.50 MSB
Multiply 0.50 by 2 1 LSB
(105.75)10= (1101001.11)2
· Octal to Hexadeximal
(4057.06)8= (?)16
=4 x 83 + 0 x 82 +5 x 81 + 7 x 80 +0×8-1+6 x 8-2
= 4×512+0×64+5×8+7×1+0×0.125+6×0.015625
= 2048+0+40+7+0+0.0937
= (2095.0937)10
(4057.06)8 = (2095.0937)10
16 | 2095 | 15 LSB |
16 | 130 | 2 |
8 | 8 MSB |
Given Fraction 0.0937
Multiply 0.0937 by 16 1.499 MSB
Multiply 0.499 by 16 7.98
Multiply 0.98 by 16 15.68
Multiply 0.68 by 16 10.88
Multiply 0.88 by 16 14.08
Multiply 0.08 by 16 1.28 LSB
Where 10=A, 15=F, 14=E, 13= D & 12=C
(4057.06)8 = (F28.17FAE1)16
· Hexadecimal to Binary
(A0F9.0EB) 16 = (?)2
= A x 163 + 0 x 162 +F x 161 + 9 x 160 +0×16-1+E x 16-2 +B x 16-3
= 10 x 163 + 0 x 162 +15 x 161 + 9 x 160 +0×16-1+14 x 16-2 +11 x 16-3
= 10 x 4096 + 0x 256 +15x 16 + 9x 1 +0×0.0625+14 x0.00390625 +11x0.000244140625
= 40960+0+240+9+0+0.0546+0.0026
= (41209.0572)10
(A0F9.0EB) 16= (41209.0572)10
2 | 41209 | 1 LSB |
2 | 20604 | 0 |
2 | 10302 | 0 |
2 | 5151 | 1 |
2 | 2575 | 1 |
2 | 1287 | 1 |
2 | 643 | 1 |
2 | 321 | 1 |
2 | 160 | 0 |
2 | 80 | 0 |
2 | 40 | 0 |
2 | 20 | 0 |
2 | 10 | 0 |
2 | 5 | 1 |
2 | 2 | 0 |
1 | 1 MSB |
Given Fraction 0.0572
Multiply 0.0575 by 2 0.1144 MSB
Multiply 0.1144 by 2 0.2288
Multiply 0.2288 by 2 0.4576
Multiply 0.4576 by 2 0.9152
Multiply 0.9152 by 2 1.83
Multiply 0.83 by 2 1.66
Multiply 0.66 by 2 1.32 LSB
(A0F9.0EB) 16= (101000011111001.0000111)2
· Hexadecimal to Octal
(A0F9.0EB) 16 = (?)8
= A x 163 + 0 x 162 +F x 161 + 9 x 160 +0×16-1+E x 16-2 +B x 16-3
= 10 x 163 + 0 x 162 +15 x 161 + 9 x 160 +0×16-1+14 x 16-2 +11 x 16-3
= 10 x 4096 + 0x 256 +15x 16 + 9x 1 +0×0.0625+14 x0.00390625 +11x0.000244140625
= 40960+0+240+9+0+0.0546+0.0026
= (41209.0572)10
(A0F9.0EB) 16= (41209.0572)10
8 | 41209 | 1 L.SB |
8 | 5151 | 7 |
8 | 643 | 3 |
8 | 80 | 0 |
8 | 10 | 2 |
1 | 1 M.S.B |
Given Fraction 0.0572
Multiply 0.0572 by 8 0.4576 MSB
Multiply 0.4576 by 8 3.66
Multiply 0.66 by 8 5.28
Multiply 0.28 by 8 2.24
Multiply 0.24 by 8 1.92
Multiply 0.92 by 8 7.36
Multiply 0.36 by 8 2.88
Multiply 0.88 by 8 7.04 L.SB
(A0F9.0EB) 16= (120371.03521721)8
S. No | Decimal Number | Signed Binary | 1’s Complement | 2’s Complement | |
1. | +7 | 0111 | 0111 | 0111 | Positive number in their normal form |
2. | +6 | 0110 | 0110 | 0110 | |
3. | +5 | 0101 | 0101 | 0101 | |
4. | +4 | 0100 | 0100 | 0100 | |
5. | +3 | 0011 | 0011 | 0011 | |
6. | +2 | 0010 | 0010 | 0010 | |
7. | +1 | 0001 | 0001 | 0001 | |
8. | +0 | 0000 | 0000 | 0000 | Unique Zero |
9. | -0 | 1000 | 1111 | 1000 | Negative numbers in their 1’s and 2’s Complement form |
10. | -1 | 1001 | 1110 | 1111 | |
11. | -2 | 1010 | 1101 | 1110 | |
12. | -3 | 1011 | 1100 | 1101 | |
13. | -4 | 1100 | 1011 | 1100 | |
14. | -5 | 1101 | 1010 | 1011 | |
15. | -6 | 1110 | 1001 | 1010 | |
16 | -7 | 1111 | 1000 | 1001 | |
17 | -8 | 1000 | 1111 | 1000 |
Table: - Decimal, Binary, Octal and Hexadecimal Number
S. No | Decimal | Binary Code | BCD Code | Excess-3 Code (BCD+3) | Gray Code |
1. | 0 | 0000 | 0000 | 0011 | 0000 |
2. | 1 | 0001 | 0001 | 0100 | 0001 |
3. | 2 | 0010 | 0010 | 0101 | 0011 |
4. | 3 | 0011 | 0011 | 0110 | 0010 |
5. | 4 | 0100 | 0100 | 0111 | 0110 |
6. | 5 | 0101 | 0101 | 1000 | 0111 |
7. | 6 | 0110 | 0110 | 1001 | 0101 |
8. | 7 | 0111 | 0111 | 1010 | 0100 |
9. | 8 | 1000 | 1000 | 1011 | 1100 |
10. | 9 | 1001 | 1001 | 1100 | 1101 |
11. | 10 | 1010 | 0001 0000 | 0001 0011 | 1111 |
12. | 11 | 1011 | 0001 0001 | 0001 0100 | 1110 |
13. | 12 | 1100 | 0001 0010 | 0001 0101 | 1010 |
14. | 13 | 1101 | 0001 0011 | 0001 0110 | 1011 |
15. | 14 | 1110 | 0001 0100 | 0001 0111 | 1001 |
16. | 15 | 1111 | 0001 0101 | 0001 1000 | 1000 |
17. | 16 | 0001 0000 | 0001 0110 | 0001 1001 | 0001 1000 |
18. | 17 | 0001 0001 | 0001 0111 | 0001 1010 | 0001 1001 |
19. | 18 | 0001 0010 | 0001 1000 | 0001 1011 | 0001 1011 |
20. | 19 | 0001 0011 | 0001 1001 | 0001 1100 | 0001 1010 |
21 | 20 | 0001 0100 | 0010 0000 | 0001 1101 | 0001 1110 |
Figure:- Classification of codes.
REFERENCES
1. Digital Design by M. Morris Mano, Michael D Ciletti, Pearson
2. Digital Fundamentals by Thomas L. Floyd, R. P. Jain, Pearson
3. Digital Circuits and Design by S Salivahanan, S Arivazhagan, Vikas Publishing House Pvt Ltd.
4. Digital Systems by Ronald J. Tocci, Neal S. Widmer, Gregory L. Moss, Pearson
5. Digital Electronics Principles And Integrated Circuits by Anil K. Maini
6. Fundamentals of Digital Circuits by Anand Kumar
7. Digital Electronics by John Morris
8. Digital Electronics : An Introduction To Theory And Practice By William Gothmann
Comments
Post a Comment