SlideShare una empresa de Scribd logo
1 de 34
   Digital system codes are
    › BCD code
    › Excess-3 code
    › EBCDIC code
    › Error detection code
    › UNI CODE
    › ASCII code
    › Extended ASCII code
    › Gray code
 It should have some desirable properties
 Ease of coding
 To increase efficiency of transmission
 Ease in arithmetic operations
 Minimum use of hardware
 Error detection property
 Ability to prevent wrong output during
  transitions
BCD – Binary Coded Decimal
   BCD is a convention for mapping binary
    numbers to decimal numbers & for Decimal
    to binary numbers.
   When the decimal numbers are represented
    in BCD, each decimal digit is represented by
    the equivalent BCD code.
   Example :BCD Representation of Decimal
    6349
                 6     3     4       9


              0110 0011 0100 1001
                                            6
   0-9 decimal digits need to be
    represented in a binary code which must
    contain at least four bits.
    › Four bits can make upto 16 different
      combinations.
    › Only first 10 combinations are used. (0-9)
   BCD is different from binary representation.
    › 15 in binary is 1111
   Note: the          Digit   Bit pattern
    following bit       0        0000
    patterns are not    1        0001

    used:               2        0010
                        3        0011
           1010         4        0100
           1011         5        0101
           1100         6        0110
           1101         7        0111
           1110         8        1000
           1111         9        1001
   Example:
      lets add 56 & 98
  56               0101    0110
+ 98               1001    1000
=154               1110    1110   Not in BCD


                   0110    0110   add 6


           1        0101   0100
           1         5       4
EXCESS 3 CODE
   The excess-3 code is obtained by adding
    3 (0011) to the corresponding BCD
    equivalent binary number.




                                      10
EXCESS 3 CODE
 Decimal   BCD    Excess-3
 Number    Number Number
   0       0000     0011
   1       0001     0100
   2       0010     0101
   3       0011     0110
   4       0100     0111
   5       0101     1000
   6       0110     1001
   7       0111     1010
   8       1000     1011
   9       1001     1100
                             11
 Extended BCD Interchange Code
 8-bit code
 It contains the numbers from 0 to 28-1
 Developed by IBM
 Rarely used today
 IBM mainframes only
We need a mechanism of correcting the
  errors that occur
 It is not always possible or may prove to be
  expensive
 It is necessary to know if an error occurred
 If an occurrence of error is known, data
  may be retransmitted
 Data integrity is improved by encoding
 Encoding may be done for error correction.
 Error detection code detect errors during
  transmission of data from one location to
  another.
 Error rate cannot be reduced to zero
 To achieve error-detection we use a
  parity bit.
 A parity bit is an extra bit included with a
  message to the total number of 1’s
  transmitted either odd or even.
 Parity bit allows us only to detect the
  presence of one bit error in a group of bits.
 It does not enable us to exactly locate the
  bit that changed.
 Parity bit scheme can be extended to
  locate the faulty bit In a block of
  information.
   Odd parity bit generator can be formed
    by inverting the output of the Even parity
    bit generator.
 Gray coding is an important code and is
  used for its speed, it is also relatively free
  from errors.
 Gray coding avoids this since only one bit
  changes between subsequent numbers.
 In pure binary coding then counting from 7
  (0111) to 8 (1000) requires 4 bits to be
  changed simultaneously.
 Gray code is used to represent the digital data
  when it is converted from analog data.
Decimal   Binary   Gray Code   Decimal   Binary   Gray Code
  0       0000       0000         8      1000       1100
  1       0001       0001         9      1001       1101
  2       0010       0011        10      1010       1111
  3       0011       0010        11      1011       1110
  4       0100       0110        12      1100       1010
  5       0101       0111        13      1101       1011
  6       0110       0101        14      1110       1001
  7       0111       0100        15      1111       1000
 Scan the Gray code word from left to right
 All the bits of the binary code are the same
  as those of the Gray code until the first 1 is
  encountered, including the first 1
 1’s are written until the next 1 is
  encountered, in which case a 0 is written.
 0’s are written until the next 1 is
  encountered, in which case a 1 is written.
 Examples
   Gray code : 1 1 0 1 1 0
   Binary code: 1 0 0 1 0 0
UNICODE is a 16-bit code for
  representing alphanumeric data.
 Developed by a consortia(An association or a
    combination, as of businesses, financial institutions, or investors, for
    the purpose of engaging in a joint venture.)

 With 16 bits, can represent 216 or 65536
  different symbols.
 16 bits = 2 Bytes per character.
 UNICODE used by Web browsers and
  Java these days.
