This preview shows page 1. Sign up to view the full content.
Unformatted text preview: binary notation
T = 1110 0011 in EBCDICbinary notation
So the EBCDIC coding for the word BIT in binary notation will be
11000010/B 11001001/I 11100011/T
3 bytes will be required for this representation because each letter requires 1 byte (or 8
bits).
Example 4.4.
Write the EBCDIC coding for the word ZONE (use hexadecimal notation). How many
bytes will be required for this representation?
Solution:
Z = E9 in EBCDIC hexadecimal notation
O = D6 in EBCDIC hexadecimal notation
N = D5 in EBCDIC hexadecimal notation
E = C5 in EBCDIC hexadecimal notation
So the EBCDIC coding for the word ZONE in hexadecimal notation will be
E9/Z D6/O D5/N C5/E
Each hexadecimal digit requires 4 bits and there are altogether 8 hexadecimal digits. So
in all 8 x 4 = 32 bits or 4 bytes (8 bits = 1 byte) will be required for this representation.
.
>
We may also write directly that since each letter requires 1 byte for its representation in
EBCDIC and there are 4 letters in the word ZONE, 4 bytes will be required for this
representation.
Example 4.5.
Write the EBCDIC zoneddecimal coding for the value +256 (use hexadecimal). How
many bytes will be required for this representation?
Solution:
+256 = F2F5C6 in EBCDIC
Each hexadecimal digit requires 4 bits and there are altogether 6 hexadecimal digits. So
in all 6 x 4 = 24 bits or 3 bytes (8 bits = 1 byte) will be required for this representation.
We may also write directly that since each digit requires 1 byte for its representation in
the EBCDIC zoned decimal coding and there are 3 digits in the given number, 3 bytes
will be required for this representation.
Example 4.6.
Write 128 as packed decimal number (use hexadecimal).
required for this representation?
Solution: How many bytes will be 128 = F1F2D8 in EBCDIC
= 128D in packed format
Each hexadecimal digit requires 4 bits and there are altogether 4 hexadecimal digits. So
in all 4 x 4 = 16 bits or 2 bytes (1 byte = 8 bits) will be required for this representation.
ASCII
Another computer code that is very widely used is the American Standard Code for
Information Interchange (ASCII). ASCII has been adopted by sever...
View
Full
Document
This document was uploaded on 04/07/2014.
 Spring '14

Click to edit the document details