# Chapter 4 computer codes example 41 show the binary

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 01 0010 0011 0100 0101 0110 0111 1000 1001 22 23 24 25 26 27 30 31 1 00 0001 01 2 00 0010 02 3 00 0011 03 4 00 0100 04 5 00 0101 05 6 00 0110 06 7 00 0111 07 8 00 1000 10 9 00 1001 11 0 00 1010 12 Figure 4.2. Alphabetic and numeric characters in BCD along with their Octal equivalent.Chapter 4 ■ Computer Codes Example 4.1. Show the binary digits used to record the word BASE in BCD. Solution: B = 110010 in BCD binary notation A = 110001 in BCD binary notation S = 010010 in BCD binary notation E = 110101 in BCD binary notation So the binary digits 110010/B 110001/A 010010/S 110101/E will record the word BASE in BCD. Example 4.2. Using octal notation, show the BCD coding for the word DIGIT. Solution: D = 64 in BCD octal notation I = 71 in BCD octal notation G = 67 in BCD octal notation I = 71 in BCD octal notation T = 23 in BCD octal notation So the BCD coding for the word DIGIT in octal notation will be 64/D 21/I 67/G 21/I 23/T EBCDIC The major problem with BCD code is that only 64 (26) different characters can be represented in it. This is not sufficient for providing decimal numbers (10), lower-case letters (26), capital letters (26), and a fairly large number of other special characters (28+). Hence, the BCD code was extended from a 6-bit code to an 8-bit code. The added 2 bits are used as additional zone bits, expanding the zone to 4 bits. The resulting code is called the Extended Binary-Coded Decimal Interchange Code (EBCDIC). In this code it is possible to represent 256 (2 8) different characters instead of 64 (2 6). In addition to the various character requirements mentioned above, this also allows a large variety of printable characters and several nonprintable control characters. The control characters are used to control such activities as printer vertical spacing, movement of cursor on the terminal screen, etc. All of the 256 bit combinations have not yet been assigned characters, so the code can still grow as new requirements develop. Because EBCDIC is an 8-bit code,...
View Full Document

## This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online