Signed integer bit visualizer

Width
bits, 1 to 128
Read as

Flip bits, or type a value in any base. Switching between signed and unsigned changes how the bits read, never the bits themselves.

Bits

Hold Shift and drag across bits to read them as one number.

Shift
Rotate
bit
Math
Reorder

Values

Type into any row and the bits follow. Spaces, commas and underscores are ignored.

Bytes in memory

Flags and counts

N and Z describe the bits right now. C and V come from the last operation.

NNegative

ZZero

CCarry

VOverflow

Other signed encodings

The same bits read five ways, and the bits each encoding would need to store the current value.

EncodingThese bits read asBits for 0

Bit field

Treat a run of bits as its own number, like a field in a hardware register. Pick it by Shift-dragging across the bits or with the range below. In the code, x is the whole value and v is the field.

Read
Write

Settings

Turn parts of the page on or off. Your choices are saved in this browser. Theme and colors are under the theme button in the top bar.

Keyboard shortcuts

Bits

Set all bitsS
Clear all bitsC
Invert all bitsI
Random bitsR
Switch between signed and unsignedM

Operations

Shift left, logical shift right[]
Rotate left, rotate right{}
Add 1, subtract 1+−
NegateN

Selecting a field

Select bits and read them as one numberShift+ drag
Stretch the field to that bitShift+ click
Grow or shrink the field from a focused bitShift←→↑↓
Deselect the fieldEsc

On a focused bit

Move between bits←→↑↓
Jump to the first or last bitHomeEnd
Flip the bitSpaceorEnter
Set the bit to 0 or 101

Anywhere outside a text box

UndoCtrlZ
RedoCtrlShiftZ
SettingsCtrl,
Show this list?