Skip to content

Pooria-Lari/16bit-BCD-Addition

Repository files navigation

BCD Addition Algorithm

Author: Pooria Lari
Last Update: 2025-11-07
Language: Assembly (8086)


Description

This project implements a 16-bit Binary-Coded Decimal (BCD) Addition Algorithm originally written in 8086 Assembly.
The algorithm performs digit-by-digit addition on packed BCD numbers, applying correction (+6) when a nibble exceeds 9, and properly manages carry propagation across all four digits.

It has been preserved for educational and archival purposes, and a newer version of the same algorithm — rewritten with structured pseudocode and documentation — is now available.


Latest Version

New version available here:
👉 View Updated BCD Addition Algorithm (v2)

What’s new in the latest version:

  • Cleaner structure and improved readability
  • Full pseudocode and documentation included
  • Corrected flag logic for CF / AF
  • Simplified BCD correction steps
  • Performance section with cycle-time analysis

About

This is an Assembly x86 project for adding two 16-bit numbers in BCD (Binary-Coded Decimal) format.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors