1 / 47

Ch 2 . Number Systems and Codes

Ch 2 . Number Systems and Codes. 2.2 Octal and Hexadecimal Numbers. 10 ~ 15 : Alphabet . 2.3 General Positional-Number-System Conversions. p digit to the left of the point and n digits to the right of the point. Ex) A number D of the form has the value . p. n.

nikkos
Télécharger la présentation

Ch 2 . Number Systems and Codes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ch 2. Number Systems and Codes 2.2 Octal and Hexadecimal Numbers 10 ~ 15 : Alphabet

  2. 2.3 General Positional-Number-System Conversions • p digit to the left of the point and n digits to the right of the point Ex) A number D of the form has the value p n

  3. Number conversion example

  4. Number conversion example (decimal to hexadecimal, octal) 16 8 567 1234 70 77 16 8 2 7 4 8 13 6 8 1 0

  5. Number conversion example (decimal to octal) 0.78 8 8 8 8 6.24 1.92 7.36

  6. : Carry in : Burrow in : Input data 1 : Input data 2 : Carry out : Sum : Burrow out : Difference 1 0 1 0 1 - + - + 1 0 1 1 1 1 1 1 1 0 0 1 1 1 Burrow in Carry in Carry out Carry out Burrow out Burrow out

  7. 2.4 Addition and Subtraction of Nondecimal Numbers

  8. Hexadecimal addition +

  9. 2.5 Representation of Negative Numbers • Signed-Magnitude System • Magnitude and Symbol ( ‘+’, ‘-’ ) • Applied to binary number by using ‘sign bit’ • Ex) Sign bit • Complement System • Negates a number by taking its complement • More difficult than changing the sign bit • Can be added or subtracted directly

  10. : :

  11. Conversion example Number : Easy to complement

  12. 2.6 Two’s-Complement Addition and Subtraction :

  13. [ -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7 ]

  14. [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ]

  15. 2.7 One’s-Complement Addition and Subtraction One’s complement End-around carry +6 (0110) + -3 (1100) 10010 1 0011

  16. 2.8 Binary Multiplication

  17. Shifted and negated multiplicand

  18. 2.8 Binary Division

  19. 2.10 Binary Codes for Decimal Numbers

  20. 2.11 Gray Code

  21. Binary to Gray Code Gray Code to Binary (0) 1 1 0 (0) 1 0 1 1 3 2 1 2 1 1 0 1 0 1 3 If different, ‘1’ else (same) ‘0’ If different, ‘1’ else (same) ‘0’

  22. 2.13 Codes for Actions, Conditions, and States

  23. 2.14 n-Cubes and Distance

  24. Hamming Distance • Distance between two vertices, the number of difference bits in each position • EX) D(010, 111) = 2

  25. 2.15 Codes for Detecting and Correcting Errors Parity-bit

  26. At least two non codes between each pair of code words

  27. 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, • C=1, D=1 • 1 bit can be corrected • D=3, 3 bit errors can be detected

  28. 111 110 101 100 011 010 001

  29. LSB is 1 if all 7 bits are odd LSB is 0 if all 7 bits are even

  30. k = # of parity bits m = # of info bits , m=4,3,2,1 , m=11,10,9,…,2,1

  31. Undetectable Error

  32. An important application of 2-D codes

  33. 2.16 Codes for Serial Data Transmission and Storage

  34. NRZ : Non-Return to Zero NRZI : Non-Return to Zero Invert on 1s BPRZ : Bipolar Return to Zero

More Related