1 chapter 2 number systems, operations, and codes
TRANSCRIPT
![Page 1: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/1.jpg)
1
Chapter 2
Number Systems, Operations, and Codes
![Page 2: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/2.jpg)
2
Decimal Numbering System
The decimal numbering system has 10 digits 0 through 9
The decimal numbering system has a base of 10 with each position weighted by a factor of 10
….105 104 103 102 101 100. 10-1 10-2 10-3 10-4 10-5…
14.2 = 1 101 + 4 100 + 2 10-1
![Page 3: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/3.jpg)
3
Binary Numbers
The binary numbering system has 2 digits 0 and 1
The binary numbering system has a base of 2 with each position weighted by a factor of 2
….25 24 23 22 21 20 . 2-1 2-2 2-3 2-4 2-5 …
10111 = 1 24 + 0 23 +1 22 +1 21 + 1 20
![Page 4: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/4.jpg)
4
Table 2--1
![Page 5: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/5.jpg)
5
Decimal-to-Binary Conversion
Sum-of-weight method
Binary weights
256 128 64 32 16 8 4 2 1
357 = 256 + 64 + 32 + 4 + 1 101100101
Binary weights
1024 512 256 128 64 32 16 8 4 2 1
1937 = 1024 + 512 + 256 + 128 + 16 + 111110010001
![Page 6: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/6.jpg)
6
Repeated division-by-2 method
![Page 7: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/7.jpg)
7
Converting Decimal fractions to Binary
Using Sum-of-weights
Binary weights
64 32 16 8 4 2 1 .5 .25 .125 .0625
95.6875 = 64 + 16 + 8 + 4 + 2 + 1 + .5 + .125 + .0625
1011111.1011
Repeated division by 2 yields the whole number while repeated multiplication by 2 of the fraction yields the binary fraction
![Page 8: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/8.jpg)
8
Binary Addition
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10
11001
+1101
100110
![Page 9: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/9.jpg)
9
Binary Subtraction
0 - 0 = 0
1 - 1 = 0
1 - 0 = 1
10 -1 = 1 0 -1 with a borrow of 1
1011
-111
100
![Page 10: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/10.jpg)
10
Binary Multiplication0 0 = 0
0 1 = 0
1 0 = 0 100110
1 1 = 1 101
100110
000000
100110
10111110
![Page 11: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/11.jpg)
11
Binary Division
Use the same procedure as decimal division
![Page 12: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/12.jpg)
12
Hexadecimal Numbers
![Page 13: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/13.jpg)
13
Binary-to-Hexadecimal Conversion
![Page 14: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/14.jpg)
14
Hexadecimal-to-Binary Conversion
![Page 15: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/15.jpg)
15
Hexadecimal-to-Decimal Conversion
![Page 16: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/16.jpg)
16
![Page 17: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/17.jpg)
17
Decimal-to-Hexadecimal Conversion
![Page 18: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/18.jpg)
18
Binary Coded Decimal (BCD)
![Page 19: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/19.jpg)
19
![Page 20: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/20.jpg)
20
Digital Codes and Parity
![Page 21: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/21.jpg)
21
• ASCII (American Standard Code for Information Interchange)
![Page 22: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/22.jpg)
22
Parity Method for Error Detection
![Page 23: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/23.jpg)
23
![Page 24: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/24.jpg)
24Figure 2--8 The system is in its initial state.
Digital System Application
![Page 25: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/25.jpg)
25
Figure 2--9 The system has counted 50 bottles of tablets and is working on the next bottle.
![Page 26: 1 Chapter 2 Number Systems, Operations, and Codes](https://reader033.vdocument.in/reader033/viewer/2022061618/56649ed25503460f94be1fcd/html5/thumbnails/26.jpg)
26
Figure 2--10 The system has just counted its fifty-first bottle of tablets.