bitbornMAKE EVERY BIT COUNT

01 / BINARY PLAYGROUND

One bit.
A different instruction.

A small place to begin. Edit an instruction’s actual bytes, then observe what the supported model does to the registers.

CLICK OR PRESS SPACE ON A BIT TO FLIP IT · LEFTMOST = MOST SIGNIFICANT

Tab enters the bits once. Arrows move between bits/bytes; Home/End move within a byte, Ctrl/Cmd + Home/End across the instruction. Enter/Space toggles the focused bit.

ASSEMBLY REPRESENTATION / EXPLANATION ONLYMOV AX, 42

RAW BYTESB8 2A 00

Inspection context: 16-bit default.

EDUCATIONAL SIMULATION

16-bit registers. Limited instruction subset. No native execution.

AX starts at zero. Reset the state to try again.

THREE SMALL EXPERIMENTS

Change a destination.
Change a value.

01

AX becomes CX

Keep MOV AX, 42 selected. Flip bit 0 in the first byte, the rightmost bit. B8 becomes B9; the low opcode bits now select CX.

Simulate and find CX = 002A. The immediate bytes did not change.

02

42 becomes 43

Reset bits and CPU state. Flip bit 0 in the second byte: 2A becomes 2B. The following high byte remains 00.

Little-endian 2B 00 is 0x002B, decimal 43. AX receives the new value.

03

Flags remember a comparison

Reset, simulate MOV AX, 42, then select and simulate CMP AX, 42. AX stays at 42; ZF becomes 1 because the values are equal.

Selecting a new encoding preserves CPU state. “Reset CPU state” starts a fresh experiment.