HEX NOTATION

If you were to get the contents of memory for a mini-computer or mainframe printed out on paper, you would not see all the 1's and 0's that are actually in memory. You would receive a print out in Hex notation. Hex notation takes the EBCDIC that was discussed earlier, and converts each 4 bits into Hexadecimal. The zone and digit for each character, whether it is numeric or alphabetic, is converted into Hex. Example:

9 = 1111 1001 (in EBCDIC) to convert this to Hex notation, plug each of the four bits into the number line, and then convert it to Hex.

8 4 2 1 8 4 2 1

1 1 1 1 1 0 0 1

To convert this EBCDIC number to Hex notation, for the zone portion add the numbers in the number line together that have a one below them. 8+4+2+1=15. What is 15 in hex? 15 in hex is F, so the hex notation for the zone portion of this number would be F. Then do the same thing for the digit. 8+1=9. What is 9 in hex? 9 in hex is 9, so the digit portion of this number would be 9. The hex notation for this entire number would be written F9. Another example:

69 = 1111 0110 1111 1001 (in EBCDIC) to convert this to hex notation, plug each of the four bits into the number line, and convert to Hex.

8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1

1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 1

If you start converting on the far left end of this number, you would first add the numbers in the number line for the first zone. 8+4+2+1=15, again, 15 in hex is F. You would then add the numbers for the first digit. 4+2=6. 6 in hex is 6. Then add the numbers for the second zone. 8+4+2+1=15, again we have F. Now add the numbers for the last digit. 8+1=9. 9 in hex is 9. To write this number in hex notation, you would have F6F9.

 

To convert alphabetic characters in EBCDIC to hex notation, you would do the same thing you do for the numbers. Example:

A = 1100 0001 (in EBCDIC)

8 4 2 1 8 4 2 1

1 1 0 0 0 0 0 1

Now add the numbers in the number line that have a one below them for the zone. 8+4=12. What is 12 in hex? 12 in hex is C. Then add the numbers in the digit. 1+0=1. 1 in hex is 1, so the hex notation for this letter would be C1.

Another example:

N= 1101 0101 (in EBCDIC)

8 4 2 1 8 4 2 1

1 1 0 1 0 1 0 1

Now add the numbers in the zone, 8+4+1=13. 13 in hex is D. Then add the numbers in the digit. 4+1=5. 5 in hex is 5, so the hex notation for the letter N would be D5.