ASCII Code
• The standard binary code for representation of
alphanumeric characters is ASCII
•ASCII (American Standard for Information
Interchange)
•It hands not only numbers but letters and
special characters
• Uses 7 bits to code 128 characters
•In ASCII, every letter, number, and
punctuation symbol has a corresponding
number, or ASCII code                        24
This code is a popular code used to
    represent information sent as character-
    based data. It uses 7-bits to represent:
    › 94 Graphic printing characters.
    › 34 Non-printing characters
 Some non-printing characters are used for
  text format (e.g. BS = Backspace, CR =
  carriage return)
 Other non-printing characters are used for
  record marking and flow control (e.g. STX
  and ETX start and end text areas).
95 Graphic codes

        000   001   010    011     100   101   110   111
0000   NULL   DLE           0       @     P     `     p
0001   SOH    DC1   !       1       A     Q     a     q
0010   STX    DC2   "       2       B     R     b     r
0011   ETX    DC3   #       3       C     S     c     s
0100   EDT    DC4   $       4       D     T     d     t
0101   ENQ    NAK   %       5       E     U     e     u
0110   ACK    SYN   &       6       F     V     f     v
0111    BEL   ETB   '       7       G     W     g     w
1000    BS    CAN   (       8       H     X     h     x
1001    HT    EM    )       9       I     Y     i     y
1010     LF   SUB   *       :       J     Z     j     z
1011    VT    ESC   +       ;       K     [     k     {
1100     FF    FS   ,       <       L          l     |
1101    CR     GS   -       =       M     ]     m     }
1110    SO     RS   .       >       N     ^     n     ~
1111     SI    US   /       ?       O     _     o    DEL
33 Control codes

        000   001   010    011     100   101   110   111
0000   NULL   DLE           0       @     P     `     p
0001   SOH    DC1   !       1       A     Q     a     q
0010   STX    DC2   "       2       B     R     b     r
0011   ETX    DC3   #       3       C     S     c     s
0100   EDT    DC4   $       4       D     T     d     t
0101   ENQ    NAK   %       5       E     U     e     u
0110   ACK    SYN   &       6       F     V     f     v
0111    BEL   ETB   '       7       G     W     g     w
1000    BS    CAN   (       8       H     X     h     x
1001    HT    EM    )       9       I     Y     i     y
1010     LF   SUB   *       :       J     Z     j     z
1011    VT    ESC   +       ;       K     [     k     {
1100     FF    FS   ,       <       L          l     |
1101    CR     GS   -       =       M     ]     m     }
1110    SO     RS   .       >       N     ^     n     ~
1111     SI    US   /       ?       O     _     o    DEL
Alphabetic codes

        000   001   010    011     100   101   110   111
0000   NULL   DLE           0       @     P     `     p
0001   SOH    DC1   !       1       A     Q     a     q
0010   STX    DC2   "       2       B     R     b     r
0011   ETX    DC3   #       3       C     S     c     s
0100   EDT    DC4   $       4       D     T     d     t
0101   ENQ    NAK   %       5       E     U     e     u
0110   ACK    SYN   &       6       F     V     f     v
0111    BEL   ETB   '       7       G     W     g     w
1000    BS    CAN   (       8       H     X     h     x
1001    HT    EM    )       9       I     Y     i     y
1010     LF   SUB   *       :       J     Z     j     z
1011    VT    ESC   +       ;       K     [     k     {
1100     FF    FS   ,       <       L          l     |
1101    CR     GS   -       =       M     ]     m     }
1110    SO     RS   .       >       N     ^     n     ~
1111     SI    US   /       ?       O     _     o    DEL
Numeric codes

        000   001   010      011    100   101   110   111
0000   NULL   DLE             0      @     P     `     p
0001   SOH    DC1   !         1      A     Q     a     q
0010   STX    DC2   "         2      B     R     b     r
0011   ETX    DC3   #         3      C     S     c     s
0100   EDT    DC4   $         4      D     T     d     t
0101   ENQ    NAK   %         5      E     U     e     u
0110   ACK    SYN   &         6      F     V     f     v
0111    BEL   ETB   '         7      G     W     g     w
1000    BS    CAN   (         8      H     X     h     x
1001    HT    EM    )         9      I     Y     i     y
1010     LF   SUB   *         :      J     Z     j     z
1011    VT    ESC   +         ;      K     [     k     {
1100     FF    FS   ,         <      L          l     |
1101    CR     GS   -         =      M     ]     m     }
1110    SO     RS   .         >      N     ^     n     ~
1111     SI    US   /         ?      O     _     o    DEL
Punctuation, etc.

        000   001   010     011     100   101   110   111
