Binary to Binary Coded Decimal Conversion

Order Number: DIGITAL-8-14-U-SYM

This document describes a standard PDP-8 subroutine designed to convert binary integers (up to 999 decimal) into Binary Coded Decimal (BCD) format for output purposes.

The subroutine requires 33 decimal storage locations and is executed by a standard JMS instruction, with the binary number provided in the accumulator. The conversion process utilizes a loop that performs successive subtractions of binary equivalents for decimal values (800, 400, 200, 100, 80, 40, 20, and 10). The resulting BCD value is returned in the accumulator. The document includes a detailed program listing, a calculation formula for execution time (ranging from approximately 216.0 to 235.2 microseconds), and a comprehensive flowchart of the algorithm.

DIGITAL-8-14-U-SYM
2000
8 pages
Quality

Original
0.3MB

Site structure and layout ©2025 Majenko Technologies