Questions tagged [binary-coded-decimal]

For questions about the binary-coded-decimal (BCD) numeric representation.

Filter by
Sorted by
Tagged with
4
votes
3answers
130 views

The 8086 has AAM (ASCII Adjust after Multiply), why not the same for packed BCD?

I'm just curious why the 8086 seems to be lacking in an adjust opcode for fixing up packed BCD multiplication. It seems like it would be a useful thing, and packed BCD seems to be more common to begin ...
5
votes
4answers
750 views

6502: is BCD *fundamentally* the same performance as non-BCD?

Furthering my reading of MS BASIC and Woz's FP code and comparing the two leads to another question specific to the 6502... From what I can see looking over the 6502 instruction guides, it appears ...
15
votes
3answers
634 views

Did any micros use the 6502 BCD mode in their OS?

I know the Atari's FP package used BCD for rather dubious reasons, but does anyone know of other examples of basic "operating system" level code on common platforms that used BCD? I suspect BCD was ...
4
votes
3answers
382 views

3 decimal digits per 10 bits

Early computers often had hardware support for decimal arithmetic. This was usually in the form of BCD, 1 decimal digit per 4 bits, e.g. the 6502 and Z80, tightly constrained by transistor count as ...
6
votes
1answer
734 views

What instructions for the 8086 and subsequent x86 CPUs are not available in Long Mode?

I know from this answer that, Modern x86 CPUs are binary compatible with 8086. You can literally run 8086 binaries on a modern PC, in real mode. (The species analogy is a stretch here, but works ...
6
votes
4answers
987 views

Reason behind “ASCII Adjust” instructions being ASCII and not BCD?

I'm just curious if there was ever other instructions that were more ASCII-centric than the CISC associated ones we're left with now? Specifically, all the Binary Coded Decimal (BCD) instructions ...
18
votes
5answers
3k views

Why does the Z80 have a half-carry bit?

The Z80 apparently had a 4-bit ALU, and computes 8-bit values in two stages. The half-carry bit preserves the carry from bits 3 to 4. Why did the designers of this chip choose to preserve that value ...
13
votes
1answer
2k views

What is the relationship between the Ricoh 2A03 and the MOS 6502?

The Ricoh 2A03 (and the 2A07) is the CPU in the well-known Nintendo Entertainment System. Apparently, the die is very similar indeed, as the slides in this video suggest https://www.youtube.com/watch?...