1 / 25

Understanding Data Coding: Efficiency, Encryption, and Compression

Explore the world of coding, from basic definitions to complex encryption techniques. Learn about code types, efficiency, conversion, compression, and encryption. Dive into specific coding systems such as ASCII, Unicode, and EBCDIC, and understand encryption methods like DES and RSA. Get hands-on with examples of encryption and decryption processes. Enhance your coding knowledge for designing secure systems.

jclaudette
Download Presentation

Understanding Data Coding: Efficiency, Encryption, and Compression

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. Chapter 7 Data Coding

  2. Agenda • Coding • Code efficiency and conversion • Compression/compaction • Code encryption/decryption

  3. Coding • Definition • A predetermined set of symbols having specific meanings • Types • Human code • Morse code (dot and dash for telegraph) • Machine code • Binary states • Binary digit (bit)

  4. Machine Codes - I • Characteristics • Two-state code • Same number of bits • Perfectly formed • Same transmission duration • Character Assignment: unique sequence of bits

  5. Machine Codes - II • Types of characters • Alphanumeric • Format effector for terminal screen or paper • Control (device & transmission)

  6. Parity checking • Parity bit • Even or odd

  7. Escape mechanisms • Escape or ESC Character • Pro: • Increase codes • Con: • Code and decode the data

  8. Specific Codes • Baudot code • American Standard Code for Information Interchange (ASCII) • Extended Binary Coded Decimal Interchange Code (EBCDIC) • Unicode • Binary Coded Decimal • N-out-of-M code

  9. Baudot Code • 5 bits (32 code points) • ESC mechanism • Figure shift (uppercase) • Letter shift (lowercase) • Teletypewriters before 1965 • No error checking

  10. American Standard Code for Information Interchange (ASCII) • By American National Standards Institute (ANSI) • 7654321 (7-bit or 128 characters) • Pros: • Easy sorting by computers • Used by microcomputers

  11. Extended binary Coded Decimal Interchange Code (EBCDIC) • 8-bit code or 256 characters • IBM mainframe computers • 01234567

  12. Unicode • 16-bit or 65,536 characters • By Unicode Consortium for international languages • Used by Windows NT

  13. Other Codes • Binary Coded Decimal • 6-bit code Hollerith code • No standard • N-Out-Of-M Codes • M bits to transmit each character, n must be 1s • Error Detection • IBM’s 4-out-of-8

  14. Control Characters • Transmission control characters • SOH, STX, ETX, EOT, ACK, NAK, NUL • Device control characters • BEL, DC1 (X-ON), DC3 (X-OFF) • Format effect control characters • CR, LF, HT, VT

  15. Code Efficiency • Types of bits in a character • Information bits • Noninformation bits (parity bit) • Definition: No. of information bits divided by the total no. of bits in a character

  16. Code Conversion • Harder from larger no. of bits code to smaller no. of bits code • Use ESC mechanism

  17. Data Compression/Compaction • Types • Character compression/Huffman coding or adaptive Huffman coding (bits assignment) • Run length coding (repetitive characters) • Character stripping (heading & trailing characters) • Combination of the above three • Consideration • throughput • Storage and transmission cost • Hardware cost & software cost

  18. Code Encryption • Voice • Scramble and descramble • Data • Symmetric key • Data encryption standard (DES) by National Institute of Standard and Technology (2 to 56) • Triple DES (2 to 112) • Key security • Asymmetric key or RSA encryption • Public key & private key • Consideration • Hardware and/or software cost • Time delay • Security management cost

  19. Example of Encryption - I • Divide text into groups of 8 characters. Pad with blank at end as necessary • Select an 8-characters key • Rearrange text by interchanging adjacent characters • Translate each character into an ordinal number with blank as 0, A as 1, B as 2… • Add the ordinal number of the key to the results • Divide the total by 27 and retain the remainder • Translate the remainder back into a character to yield the cipher text

  20. Example of Encryption - II • Message: DATA COM • Key: PROTOCOL • A D A T C M O • 01 04 01 20 03 00 13 15 • 01 04 01 20 03 00 13 15 • 16 18 15 20 15 03 15 12 • 17 22 16 40 18 03 28 27 • 17 22 16 13 18 03 01 00 • Q V P M R C A SPACE

  21. Example of Decryption - I • Divide cipher text into groups of eight characters. Pad with blanks at end as necessary • Translate each cipher text alphabetic character and the encryption key into an ordinal number • For each group, subtract the ordinal number of the key value from the ordinal number of the cipher text • Add 27 to any negative number • Translate the number back to alphabetic equivalents • Rearrange the text by interchanging adjacent characters

  22. Example of Decryption - II • Q V P M R C A SPACE • 17 22 16 13 18 03 01 00 • 17 22 16 13 18 03 01 00 • 16 18 15 20 15 03 15 12 • 01 04 01 -7 01 00 -14 -12 • plus 27 27 27 27 • 01 04 01 20 01 00 13 15 • A D A T C M O • D A T A C O M

  23. Points to Remember • Coding • Code efficiency and conversion • Compression/compaction • Code encryption/decryption

  24. Discussion • Design the efficient and secure coding system for an international company

  25. Assignment • Review chapters 1-7 • Read chapters 8-9

More Related