# Adjust flag
**Wikidata**: [Q4683192](https://www.wikidata.org/wiki/Q4683192)  
**Wikipedia**: [English](https://en.wikipedia.org/wiki/Adjust_flag)  
**Source**: https://4ort.xyz/entity/adjust-flag

## Summary
The Adjust flag is a binary flag in a processor's status register used to indicate a carry from the lower nibble (4 bits) during binary-coded decimal (BCD) arithmetic operations. It is also known as the auxiliary carry flag and is critical for correcting arithmetic results in BCD calculations.

## Key Facts
- **Aliases**: auxiliary flag, auxiliary carry  
- **Freebase ID**: `/m/0532f_s`  
- **Instance of**: status register (verified via Wikipedia revision dated 2021-05-29)  
- **Sitelink Count**: 1 (English Wikipedia only)  
- **Wikipedia Title**: Adjust flag  
- **Wikipedia Languages**: English  

## FAQs  
**Q: What is the Adjust flag used for?**  
A: It signals a carry from the lower nibble during BCD arithmetic, enabling processors to adjust results for correct decimal representation.  

**Q: How does the Adjust flag relate to the status register?**  
A: It is a component of the status register, which stores flags reflecting operation outcomes like overflow or carry.  

**Q: What architectures use the Adjust flag?**  
A: It is part of the FLAGS register in x86 architectures, where it tracks auxiliary carry for BCD corrections.  

## Why It Matters  
The Adjust flag solves the problem of inaccurate arithmetic in BCD systems, which represent decimal numbers in binary form. Without it, processors would produce incorrect results during decimal operations, affecting applications like financial software or calculators. Its role in the status register ensures precise BCD calculations, making it essential for systems requiring decimal accuracy.  

## Notable For  
- **BCD-Specific Function**: Unique to BCD arithmetic, unlike general-purpose flags (e.g., carry or zero).  
- **Nibble-Level Precision**: Monitors carries only in the lower 4 bits, distinguishing it from full-byte carry flags.  
- **x86 Integration**: Part of the FLAGS register, enabling hardware-accelerated decimal adjustments in Intel/AMD processors.  

## Body  
### Definition and Function  
- The Adjust flag (AF) is a binary flag in the status register that indicates a carry from bit 3 to bit 4 during BCD arithmetic.  
- It is activated when an 8-bit BCD addition or subtraction produces a carry in the lower nibble, triggering decimal correction logic.  

### Technical Specifications  
- **Aliases**: auxiliary flag, auxiliary carry  
- **Freebase ID**: `/m/0532f_s`  
- **Instance of**: status register (per Wikipedia revision 993615973, dated 2021-05-29)  
- **Sitelink Count**: 1 (English Wikipedia coverage)  
- **Wikipedia Title**: Adjust flag  

### Related Entities  
- **Status Register**: The Adjust flag is a subclass of the status register, which contains flags like carry, zero, and overflow.  
- **FLAGS Register (x86)**: In x86 architectures, the Adjust flag is the AF bit within the FLAGS register, used for BCD adjustments.  
- **Program Status Word (PSW)**: IBM System/360’s equivalent combines status flags (including carry) with control bits.  

### External References  
- **Wikipedia**: [Adjust flag](https://en.wikipedia.org/wiki/Adjust_flag) (English only)  
- **Freebase**: [Adjust flag](https://www.freebase.com/m/0532f_s)  
- **ScienceDirect**: Covered under "status register" topics in computer science and engineering.