This preview shows page 1. Sign up to view the full content.
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 "n-bit byte" 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.
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
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
View Full Document
- Spring '14