29
6.5 Counter Card - BCD Output
The Digital Counter Card can be provided with Binary Coded Decimal (BCD) output. BCD code is a bina-
ry method of representing decimal numbers. The BCD code for a decimal number is a string of four-bit
binary numbers, each of which represents one decimal digit. Only the following binary groups are used:
Decimal No. Binary No. Decimal No. Binary No.
0 0000 5 0101
1 0001 6 0110
2 0010 7 0111
3 0011 8 1000
4 0100 9 1001
For example, the decimal number 8.74 is encoded in BCD as a 12-bit binary number:
Decimal No. 8 7 4 = 8.74
Binary No. 1000 0111 0100 = 1000.01110100
In many cases, the BCD code for a stroke length yields a range of BCD numbers where some bits never
change value. For example, 19.999 inches is represented in BCD by the following 20-bit number:
00011001.100110011001
Notice that, for all values from 0 up to 19.999, the first three bits will like- wise be zero. This means that
the remaining 17 bits are sufficient to encode a stroke of 19.999 inches; that is, one 18-bit counter card is
sufficient.
Table 6H (below) lists the maximum stroke length versus number of significant bits for a resolution of
0.001 inch.
Table 6H BCD Representations of Stroke
X BCD Value of ‘X’ Required
(maximum stroke reading) Number of Bits
7.999 (8) 0111 . 1001 1001 1001 15
9.999 (10) 1001 . 1001 1001 1001 16
19.999 (20) 0001 1001 . 1001 1001 1001 17
39.999 (40) 0011 1001 . 1001 1001 1001 18*
79.999 (80) 0111 1001 . 1001 1001 1001 19*
99.999 (100) 1001 1001 . 1001 1001 1001 20*
199.999 (200) 0001 1001 1001 . 1001 1001 1001 21*
* A second Digital Counter Card is required for all values requiring 18 bits or more.