0000   NULL   DLE            0       @     P     `     p
0001   SOH    DC1   !        1       A     Q     a     q
0010   STX    DC2   "        2       B     R     b     r
0011   ETX    DC3   #        3       C     S     c     s
0100   EDT    DC4   $        4       D     T     d     t
0101   ENQ    NAK   %        5       E     U     e     u
0110   ACK    SYN   &        6       F     V     f     v
0111    BEL   ETB   '        7       G     W     g     w
1000    BS    CAN   (        8       H     X     h     x
1001    HT    EM    )        9       I     Y     i     y
1010     LF   SUB   *        :       J     Z     j     z
1011    VT    ESC   +        ;       K     [     k     {
1100     FF    FS   ,        <       L          l     |
1101    CR     GS   -        =       M     ]     m     }
1110    SO     RS   .        >       N     ^     n     ~
1111     SI    US   /        ?       O     _     o    DEL
   Let us convert You & I, to decimal, hex and
    binary using the ASCII code table :
    › Y:     8910     5916 10110012
    ›   o:   11110    6F16 11011112
    ›   u:   11710    7516  11101012
    ›   Space: 3210    2016 01000002
    ›   &:    3810     2616 01001102
    ›   Space: 3210    2016 01000002
    ›   I:    7310    4916  10010012
    ›   ,:    4410    2C16   01011002
   The term extended ASCII (or high ASCII)
    describes eight-bit or larger character
    encodings that include the standard
    seven-bit ASCII characters as well as
    others.
Extended ASCII
Codes

Más contenido relacionado

La actualidad más candente

Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operationsNitesh Bichwani
 
BINARY NUMBER SYSTEM
BINARY NUMBER SYSTEMBINARY NUMBER SYSTEM
BINARY NUMBER SYSTEMZaheer Abbasi
 
Floating point representation
Floating point representationFloating point representation
Floating point representationmissstevenson01
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rulesstudent
 
01.number systems
01.number systems01.number systems
01.number systemsrasha3
 
3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )MdFazleRabbi18
 
Weighted and Non Weighted Codes
Weighted and Non Weighted CodesWeighted and Non Weighted Codes
Weighted and Non Weighted CodesSubhamSatpathy2
 
Logical micro-operations
Logical micro-operationsLogical micro-operations
Logical micro-operationsVATSAL TRIVEDI
 
Fixed point and floating-point numbers
Fixed point and  floating-point numbersFixed point and  floating-point numbers
Fixed point and floating-point numbersMOHAN MOHAN
 
Complements of numbers
Complements of numbersComplements of numbers
Complements of numbersKiriti Varkur
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computersHazel Anne Quirao
 

La actualidad más candente (20)

BCD.
BCD.BCD.
BCD.
 
Ascii 03
Ascii 03Ascii 03
Ascii 03
 
Binary codes
Binary codesBinary codes
Binary codes
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
 
Codes
CodesCodes
Codes
 
Signed Binary Numbers
Signed Binary NumbersSigned Binary Numbers
Signed Binary Numbers
 
BINARY NUMBER SYSTEM
BINARY NUMBER SYSTEMBINARY NUMBER SYSTEM
BINARY NUMBER SYSTEM
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
 
01.number systems
01.number systems01.number systems
01.number systems
 
3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )
 
Binary to Decimal Conversion
Binary to Decimal ConversionBinary to Decimal Conversion
Binary to Decimal Conversion
 
Number system conversion
Number system conversionNumber system conversion
Number system conversion
 
Binary Arithmetic Operations
Binary Arithmetic OperationsBinary Arithmetic Operations
Binary Arithmetic Operations
 
Weighted and Non Weighted Codes
Weighted and Non Weighted CodesWeighted and Non Weighted Codes
Weighted and Non Weighted Codes
 
Microprocessor ppt
Microprocessor pptMicroprocessor ppt
Microprocessor ppt
 
Logical micro-operations
Logical micro-operationsLogical micro-operations
Logical micro-operations
 
Fixed point and floating-point numbers
Fixed point and  floating-point numbersFixed point and  floating-point numbers
Fixed point and floating-point numbers
 
Complements of numbers
Complements of numbersComplements of numbers
Complements of numbers
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computers
 

Destacado

BCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesBCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesstudent
 
Comp codes (ascii...).24to25
Comp codes (ascii...).24to25Comp codes (ascii...).24to25
Comp codes (ascii...).24to25myrajendra
 
ASCII CODE &amp; BAUDOT CODE
ASCII CODE &amp; BAUDOT CODEASCII CODE &amp; BAUDOT CODE
ASCII CODE &amp; BAUDOT CODENetworking
 
Synesthetic Associational Patterns between Letters and Colors
Synesthetic Associational Patterns between Letters and ColorsSynesthetic Associational Patterns between Letters and Colors
Synesthetic Associational Patterns between Letters and Colorssynesthesiapatterns
 
Ebcdic code 24 1
Ebcdic code 24 1Ebcdic code 24 1
Ebcdic code 24 1myrajendra
 
History of Cipher System
History of Cipher SystemHistory of Cipher System
History of Cipher SystemAsad Ali
 
ESL - The Letter C
ESL - The Letter  CESL - The Letter  C
ESL - The Letter CDarren Quaid
 
4 character encoding-ascii
4 character encoding-ascii4 character encoding-ascii
4 character encoding-asciiirdginfo
 
Introduction to sociolinguistics
Introduction to sociolinguisticsIntroduction to sociolinguistics
Introduction to sociolinguisticsLusya Liann
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperationsNitesh Singh
 
Cisc vs risc
Cisc vs riscCisc vs risc
Cisc vs riscKumar
 

Destacado (20)

BCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesBCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codes
 
Ascii
AsciiAscii
Ascii
 
Ascii
AsciiAscii
Ascii
 
Comp codes (ascii...).24to25
Comp codes (ascii...).24to25Comp codes (ascii...).24to25
Comp codes (ascii...).24to25
 
ASCII CODE &amp; BAUDOT CODE
ASCII CODE &amp; BAUDOT CODEASCII CODE &amp; BAUDOT CODE
ASCII CODE &amp; BAUDOT CODE
 
Synesthetic Associational Patterns between Letters and Colors
Synesthetic Associational Patterns between Letters and ColorsSynesthetic Associational Patterns between Letters and Colors
Synesthetic Associational Patterns between Letters and Colors
 
Unicode
UnicodeUnicode
Unicode
 
Ascii codes 3145_app_f
Ascii codes 3145_app_fAscii codes 3145_app_f
Ascii codes 3145_app_f
 
ASCII Code with Webdings and Wingdings - All Characters
ASCII Code with Webdings and Wingdings - All CharactersASCII Code with Webdings and Wingdings - All Characters
ASCII Code with Webdings and Wingdings - All Characters
 
2 applications.key
2 applications.key2 applications.key
2 applications.key
 
Ebcdic code 24 1
Ebcdic code 24 1Ebcdic code 24 1
Ebcdic code 24 1
 
History of Cipher System
History of Cipher SystemHistory of Cipher System
History of Cipher System
 
ESL - The Letter C
ESL - The Letter  CESL - The Letter  C
ESL - The Letter C
 
4 character encoding-ascii
4 character encoding-ascii4 character encoding-ascii
4 character encoding-ascii
 
Ascii codes
Ascii codesAscii codes
Ascii codes
 
Knowing Letter Names Reutzel
Knowing  Letter  Names  ReutzelKnowing  Letter  Names  Reutzel
Knowing Letter Names Reutzel
 
Introduction to sociolinguistics
Introduction to sociolinguisticsIntroduction to sociolinguistics
Introduction to sociolinguistics
 
Binary code
Binary codeBinary code
Binary code
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperations
 
Cisc vs risc
Cisc vs riscCisc vs risc
Cisc vs risc
 

Similar a Codes (20)

Dld lecture module 03
Dld lecture module 03Dld lecture module 03
Dld lecture module 03
 
Data Formats used by Computers
Data Formats used by ComputersData Formats used by Computers
Data Formats used by Computers
 
Introduction to Information Technology Lecture 3
Introduction to Information Technology Lecture 3Introduction to Information Technology Lecture 3
Introduction to Information Technology Lecture 3
 
Number system
Number systemNumber system
Number system
 
Number system
Number systemNumber system
Number system
 
Number System.pdf
Number System.pdfNumber System.pdf
Number System.pdf
 
Digital logic degin, Number system
Digital logic degin, Number systemDigital logic degin, Number system
Digital logic degin, Number system
 
Number Codes and Registers
Number Codes and RegistersNumber Codes and Registers
Number Codes and Registers
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mp
 
Binary codes
Binary codesBinary codes
Binary codes
 
Number codes
Number codesNumber codes
Number codes
 
08. Numeral Systems
08. Numeral Systems08. Numeral Systems
08. Numeral Systems
 
Codes r005
Codes  r005Codes  r005
Codes r005
 
Logic Design 2009
Logic Design 2009Logic Design 2009
Logic Design 2009
 
Week 5 - Number Systems.pdf
Week 5 - Number Systems.pdfWeek 5 - Number Systems.pdf
Week 5 - Number Systems.pdf
 
Microcontroller base project
Microcontroller base projectMicrocontroller base project
Microcontroller base project
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
 
Computer Security Lecture 5: Simplified Advanced Encryption Standard
Computer Security Lecture 5: Simplified Advanced Encryption StandardComputer Security Lecture 5: Simplified Advanced Encryption Standard
Computer Security Lecture 5: Simplified Advanced Encryption Standard
 
08 Numeral systems
08 Numeral systems08 Numeral systems
08 Numeral systems
 
Binary octal
Binary octalBinary octal
Binary octal
 

Más de Muhammad Uzair Rasheed (20)

Pak Energy conservation
Pak Energy conservation Pak Energy conservation
Pak Energy conservation
 
Pakistan Energy Conservation
Pakistan Energy ConservationPakistan Energy Conservation
Pakistan Energy Conservation
 
Molten Salt Reactor
Molten Salt ReactorMolten Salt Reactor
Molten Salt Reactor
 
Sampling
SamplingSampling
Sampling
 
Zindagi gulzar-hai
Zindagi gulzar-haiZindagi gulzar-hai
Zindagi gulzar-hai
 
C++loop statements
C++loop statementsC++loop statements
C++loop statements
 
Algorithms 1
Algorithms 1Algorithms 1
Algorithms 1
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
Presentation on 2 nd generation telecommunication system
Presentation on 2 nd generation telecommunication systemPresentation on 2 nd generation telecommunication system
Presentation on 2 nd generation telecommunication system
 
Tdm & fdm
Tdm & fdmTdm & fdm
Tdm & fdm
 
Wavelength division multiplexing
Wavelength division multiplexingWavelength division multiplexing
Wavelength division multiplexing
 
Transmission media
Transmission mediaTransmission media
Transmission media
 
Guided media
Guided mediaGuided media
Guided media
 
Phase shift
Phase shiftPhase shift
Phase shift
 
Gsm – global system for mobile communication
Gsm – global system for mobile communicationGsm – global system for mobile communication
Gsm – global system for mobile communication
 
First generation network
First generation networkFirst generation network
First generation network
 
First and second generation communication
First and second generation communicationFirst and second generation communication
First and second generation communication
 
Fdm
FdmFdm
Fdm
 
Channel impairments
Channel impairmentsChannel impairments
Channel impairments
 
Angle modulation
Angle modulationAngle modulation
Angle modulation
 

Último

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Último (20)

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

Codes

  • 1.
  • 2.
  • 3.
  • 4. Digital system codes are › BCD code › Excess-3 code › EBCDIC code › Error detection code › UNI CODE › ASCII code › Extended ASCII code › Gray code
  • 5.  It should have some desirable properties  Ease of coding  To increase efficiency of transmission  Ease in arithmetic operations  Minimum use of hardware  Error detection property  Ability to prevent wrong output during transitions
  • 6. BCD – Binary Coded Decimal  BCD is a convention for mapping binary numbers to decimal numbers & for Decimal to binary numbers.  When the decimal numbers are represented in BCD, each decimal digit is represented by the equivalent BCD code.  Example :BCD Representation of Decimal 6349 6 3 4 9 0110 0011 0100 1001 6
  • 7. 0-9 decimal digits need to be represented in a binary code which must contain at least four bits. › Four bits can make upto 16 different combinations. › Only first 10 combinations are used. (0-9)  BCD is different from binary representation. › 15 in binary is 1111
  • 8. Note: the Digit Bit pattern following bit 0 0000 patterns are not 1 0001 used: 2 0010 3 0011 1010 4 0100 1011 5 0101 1100 6 0110 1101 7 0111 1110 8 1000 1111 9 1001
  • 9. Example: lets add 56 & 98 56 0101 0110 + 98 1001 1000 =154 1110 1110 Not in BCD 0110 0110 add 6 1 0101 0100 1 5 4
  • 10. EXCESS 3 CODE  The excess-3 code is obtained by adding 3 (0011) to the corresponding BCD equivalent binary number. 10
  • 11. EXCESS 3 CODE Decimal BCD Excess-3 Number Number Number 0 0000 0011 1 0001 0100 2 0010 0101 3 0011 0110 4 0100 0111 5 0101 1000 6 0110 1001 7 0111 1010 8 1000 1011 9 1001 1100 11
  • 12.  Extended BCD Interchange Code  8-bit code  It contains the numbers from 0 to 28-1  Developed by IBM  Rarely used today  IBM mainframes only
  • 13. We need a mechanism of correcting the errors that occur  It is not always possible or may prove to be expensive  It is necessary to know if an error occurred  If an occurrence of error is known, data may be retransmitted  Data integrity is improved by encoding  Encoding may be done for error correction.
  • 14.  Error detection code detect errors during transmission of data from one location to another.  Error rate cannot be reduced to zero  To achieve error-detection we use a parity bit.
  • 15.  A parity bit is an extra bit included with a message to the total number of 1’s transmitted either odd or even.  Parity bit allows us only to detect the presence of one bit error in a group of bits.  It does not enable us to exactly locate the bit that changed.  Parity bit scheme can be extended to locate the faulty bit In a block of information.
  • 16.
  • 17. Odd parity bit generator can be formed by inverting the output of the Even parity bit generator.
  • 18.
  • 19.
  • 20.  Gray coding is an important code and is used for its speed, it is also relatively free from errors.  Gray coding avoids this since only one bit changes between subsequent numbers.  In pure binary coding then counting from 7 (0111) to 8 (1000) requires 4 bits to be changed simultaneously.  Gray code is used to represent the digital data when it is converted from analog data.
  • 21. Decimal Binary Gray Code Decimal Binary Gray Code 0 0000 0000 8 1000 1100 1 0001 0001 9 1001 1101 2 0010 0011 10 1010 1111 3 0011 0010 11 1011 1110 4 0100 0110 12 1100 1010 5 0101 0111 13 1101 1011 6 0110 0101 14 1110 1001 7 0111 0100 15 1111 1000
  • 22.  Scan the Gray code word from left to right  All the bits of the binary code are the same as those of the Gray code until the first 1 is encountered, including the first 1  1’s are written until the next 1 is encountered, in which case a 0 is written.  0’s are written until the next 1 is encountered, in which case a 1 is written.  Examples Gray code : 1 1 0 1 1 0 Binary code: 1 0 0 1 0 0
  • 23. UNICODE is a 16-bit code for representing alphanumeric data.  Developed by a consortia(An association or a combination, as of businesses, financial institutions, or investors, for the purpose of engaging in a joint venture.)  With 16 bits, can represent 216 or 65536 different symbols.  16 bits = 2 Bytes per character.  UNICODE used by Web browsers and Java these days.
  • 24. ASCII Code • The standard binary code for representation of alphanumeric characters is ASCII •ASCII (American Standard for Information Interchange) •It hands not only numbers but letters and special characters • Uses 7 bits to code 128 characters •In ASCII, every letter, number, and punctuation symbol has a corresponding number, or ASCII code 24
  • 25. This code is a popular code used to represent information sent as character- based data. It uses 7-bits to represent: › 94 Graphic printing characters. › 34 Non-printing characters  Some non-printing characters are used for text format (e.g. BS = Backspace, CR = carriage return)  Other non-printing characters are used for record marking and flow control (e.g. STX and ETX start and end text areas).
  • 26. 95 Graphic codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 27. 33 Control codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 28. Alphabetic codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 29. Numeric codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 30. Punctuation, etc. 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 31. Let us convert You & I, to decimal, hex and binary using the ASCII code table : › Y: 8910 5916 10110012 › o: 11110 6F16 11011112 › u: 11710 7516 11101012 › Space: 3210 2016 01000002 › &: 3810 2616 01001102 › Space: 3210 2016 01000002 › I: 7310 4916 10010012 › ,: 4410 2C16 01011002
  • 32. The term extended ASCII (or high ASCII) describes eight-bit or larger character encodings that include the standard seven-bit ASCII characters as well as others.

Notas del editor

  1. Excess-3 have a self-complementing property
  2. Check It