Blog

EBCDIC vs ASCII

web developement

You might like to read “What is Character Encoding?” first.

ASCII stands for The American Standard Code for Information Interchange and EBCDIC for the Extended Binary Coded Decimal Interchange Code. Both are two popular character encoding schemes.

ASCII uses 7-bit of a byte to encode a character and consider the 8th (most significant bit) for error checking and limits it to 127 characters only, whereas EBCDIC uses 8-bit of a byte. Hence error checking cannot be performed, but it gives a wider range of 256 characters to EBCDIC.

Even though EBCDIC can cover more characters than ASCII, but is not much preferred among programmers. ASCII has a better arrangement of characters which makes programmer’s job easy. ASCII support linear arrangement which means letters are grouped together, for example, capital letters and small letters have there own group where they are in consecutive order, whereas in EBCDIC groups contain only 9 characters at a time which makes it quite difficult for programmers.

ASCII is also had better compatibility with its older versions, whereas EBCDIC has compatibility issues with older versions. As well as EBCDIC isn’t compatible with modern encodings like UNICODE, whereas ASCII is. First 128 characters of UNICODE are from ASCII, which make it able to read ASCII encoded file.

For Example

String: A
ASCII Hex Bytes: 41
EBCDIC Hex Bytes:C1
String: www.unpluggedmind.in
ASCII Hex Bytes: 77 77 77 2E 75 6E 70 6C 75 67 67 65 64 6D 69 6E 64 2E 69 6E
EBCDIC Hex Bytes:A6 A6 A6 4B A4 95 97 93 A4 87 87 85 84 94 89 95 84 4B 89 95

 

Tech EBCDIC ASCII

(ref:Wikipedia)

Leave a Reply


Your email address will not be published. Required fields are marked *