Download presentation
Presentation is loading. Please wait.
Published byHerbert Lamb Modified over 9 years ago
1
Ch 2. Number Systems and Codes 2.2 Octal and Hexadecimal Numbers 10 ~ 15 : Alphabet
2
p digit to the left of the point and n digits to the right of the point p n 2.3 General Positional-Number-System Conversions
3
Number conversion example
4
123416 77 16 413 2 5678 70 8 86 7 8 10 Number conversion example (decimal to hexadecimal, octal)
5
0.78 6.24 8 8 1.92 8 7.36 8 Number conversion example (decimal to octal)
8
Carry in 1 1+ 01 1 0+ 01 Carry out 1 0 1- 11 1 0 1- 11 Burrow out 1 Burrow in Burrow out
9
2.4 Addition and Subtraction of Nondecimal Numbers
10
+ Hexadecimal addition
11
Complement System –Negates a number by taking its complement –More difficult than changing the sign bit –Can be added or subtracted directly 2.5 Representation of Negative Numbers Sign bit
13
Conversion example Easy to complement
14
2.6 Two’s-Complement Addition and Subtraction
16
[ -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7 ]
17
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ]
18
2.7 One’s-Complement Addition and Subtraction +6 (0110) -3 (1100)+ 10010 1 0011 End-around carry One’s complement
19
2.8 Binary Multiplication
20
Shifted and negated multiplicand
21
2.8 Binary Division
22
2.10 Binary Codes for Decimal Numbers
23
2.11 Gray Code
25
(0) 1 1 0 1 0 1 Binary to Gray Code If different, ‘1’ else (same) ‘0’ (0) 1 0 1 1 1 0 Gray Code to Binary If different, ‘1’ else (same) ‘0’ 1 2 3 1 2 3
27
2.13 Codes for Actions, Conditions, and States
30
2.14 n-Cubes and Distance
32
Hamming Distance –Distance between two vertices, the number of difference bits in each position EX) D(010, 111) = 2
33
2.15 Codes for Detecting and Correcting Errors Parity-bit
34
At least two non codes between each pair of code words
35
If minimum distance = 2C+1, up to C-bits can be corrected If 2C+D+1, then C-bits can be corrected, and d bits can be detected 4= 2C+D+1, (a)C=1, D=1 (b)1 bit can be corrected (c)D=3, 3 bit errors can be detected
40
111110101100011010001
41
LSB is 1 if all 7 bits are odd LSB is 0 if all 7 bits are even
42
k = # of parity bits m = # of info bits
44
Undetectable Error
45
An important application of 2-D codes
46
2.16 Codes for Serial Data Transmission and Storage
47
NRZ : Non-Return to Zero NRZI : Non-Return to Zero Invert on 1s BPRZ : Bipolar Return to Zero
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.