EBCDIC
Extended Binary Coded Decimal Interchange Code
EBCDIC is an 8 bit code that is used in mini-computers and mainframes to represent all numbers, letters, and special characters. The left four bits are referred to as the zone, and the right four bits are the digit. The computer uses the zone(left four bits) to determine if the character it is reading is a number or letter or special character.
All numbers have a zone of 1111. The binary number line is used for the zone and the digit. Example:
Zone Digit
8 4 2 1 8 4 2 1
1 1 1 1 0 0 0 1 = 1
Notice that the number line starts over with one on both the zone and the digit. You can not see why it takes 8 bits in the computer to represent any number or letter. The first four bits of all numbers will be 1111. The last four bits are used to represent the number. Note that the digit for the above example is 0001. There must be four bits used for both the zone and the digit, so the 8, 4, & 2 positions all have a zero in them.
The number 6 in EBCDIC would look like the following:
8 4 2 1 8 4 2 1
1 1 1 1 0 1 1 0
Remember that to find any number in binary, place a 1 below the numbers in the number line that add up to the needed number.
If you are to give the EBCDIC for a two digit number, for example 27, you would have to hit two keys on the keyboard to enter 27 into the computer. Each of the two digits must have 8 bits to represent them in EBCDIC. Just divide the number into single digits and give the EBCDIC for each digit.
2 = 1111 0010 7 = 1111 0111
To write 27 in EBCDIC string the two 8 bit codes together.
27 = 1111 0010 1111 0111
Letters of the alphabet in EBCDIC can have one of three zones. Take the following chart to memory as you will need it when the math test comes around.
1100 1101 1110 (zones)
0001 | A J -
0010 | B K S
0011 | C L T
0100 | D M U
0101 | E N V
0110 | F O W
0111 | G P X
1000 | H Q Y
1001 | I R Z
(digits)
Using the above chart, to represent a letter in EBCDIC, always list the zone first, followed by the digit. The letter N is in the 1101 zone and 0101 digit, so the EBCDIC for N would be 1101 0101. The letter Z would be 1110 1001. To represent a word such as DOG, put the three sets of 8 bits together.
DOG = 1100 0100 1101 0110 1100 0111