BusSHL (Shift Left)

Inputs

PinTypeDescription
Abus8Input bus (8 bits)

Outputs

PinTypeDescription
Qbus8(A << 1) & 0xFF — shifted left by 1

How It Works

All bits move one position to the left. The LSB (bit 0) becomes 0. The MSB (bit 7) is discarded (shifted out of the 8-bit range).

Effect: Q = A × 2 (mod 256). Left shift doubles the value. For example: A = 0x03 (00000011) → Q = 0x06 (00000110). A = 0x80 (10000000) → Q = 0x00 (00000000, MSB lost, overflow).

Usage

Used in level 19 "PC+2" — doubling the PC step from +1 to +2. The ProgramCounter normally increments by 1; shifting the increment value left produces +2 per cycle.

ALU operation for multiplication by powers of two. Multiple SHL in series give ×2, ×4, ×8, etc.