BusSHR (Shift Right)

Inputs

PinTypeDescription
Abus8Input bus (8 bits)

Outputs

PinTypeDescription
Qbus8(A >>> 1) & 0xFF — shifted right by 1

How It Works

All bits move one position to the right. The MSB (bit 7) becomes 0. The LSB (bit 0) is lost.

Effect: Q = A ÷ 2 (integer division). For example: A = 0x06 (00000110) → Q = 0x03 (00000011). A = 0x01 (00000001) → Q = 0x00 (LSB lost, result zero).

Usage

Extracting individual bits from a value — shift right by N to bring the desired bit to position 0, then AND with 0x01 to isolate it.

ALU operation for division by powers of two. Multiple SHR in series give ÷2, ÷4, ÷8, etc.