Extended Binary Coded Decimal Interchange Code (EBCDIC; //) is an eight-bit character encoding used mainly on IBM mainframe and IBM midrange computer operating systems. It descended from the code used with punched cards and the corresponding six bit binary-coded decimal code used with most of IBM's computer peripherals of the late 1950s and early 1960s. It is supported by various non-IBM platforms, such as Fujitsu-Siemens' BS2000/OSD, OS-IV, MSP, and MSP-EX, the SDS Sigma series, Unisys VS/9, Burroughs MCP and ICL VME.
|Classification||8-bit basic Latin encodings (non‑ASCII)|
EBCDIC was devised in 1963 and 1964 by IBM and was announced with the release of the IBM System/360 line of mainframe computers. It is an eight-bit character encoding, developed separately from the seven-bit ASCII encoding scheme. It was created to extend the existing Binary-Coded Decimal (BCD) Interchange Code, or BCDIC, which itself was devised as an efficient means of encoding the two zone and number punches on punched cards into six bits. The distinct encoding of 's' and 'S' (using position 2 instead of 1) was maintained from punched cards where it was desirable not to have hole punches too close to each other to ensure the integrity of the physical card.
While IBM was a chief proponent of the ASCII standardization committee, the company did not have time to prepare ASCII peripherals (such as card punch machines) to ship with its System/360 computers, so the company settled on EBCDIC. The System/360 became wildly successful, together with clones such as RCA Spectra 70, ICL System 4, and Fujitsu FACOM, thus so did EBCDIC.
All IBM mainframe and midrange peripherals and operating systems use EBCDIC as their inherent encoding (with toleration for ASCII, for example, ISPF in z/OS can browse and edit both EBCDIC and ASCII encoded files). Software and many hardware peripherals can translate to and from encodings, and modern mainframes (such as IBM zSeries) include processor instructions, at the hardware level, to accelerate translation between character sets.
There is an EBCDIC-oriented Unicode Transformation Format called UTF-EBCDIC proposed by the Unicode consortium, designed to allow easy updating of EBCDIC software to handle Unicode, but not intended to be used in open interchange environments. Even on systems with extensive EBCDIC support, it has not been popular. For example, z/OS supports Unicode (preferring UTF-16 specifically), but z/OS only has limited support for UTF-EBCDIC.
IBM AIX running on the RS/6000 and its descendants including the IBM Power Systems, Linux running on z Systems, and operating systems running on the IBM PC and its descendants use ASCII, as did AIX/370 and AIX/390 running on System/370 and System/390 mainframes.
Compatibility with ASCIIEdit
The fact that all the code points were different was less of a problem for inter-operating with ASCII than the fact that sorting EBCDIC put lowercase letters before uppercase letters and letters before numbers, exactly the opposite of ASCII.
Software portability and data exchange are hindered by EBCDIC's lack of codes for several symbols (such as the brace characters) commonly used in programming and in network communications.
The gaps between letters made simple code that worked in ASCII fail on EBCDIC. For example, "
for (c='A';c<='Z';++c)" would set
c to the 26 letters in the ASCII alphabet, but 41 characters including a number of unassigned ones in EBCDIC. Fixing this required complicating the code with function calls which was greatly resisted by programmers.
All ASCII codes stored within an eight-bit byte had nonnegative values on systems such as the PDP-11 that treated bytes as signed quantities. Software on those platforms often took advantage of that property, causing problems when it was ported to EBCDIC-based environments where many character codes had a 1 as the "sign" bit.
By using all eight bits EBCDIC may have encouraged the use of the eight-bit byte by IBM, while ASCII was more likely to be adopted by systems with 36 bits (as five seven-bit ASCII characters fit into one word). As eight-bit bytes became widespread, ASCII systems sometimes used the "unused" bit for other purposes such as parity, thus making it more difficult to transition to larger character sets.
Code page layoutEdit
The table below shows the "invariant subset" of EBCDIC, which are characters that should have the same assignments on all EBCDIC code pages. It also shows (in boxes) missing ASCII and EBCDIC punctuation, located where then are in CCSID 037 (one of the code page variants of EBCDIC). Unassigned codes are typically filled with international or region-specific characters in the various EBCDIC code page variants, but the characters in boxes are often moved around as well.
In each table cell below, the first row is an abbreviation for a control code or (for printable characters) the character itself; and the second row is the Unicode code (blank for controls that don't exist in Unicode).
Definitions of non-unicode EBCDIC controlsEdit
|SEL||0004||Device-specific control character|
|RNL||0006||Required newline and resets IT|
|GE||0008||Non-locking shift that changes the interpretation of the following character|
|SPS||0009||Begin superscript or undo subscript|
|RPT||000A||Repeat, device-specific character string repeat order|
|RES/ENP||0014||Restore/Enable Presentation, "terminates the Bypass/Inhibit Presentation mode of operation and activates associated printers or displays"|
|POC||0017||Program Operator Communication. Followed by two -ne-byte operators that identify the specific function, for example a light or function key|
|UBS||001A||Unit backspace a fractional space|
|CU1||001B||Customer use, not used by IBM|
|IUS/ITB||001F||Interchange Unit Separator, Intermediate Transmission Block. Terminates an information block called a UNIT.|
|DS||0020||Digit Select, used by S/360 edit (ED) instruction|
|SOS||0021||Start of Significance, used by S/360 edit (ED) instruction|
|WUS||0023||Word Underscore, underscores the immediately preceding word|
|BYP/INP||0024||Bypass/Inhibit Presentation, terminates RES/ENP mode|
|SA||0028||Set Attribute, marks the beginning of a fixed-length device specific control sequence (deprecated)|
|SFE||0029||Start Field Extended, marks the beginning of a variable-length device specific control sequence (deprecated)|
|SM/SW||002A||Set Mode/Switch, device specific control that sets a mode of operation|
|CSP||002B||Control Sequence Prefix, marks the beginning of a variable-length device specific control sequence|
|MFA||002C||Modify Field Attribute, marks the beginning of a variable-length device specific control sequence (deprecated)|
|0030||Reserved for future use by IBM|
|0031||Reserved for future use by IBM|
|IR||0033||Index Return, Move to start of next line or terminate an information unit|
|PP||0034||Presentation Position, followed by two one-byte parameters to set the current position|
|TRN||0035||Transparent, followed by one byte parameter that indicates the number of bytes of transparent data that follow|
|NBS||0036||Numeric Backspace, move backwards the width of one digit|
|SBS||0038||Subscript, begin subscript or undo superscript|
|IT||0039||Indent Tab, indents the current and all following lines, reset by RNL or RFF|
|RFF||003A||Required Formfeed and reset IT|
|CU3||003B||Customer use, not used by IBM|
|003E||Reserved for future use by IBM|
|EO||00FF||All ones character used as filler|
Criticism and humorEdit
Open-source software advocate and software developer Eric S. Raymond writes in his Jargon File that EBCDIC was loathed by hackers, by which he meant members of a subculture of enthusiastic programmers. The Jargon File 4.4.7 gives the following definition:
EBCDIC: /eb´s@·dik/, /eb´see`dik/, /eb´k@·dik/, n. [abbreviation, Extended Binary Coded Decimal Interchange Code] An alleged character set used on IBM dinosaurs. It exists in at least six mutually incompatible versions, all featuring such delights as non-contiguous letter sequences and the absence of several ASCII punctuation characters fairly important for modern computer languages (exactly which characters are absent varies according to which version of EBCDIC you're looking at). IBM adapted EBCDIC from punched card code in the early 1960s and promulgated it as a customer-control tactic (see connector conspiracy), spurning the already established ASCII standard. Today, IBM claims to be an open-systems company, but IBM's own description of the EBCDIC variants and how to convert between them is still internally classified top-secret, burn-before-reading. Hackers blanch at the very name of EBCDIC and consider it a manifestation of purest evil.— The Jargon file 4.4.7
EBCDIC design was also the source of many jokes. One such joke went:
Professor: "So the American government went to IBM to come up with an encryption standard, and they came up with—"
This is a large room full of assorted heavy machinery, whirring noisily. The room smells of burned resistors. Along one wall are three buttons which are, respectively, round, triangular, and square. Naturally, above these buttons are instructions written in EBCDIC...
- Mackenzie, Charles E. (1980). Coded Character Sets, History and Development. The Systems Programming Series (1 ed.). Addison-Wesley Publishing Company, Inc. ISBN 0-201-14460-3. LCCN 77-90165. ISBN 978-0-201-14460-4. Retrieved 2016-05-22. 
- Bemer, Bob. "EBCDIC and the P-Bit (The Biggest Computer Goof Ever) - Computer History Vignettes". Archived from the original on 2018-05-13. Retrieved 2013-07-02.
[…] but their printers and punches were not ready to handle ASCII, and IBM just HAD to announce.
- "X3.4-1963". 1963. p. 4. Archived from the original on 2016-08-12. (NB. IBM had four staff members on the final 21-member ASA X3.2 sub-committee.)
- IBMnt (2008). "IBM confirms the use of EBCDIC in their mainframes as a default practice". Archived from the original on 2013-01-03. Retrieved 2008-06-16.
- "Appendix G-1. EBCDIC control character definitions". IBM Globalization. IBM Corporation. Retrieved 2018-09-10.
- Raymond, Eric S. (1997). "The New Hacker's Dictionary". p. 310.
- "EBCDIC". Jargon File. Archived from the original on 2018-05-13. Retrieved 2018-05-13.
Cite error: A list-defined reference named "Kornai_1993_FAQ" is not used in the content (see the help page).
Cite error: A list-defined reference named "Petrlik_1996_CZ-Encodings" is not used in the content (see the help page).
- Character Data Representation Architecture (CDRA) from IBM Contains IBM's official information on code pages and character sets.
- F.0 Appendix F. Code Pages from AS/400 International Application Development V4R2
- ICU Converter Explorer Contains more information about EBCDIC derived from IBM's CDRA, including DBCS EBCDIC (Double Byte Character Set EBCDIC)
- ICU Charset Mapping Tables Contains computer readable Unicode mapping tables for EBCDIC and many other character sets
- EBCDIC character list, including decimal and hex values, symbolic name, and character/function
- All EBCDIC code pages and 3270 graphics escape codes at the Wayback Machine (archived August 27, 2016)