# z and the blank character similarly numeric data

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: process alphanumeric data also. An alphanumeric data is a string of symbols where a symbol may be one of the letters A, B, C, ..., Z or one of the digits 0, 1,2, ..., 9 or a special character, such as+ -*/,.() = (space or blank) etc. An alphabetic data consists of only the letters A, B, C, ..., Z and the blank character. Similarly, numeric data consists of only numbers 0, 1,2, ..., 9. However, any data must be represented internally by the bits 0 and 1. As such, binary coding schemes are used in computers to represent data internally. In binary coding, every symbol that appears in the data is represented by a group of bits. The group of bits used to represent a symbol is called a byte. To indicate the number of bits in a group, sometimes a byte is referred to as &quot;n-bit byte&quot; where the group contains n bits. However, the term byte is commonly used to mean an 8-bit byte (a group of 8 bits) because most of the modern computers use 8 bits to represent a symbol. BCD CODE The Binary Coded Decimal (BCD) code is one of the early memory codes. It is based on the idea of converting each digit of a decimal number into its binary equivalent rather than converting the entire decimal value into a pure binary form. This facilitates the conversion process to a great extent. The BCD equivalent of each decimal digit is shown in Figure 4.1. Since 8 and 9 require 4 bits, all decimal digits are represented in BCD by 4 bits. You have seen in Example 3.9 that 42i0 is equal to IOIOIO2 in a pure binary form. Converting 42i 0 into BCD, however, produces the following result: 4210 = 0100/4 0010/2 or 01000010 in BCD Decimal Digits BCD Equivalent 0 1 2 3 4 5 6 7 8 9 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 Figure 4.1. BCD equivalent of decimal digits. Note that each decimal digit is independently converted to a 4 bit binary number and hence, the conversion process is very easy. Also note that when 4 bits are used, altogether 16 (24) configurations are possible (refer to hexadecimal number system). But from F...
View Full Document

Ask a homework question - tutors are online