16-Bit INT & 32-Bit DINT•Studio 5000 & RSLogix 500 Ready

Masked Move Calculator (PLC MVM Instruction)

Use this free Masked Move Calculator to simulate 16-bit INT and 32-bit DINT PLC MVM instructions bit-by-bit, test hexadecimal masks (0F0Fh / 16#00FF), and verify retained Destination bits before downloading to a live controller.

PLC Scenarios:
MVM Instruction Operands

Accepts Hex (0F0Fh, 16#0F0F), Binary (2#1010), or Decimal (10#255).

Signed: -23101 · Bin: 1010_0101_1100_0011
8 Passed · 8 Held
Unmasked (0) bits retain these values
Post-Scan Output
Destination (After MVM)
5 Bits Updated
Studio 5000 Hex Literal
16#1533
2#0001_0101_0011_0011
RSLogix 500 Hex
1533h
Signed INT
5427
Unsigned Decimal
5427
Mask Summary
8 Pass / 8 Hold
Structured Text (IEC 61131-3)
// Studio 5000 Structured Text Equivalent (16-Bit INT)
Dest_Tag := (Source_Tag AND 16#0F0F) OR (Dest_Tag AND (NOT 16#0F0F));
// Result: Dest_Tag = 16#1533 (Signed: 5427)
Interactive Bit-Level MVM Visualizer (Click Any Bit to Toggle 0 ↔ 1)

Green (Mask = 1) passes the Source bit through; Amber (Mask = 0) blocks Source and holds the Destination's prior bit.

MVM [Source: A5C3h (-23101)] [Mask: 0F0Fh] → [Dest: 1230h ⇒ 1533h (5427)]
16-Bit INT Register (Bits 15 → 0)
Register1514131211109876543210
Source
Mask
Dest (Prior)
Dest (After)
0
H
0
H
0
H
1
H
0
P
1
P
0
P
1
P
0
H
0
H
1
H
1
H
0
P
0
P
1
P
1
P
Usage & Plant-Floor Examples

How the PLC Masked Move Instruction Works

01

Select Word Size & Source

Choose 16-Bit INT for RSLogix 500 / MicroLogix registers (such as N7:0 or I:1.0) or 32-Bit DINT for Studio 5000 ControlLogix tags, then enter your incoming Source value in hex, binary, or decimal.

02

Configure the Bitwise Mask

Type a hex mask like 00FFh or click individual bit cells in the interactive matrix. Every mask bit set to 1 passes the corresponding Source bit through; every bit set to 0 blocks it.

03

Verify Prior Destination State

Enter the Destination register's prior value before scan execution to confirm adjacent solenoid coils, indicator lamps, or status bits on unmasked positions remain completely unchanged.

Boolean Logic & Truth Table

MVM Bitwise Formula & Truth Table

Boolean Equation vs. Bitwise AND

Dest_After = (Source & Mask) | (Dest_Prior & ~Mask)

Controls engineers frequently compare MVM against a bitwise AND instruction. Executing Dest := Source AND Mask zeroes out every bit where Mask = 0. By contrast, MVM ORs the masked Source bits with Dest_Prior AND (NOT Mask), preserving prior Destination states on blocked bits. That makes MVM indispensable when updating a 4-bit BCD display digit or an 8-bit valve bank group inside a shared 16-bit output card word without dropping energized motors on neighboring bits.

Bit-Level Truth Table

Mask BitSource BitDest (Prior)Dest (After)Action
00 or 100Hold Prior (0)
00 or 111Hold Prior (1)
100 or 10Pass Source (0)
110 or 11Pass Source (1)
PLC Programming FAQ

Masked Move Instruction FAQ

What does the Masked Move (MVM) instruction do in a PLC?+

The Masked Move (MVM) instruction copies data from a Source register to a Destination register through a bitwise Mask. Wherever a Mask bit is 1, the corresponding Source bit overwrites the Destination bit. Wherever a Mask bit is 0, the Destination bit retains its existing value prior to the instruction.

How is Masked Move (MVM) different from a bitwise AND instruction?+

A bitwise AND instruction forces all unmasked (0) positions in the Destination register to become 0. In contrast, Masked Move (MVM) preserves the previous state of unmasked bits in the Destination register using the logic: Dest_After = (Source & Mask) | (Dest_Before & ~Mask). This prevents accidentally turning off unrelated outputs sharing the same 16-bit output card.

How do I format hexadecimal masks in Studio 5000 vs. RSLogix 500?+

In Allen-Bradley Studio 5000 Logix Designer (ControlLogix / CompactLogix), hexadecimal constants use the 16# prefix, such as 16#0F0F or 16#00FF_00FF. In legacy RSLogix 500 (SLC 500 / MicroLogix), hexadecimal masks use a trailing h suffix (such as 0F0Fh), and masks beginning with A–F require a leading zero (e.g., 0FF00h).

Does MVM use 16-bit INT or 32-bit DINT data types?+

RSLogix 500 operates primarily on 16-bit signed integers (INT, bits 0–15). Studio 5000 natively executes on 32-bit signed double integers (DINT, bits 0–31) as well as SINT (8-bit) and INT (16-bit) tags. Make sure Source, Mask, and Destination share matching data types to avoid implicit sign-extension.

Why does my PLC show a negative decimal number after a Masked Move?+

PLC INT (16-bit) and DINT (32-bit) registers use signed two’s complement representation. If the Most Significant Bit (Bit 15 for INT, or Bit 31 for DINT) is 1 after the Masked Move completes, the PLC displays the decimal value as negative even though the underlying bit pattern is exact.

Are my register values stored on a server?+

No. All bitwise calculations execute 100% locally in your web browser. Your latest register values are cached in browser localStorage for convenience, and shareable links encode the hex values directly in URL query parameters.

12 Free Browser-Based Engineering Utilities

Complete PLC & Industrial Automation Calculator Suite