data1

1,064 views

Published on

การจัการข้อมูล

Published in: Education, Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,064
On SlideShare
0
From Embeds
0
Number of Embeds
205
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

data1

  1. 1. 1 3 ก F F ( F 2 8 16) ִก ִ F 2 8 16 ก F ก F BCD, EBCDIC, ASCII ก F
  2. 2. 2 ( 2,8,10,16) Place Value: F ก F ก F ก F กก F ก ก F Least significant digit : F ก F Most significant digit : F ก ก F F ก ก ก F 10
  3. 3. 3 F 2 0,1 8 0,1,2,3,4,5,6,7 10 0,1,2,3,4,5,6,7,8,9 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
  4. 4. 4 ก ก ˈ 10 ก 10 ˈ ก 2 ˈ 8 16 ก 8 16 ˈ 2
  5. 5. 5 ก ˈ 10 F ก F ก F ก . . 11012 = ( )10 F ก 23 22 21 20 (1*8)+(1*4)+(0*2)+(1*1) = 13
  6. 6. 6 ก 10 ˈ ก F ก MODULO ִ 10 ˈ F ก ִ F ก กก ִ F ก F F ִ ก F ก F ˈ Most significant
  7. 7. 7 F ก 10 ˈ 132 2 6 1 2 3 0 1 1 1310 = ( )2 11012 1310 = ( ) 4 4 13 3 1 314
  8. 8. 8 ก 10 ˈ ก : ก F ˈ 2 F F F F MODULO F ִ F ก F ִ F F F F ก
  9. 9. 9 F ก 10 ˈ 132 2 6 1 2 3 0 1 1 13.4 10 = ( )2 .4 * 2 = 0 .8 .8 * 2 = 1 .6 .6 * 2 = 1 .2 .2 * 2 = 0 .4 Ans: 1101.01102
  10. 10. 10 ก 2 ˈ 8 16 กก Fก ก F ִ 2 ˈ 8 ก F 3 ִ 2 ˈ 16 ก F 4 ก F ก F กก F F F 0
  11. 11. 11 F ก 2 ˈ 8 111112 = ( 37 ) 8 0 1 1 (0*4)+(1*2)+(1*1) 3 7 1 1 1 (1*4)+(1*2)+(1*1)
  12. 12. 12 F ก 2 ˈ 16 0001.112 = (1.C ) 16 1 1 0 0 (1*8)+(1*4)+(0*2)+(0*1)(0*8)+(0*4)+(0*2)+(1*1) 1 12 C 0 0 0 1 0 0
  13. 13. 13 ก 8 16 ˈ 2 F กก ก F ก ก ˈ 8 ก ก ˈ 2 F 3 16 ก ก ˈ 2 F 4
  14. 14. 14 F ก 8 16 ˈ 2 ก 738 =( ) 2 7 3 1 1 1 0 1 1 A316 = ( ) 2 10 3 1 0 1 0 0 0 1 1 Ans: 1110112 Ans: 1010000116
  15. 15. 15 F ก 8 16 ˈ 2 ก 7.38 =( ) 2 7 . 3 1 1 1 0 1 1 A3.B16 = ( ) 2 10 3 . 11 1 0 1 0 0 0 1 1 Ans: 111 . 0112 Ans: 10100001.101116 1 0 1 1
  16. 16. 16 ก ก ก ก ก Complement
  17. 17. 17 ก ก ก ก 1101.112 + 0111.012 10101.00 2 5345 + 1235 F F F 5 5 F31C16 + 235016 1266C16
  18. 18. 18 ก ก 4325 - 1435 2345 1011.0112 - 0111.1012 0011.1102
  19. 19. 19 ก F (Complement) Complement ( F R ) 2 Complement R Complement R-1 R-1’ Comp. R’ Comp 2 1’ Comp 2’ Comp. 8 7’ Comp 8’ Comp 10 9’ Comp 10’ Comp
  20. 20. 20 ก F F ก F R-1 ִ F F ִ F F ִ 2910 F 99 9’ Comp : 99 -29 = 70 ִ 101.112 F 111.11 1 ‘Comp : 111.11 - 101.11 = 010.00
  21. 21. 21 ก F F ก F R ִ F ก F F ก ก ก F F F ก ִ 2910 F ˈ  10 ‘ Comp : (99 + 1) - 29 = 71 ִ 101.112 ˈ  2 ‘Comp: (111.11 + .01) - 101.11 = 0010.01
  22. 22. 22 F ก ก ก F ก R-1 Complement ก ก ก 1’ Complement 2 ก F F F ก F F R-1 Complement F F ก F R Complement F 1 ก ִ 2’Comp = 1’ Comp + 1 ก
  23. 23. 23 ก F F F F ก ก F F F ก ก ִก R’ Comp. F ִก R-1’ Comp. F ก ก กก F F
  24. 24. 24 F ก F R-1’ Comp. 4325 - 1435 = ? 1) 444 - 143 = 301 2) 432 + 301 1 233 + 1 234 1011.011 2- 111.1012 = ? 1) 111.111 - 111.101= 000.010 2) 1011.011 + 1000.010 1 0011.101 + 1 0011.110 1 0 1
  25. 25. 25 F ก F F R 4325 - 1435 = ? 1) 1000 - 143 = 302 2) 432 + 302 1 234 1011.011 2- 111.1012 = ? 1) 10000.000 - 0111.101=1000.011 2) 1011.011 + 1000.011 1 0011.110
  26. 26. 26 F F ˈ F ִ ก F F ִ ก ก ก F F ก ก F ˈ F ก F ก ִ ก F F F F F ˈ F ก F ก F ***ก F F ก F
  27. 27. 27 F ก F ***ก F F ก F ตัวอยาง 10112-11002= ? 1011+ 0011 1110 2 1111-1110 = 0001-3 1111-1100= 00111 F R-1 complement ขอแตกตางจาก R comp.
  28. 28. 28 F F ˈ F ִ ก F F ִ ก ก ก F F ก ก F ˈ F ก F ก ִ ก F F F F F ˈ F ก F ก F ***ก F F ก F
  29. 29. 29 F ก F ***ก F F ก F ตัวอยาง 10112-11002= ? 1011+ 0100 1111 2 10000-1111 = 0001-3 10000-1100= 01001 คําถาม : ใชวิธีลบแบบใดอยู R-1 หรือ R complement ? ดูจาก
  30. 30. 30 ก F F Data Representation ก F ˈ ก (Alphanumeric Data Representation) ก F ˈ (Numeric Data Representation) ִ (Integer Representation) ִ (Floating Point Representation)
  31. 31. 31 ก F ˈ ก BCD : Binary Coded Decimal Code EBCDIC: Extended Binary Coded Decimal Interchange Code ASCII : American Standard Code for Information Interchange
  32. 32. 32 BCD F 6 ก 1 ก F 64 ( 26 ) C B A 8 4 2 1 Digit bit Zone bit Check bit/ Parity bit
  33. 33. 33 BCD ก BCD ִ ก (0 - 9) Zone Bit ˈ 00 ִ ก ก ก F Zone bit ˈ 11
  34. 34. 34 EBCDIC F 8 ก 1 ก F 256 ( 28 ) C B A 8 4 2 1 Digit bit Zone bit Check bit/ Parity bit
  35. 35. 35 EBCDIC ก ก F EBCDIC 2 ִก ก Zone Decimal ִก ก Packed Decimal ก ก Zone bit F ˈ 1111 F F ( 15 ,F) 1100 ก (+,12 ,C) 1101 (-,13 ,D)
  36. 36. 36 ก F Packed Decimal ˈ ก ก ก ก EBCDIC F F ก ก ก F F F Fก ˈ
  37. 37. 37 ก PACK “-123” F Zone bit Digit bit F Zone bit F F ˈ Digit Bit F ก F 16 (123D)16 Unpack ก F ก ก Pack 1101 0001 1101 0010 1101 0011
  38. 38. 38 ASCII 2 7 ก 8 ก F F F ก F ก ˈ ˆ ก F EBCDIC Zone bit ˈ ִ 0101 011 ִ ก 1010 100
  39. 39. 39 Parity bit Check bit ˈ F ก 2 Even Parity F F ˈ 1 ˈ F Odd Parity F ˈ 1 ˈ 1 1 1 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 0 0 1 1 1 1 0 1 0 1
  40. 40. 40 ก F ˈ ก F ก F (Fixed length word) 1 half-word F 2 F Full-word F 4 F Double-word F 8 F
  41. 41. 41 ก Sign Magnitude / Pure binary code 2’ Complement 1’ Complement
  42. 42. 42 Sign Magnitude F ก F Sign bit ก F Magnitude Sign bit Magnitude MSB LSB 1 0 ก 1 Word = 4 Byte = 32 Bit
  43. 43. 43 ก F Sign Magnitude 1 Word = 4 Byte = 32 bit 31 32 2 1 0 25=1100120 0 0 0 1 1 0 0 1......................... -251 0 0 ......................... 0 1 1 0 0 1
  44. 44. 44 ก F 2’ Complement ˈ F ก ִ ก Sign Magnitude ִ F F 2’ Complement
  45. 45. 45 F ก F 2’ Complement F 28 = 111002 MSB LSB 0 000000.............0000000000 1 1 1 0 0 1 111111.............1111111111 0 0 0 1 1 + 1 1 111111.............1111111111 0 0 1 0 0
  46. 46. 46 Floating Point Representation R = + - M * B+- E Sign Exponent Mantissa 31 30 24 0 S Sign ก E Exponent F กก M Mantissa F
  47. 47. 47 ก Floating point ˈ 16 Normalization 16 ( ก ก ) Sign, Exponent, Mantissa ˈ 2 ִSign : 1 F 0 F ก ִMantissa : ˈ 2 ก F F
  48. 48. 48 ก Floating point Exponent ˈ F F ก F F Excess 64 ִexponent 16 = 4016 + true exponent16 ִexponent16 ----> exponent 2
  49. 49. 49 F Floating point 28 ----> 1C16 1C16 = (+.1C * 102)16 Sign ----> 0 Mantissa ----> 0001 11002 Exponent ----> 4016 + 216 = 42 16 -----> 100 00102 0 100 0010 0001 11000000..........................

×