3 ms·
Let me try to fix the confusion in this subthread. The 8080, Z-80, 6502, etc are 8-bit processors that support BCD arithmetic, 2 digits at a time. The 6502 has
by kens 11y ago
Let me try to fix the confusion in this subthread.
The 8080, Z-80, 6502, etc are 8-bit processors that support BCD arithmetic, 2 digits at a time. The 6502 has a decimal mode flag that enables BCD arithmetic. The 8080 and descendants use a DAA (Decimal Adjust Accumulator) instruction that fixes up the BCD digits after doing a binary add.
The x86 supports packed BCD (2 digits per byte) or unpacked BCD (1 digit per byte) in the general purpose registers, and 10-byte, signed 18 digit BCD integers in the FPU registers. It has additional adjust operations DAS (Decimal Adjust after Addition), AAA, AAS, AAM, AAD (ASCII Adjust after Addition/Subtraction/Multiplication/Division for unpacked values).
The 1401 is a decimal machine with one BCD digit per character. It has 6-bit characters, along with a word mark bit and a parity bit with each character.